I have an EditText field in my application, where the user can enter data. The application is in fullscreen mode programatically. The problem is that on some phones (Honor P Smart) the "Done" button is not visible anymore, as you can see on the pictures.
This problem appeared just one week ago, after the phone (Honor P Smart) received an update (firmware fig-lx1 8.0.0.140 (c02)).. Before the update the "Done" button was visible. I should mention that the SwiftKey is not the root of the problem, since I tried on other phones with SwiftKey and it worked perfectly.
Also: why is the second one in fullscreen and the first not? How can I force fullscreen?
Here is the xml code for the EditText field:
<EditText
android:id="@+id/label"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/margin_left"
android:layout_marginStart="@dimen/margin_left"
android:cursorVisible="false"
android:imeActionLabel="@string/done"
android:hint="@string/something"
android:imeOptions="actionDone"
android:inputType="textVisiblePassword"
android:lineSpacingExtra="6sp"
android:textColor="@color/color_x"
android:textSize="32sp" />
I set the listener in the following way:
view.enar_button_label.setOnEditorActionListener { textView, actionID, keyEvent ->
if (actionID == EditorInfo.IME_ACTION_DONE) {
// hiding keyboard, because for some reason, it does not hide automatically
(activity!!.getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager).hideSoftInputFromWindow(view.enar_button_label.windowToken, 0)
// soome stuff...
(activity as MainActivity).setImmersiveMode()
return@setOnEditorActionListener true
}
return@setOnEditorActionListener false
}
Any help would be appreciated!