fix-ui-pre
This commit is contained in:
parent
2ddfbd9b64
commit
da48cc1919
15
.idea/deploymentTargetDropDown.xml
generated
15
.idea/deploymentTargetDropDown.xml
generated
@ -3,20 +3,7 @@
|
|||||||
<component name="deploymentTargetDropDown">
|
<component name="deploymentTargetDropDown">
|
||||||
<value>
|
<value>
|
||||||
<entry key="app">
|
<entry key="app">
|
||||||
<State>
|
<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>
|
|
||||||
</entry>
|
</entry>
|
||||||
</value>
|
</value>
|
||||||
</component>
|
</component>
|
||||||
|
|||||||
@ -20,6 +20,9 @@ class AppInputMethodService : InputMethodService(), OnKeyboardActionListener {
|
|||||||
private var mouble = false
|
private var mouble = false
|
||||||
private var laTime = -3L
|
private var laTime = -3L
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 大小写转换
|
||||||
|
*/
|
||||||
private fun keyCase(toBig: Boolean, keyboard: Keyboard) {
|
private fun keyCase(toBig: Boolean, keyboard: Keyboard) {
|
||||||
for (key in keyboard.keys) {
|
for (key in keyboard.keys) {
|
||||||
if (!key.label.isNullOrEmpty()) {
|
if (!key.label.isNullOrEmpty()) {
|
||||||
@ -38,6 +41,9 @@ class AppInputMethodService : InputMethodService(), OnKeyboardActionListener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 切换键盘
|
||||||
|
*/
|
||||||
private fun changeXml(mode: Int) {
|
private fun changeXml(mode: Int) {
|
||||||
binding.myCustomInput.run {
|
binding.myCustomInput.run {
|
||||||
when (mode) {
|
when (mode) {
|
||||||
@ -179,7 +185,6 @@ class AppInputMethodService : InputMethodService(), OnKeyboardActionListener {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
override fun onText(text: CharSequence?) {
|
override fun onText(text: CharSequence?) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -11,6 +11,7 @@ import android.provider.Settings
|
|||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.inputmethod.InputMethodInfo
|
import android.view.inputmethod.InputMethodInfo
|
||||||
import android.view.inputmethod.InputMethodManager
|
import android.view.inputmethod.InputMethodManager
|
||||||
|
import androidx.appcompat.app.AlertDialog
|
||||||
import androidx.appcompat.app.AppCompatActivity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
import com.timber.soft.newkeyboard.R
|
import com.timber.soft.newkeyboard.R
|
||||||
import com.timber.soft.newkeyboard.databinding.ActivityApplyBinding
|
import com.timber.soft.newkeyboard.databinding.ActivityApplyBinding
|
||||||
@ -70,6 +71,8 @@ class ApplyActivity : AppCompatActivity(), View.OnClickListener {
|
|||||||
binding.idStep1.setOnClickListener(this)
|
binding.idStep1.setOnClickListener(this)
|
||||||
binding.idStep2.setOnClickListener(this)
|
binding.idStep2.setOnClickListener(this)
|
||||||
binding.applyBack.setOnClickListener(this)
|
binding.applyBack.setOnClickListener(this)
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onResume() {
|
override fun onResume() {
|
||||||
@ -103,6 +106,24 @@ class ApplyActivity : AppCompatActivity(), View.OnClickListener {
|
|||||||
} else {
|
} else {
|
||||||
binding.idStep2.setBackgroundResource(R.drawable.shape_theme_set)
|
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()
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -199,7 +199,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="20dp"
|
android:layout_marginStart="20dp"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="@string/main_menu_share"
|
android:text="@string/main_menu_set"
|
||||||
android:textColor="@color/black"
|
android:textColor="@color/black"
|
||||||
android:textSize="15sp" />
|
android:textSize="15sp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user