Commit 0bffdca5 by konghaorui

输入密码页面请求输入焦点

parent aeafabb8
......@@ -193,7 +193,8 @@ class InputPassWordActivity : BaseMvpActivity<IInputPassWordContract.View,IInput
private fun showSoftKeyBord() {
RxKeyboardTool.showKeyboard(this, true)
RxKeyboardTool.toggleSoftInput(this, et_input_password)
}
/**
......
......@@ -291,6 +291,7 @@ class RegisterAndLoginActivity : BaseMvpActivity<ILoginContract.View, ILoginCont
setHint()
requestFocus()
if (isUmengLoginState) {
tv_skip.visibility = View.VISIBLE
......@@ -332,6 +333,14 @@ class RegisterAndLoginActivity : BaseMvpActivity<ILoginContract.View, ILoginCont
}
}
private fun requestFocus(){
et_phone_number.post {
et_phone_number.requestFocus()
et_phone_number.isFocusable = true
et_phone_number.isFocusableInTouchMode = true
}
}
private fun setHint() {
val hintStr = SpannableString(resources.getString(R.string.user_edittext_hint))// 定义hint的值
val ass = AbsoluteSizeSpan(16, true)// 设置字体大小 true表示单位是SP
......
......@@ -31,7 +31,7 @@
android:layout_height="2dp"
android:layout_marginLeft="4dp"
android:layout_marginRight="4dp"
android:background="@color/user_main_theme_light" />
android:background="#2EB0FF" />
</LinearLayout>
<LinearLayout
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment