fix-ui-pre

This commit is contained in:
LUX-Timber 2024-04-07 16:35:08 +08:00
parent 2ddfbd9b64
commit da48cc1919
4 changed files with 29 additions and 16 deletions

View File

@ -3,20 +3,7 @@
<component name="deploymentTargetDropDown">
<value>
<entry key="app">
<State>
<runningDeviceTargetSelectedWithDropDown>
<Target>
<type value="RUNNING_DEVICE_TARGET" />
<deviceKey>
<Key>
<type value="SERIAL_NUMBER" />
<value value="ZX1G22HXL8" />
</Key>
</deviceKey>
</Target>
</runningDeviceTargetSelectedWithDropDown>
<timeTargetWasSelectedWithDropDown value="2024-04-07T07:35:55.802913400Z" />
</State>
<State />
</entry>
</value>
</component>

View File

@ -20,6 +20,9 @@ class AppInputMethodService : InputMethodService(), OnKeyboardActionListener {
private var mouble = false
private var laTime = -3L
/**
* 大小写转换
*/
private fun keyCase(toBig: Boolean, keyboard: Keyboard) {
for (key in keyboard.keys) {
if (!key.label.isNullOrEmpty()) {
@ -38,6 +41,9 @@ class AppInputMethodService : InputMethodService(), OnKeyboardActionListener {
}
}
/**
* 切换键盘
*/
private fun changeXml(mode: Int) {
binding.myCustomInput.run {
when (mode) {
@ -179,7 +185,6 @@ class AppInputMethodService : InputMethodService(), OnKeyboardActionListener {
}
override fun onText(text: CharSequence?) {
}

View File

@ -11,6 +11,7 @@ import android.provider.Settings
import android.view.View
import android.view.inputmethod.InputMethodInfo
import android.view.inputmethod.InputMethodManager
import androidx.appcompat.app.AlertDialog
import androidx.appcompat.app.AppCompatActivity
import com.timber.soft.newkeyboard.R
import com.timber.soft.newkeyboard.databinding.ActivityApplyBinding
@ -70,6 +71,8 @@ class ApplyActivity : AppCompatActivity(), View.OnClickListener {
binding.idStep1.setOnClickListener(this)
binding.idStep2.setOnClickListener(this)
binding.applyBack.setOnClickListener(this)
}
override fun onResume() {
@ -103,6 +106,24 @@ class ApplyActivity : AppCompatActivity(), View.OnClickListener {
} else {
binding.idStep2.setBackgroundResource(R.drawable.shape_theme_set)
}
if (isChoose()&&isEnable()){
showDialog()
}
}
private fun showDialog() {
val alertDialogBuilder = AlertDialog.Builder(this)
// 设置对话框标题和消息
alertDialogBuilder.setTitle("Settings")
alertDialogBuilder.setMessage("You have successfully activated the soft keyboard!")
// 设置确定按钮
alertDialogBuilder.setPositiveButton("OK") { dialog, which ->
// 关闭当前 Activity
finish()
}
// 创建并显示对话框
val alertDialog = alertDialogBuilder.create()
alertDialog.show()
}
/**

View File

@ -199,7 +199,7 @@
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:gravity="center"
android:text="@string/main_menu_share"
android:text="@string/main_menu_set"
android:textColor="@color/black"
android:textSize="15sp" />
</LinearLayout>