Wednesday
Im executing the StarterSample on Quest3 v76.1024. I just add a EditText widget into ui_example.xml as below.
When I clicked the EditText, the virtual keyborad was not shown but sometime it was shown.
Here is the log filter by keyword "keyboard": log
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="This is EditText"
android:textSize="20dp"
android:textColor="@color/design_default_color_error"
/>
<!--Button-->
<Button
android:id="@+id/ok_button"
android:layout_height="36dp"
android:layout_width="120dp"
android:layout_gravity="center"
android:text="Ok"
android:background="@drawable/button_bg"
android:textColor="#ffffff"
/>
Solved! Go to Solution.
Monday
We are working on a framework-level fix for this. However in the meantime we have a solution that should unblock you.
In your main VR activity (inherits from AppSystemActivity) add this line into your onCreate:
getWindow().addFlags(WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM)
So this would look like:
import android.view.WindowManager
...
class MyVRActivity : AppSystemActivity() {
...
override fun onCreate(savedInstanceState: Bundle?) {
...
getWindow().addFlags(WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM)
}
}
Thursday
Thank you for reporting this, the engineering team is looking into the issue.
Monday
We are working on a framework-level fix for this. However in the meantime we have a solution that should unblock you.
In your main VR activity (inherits from AppSystemActivity) add this line into your onCreate:
getWindow().addFlags(WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM)
So this would look like:
import android.view.WindowManager
...
class MyVRActivity : AppSystemActivity() {
...
override fun onCreate(savedInstanceState: Bundle?) {
...
getWindow().addFlags(WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM)
}
}
Monday
it works, thanks.