|
@@ -1,6 +1,8 @@
|
|
package com.yingyangfly.mmse.fragment
|
|
package com.yingyangfly.mmse.fragment
|
|
|
|
|
|
|
|
+import android.os.Build
|
|
import android.os.Bundle
|
|
import android.os.Bundle
|
|
|
|
+import androidx.annotation.RequiresApi
|
|
import androidx.core.os.bundleOf
|
|
import androidx.core.os.bundleOf
|
|
import androidx.navigation.Navigation
|
|
import androidx.navigation.Navigation
|
|
import androidx.recyclerview.widget.GridLayoutManager
|
|
import androidx.recyclerview.widget.GridLayoutManager
|
|
@@ -50,8 +52,14 @@ class CountFragment : BaseFragment<FragmentCountBinding>() {
|
|
super.onCreate(savedInstanceState)
|
|
super.onCreate(savedInstanceState)
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @RequiresApi(Build.VERSION_CODES.LOLLIPOP)
|
|
override fun initViews() {
|
|
override fun initViews() {
|
|
binding {
|
|
binding {
|
|
|
|
+ editResultOne.showSoftInputOnFocus = false
|
|
|
|
+ editResultTwo.showSoftInputOnFocus = false
|
|
|
|
+ editResultThree.showSoftInputOnFocus = false
|
|
|
|
+ editResultFour.showSoftInputOnFocus = false
|
|
|
|
+ editResultFive.showSoftInputOnFocus = false
|
|
numberList.clear()
|
|
numberList.clear()
|
|
for (i in 1..9) {
|
|
for (i in 1..9) {
|
|
numberList.add(i.toString())
|
|
numberList.add(i.toString())
|
|
@@ -157,10 +165,6 @@ class CountFragment : BaseFragment<FragmentCountBinding>() {
|
|
* 加载数据
|
|
* 加载数据
|
|
*/
|
|
*/
|
|
private fun loadData() {
|
|
private fun loadData() {
|
|
- binding.editResultOne.requestFocus()
|
|
|
|
- binding.editResultOne.isFocusable = true
|
|
|
|
- binding.editResultOne.isFocusableInTouchMode = true
|
|
|
|
- binding.editResultOne.postDelayed({ closeKeyBord(binding.editResultOne, mContext) }, 300)
|
|
|
|
if (dao != null) {
|
|
if (dao != null) {
|
|
firstquestion = dao?.getQuestion(questionId)
|
|
firstquestion = dao?.getQuestion(questionId)
|
|
if (firstquestion != null && firstquestion!!.inputString.isNullOrEmpty().not()) {
|
|
if (firstquestion != null && firstquestion!!.inputString.isNullOrEmpty().not()) {
|