Forum Discussion

BigMac1771's avatar
BigMac1771
Honored Guest
8 months ago
Solved

[Spatial SDK] Virtual keyboard is not shown.

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 show...
  • pmcgvr's avatar
    7 months ago

    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)
      }
    }

     

→ Find helpful resources to begin your development journey in Getting Started

→ Get the latest information about HorizonOS development in News & Announcements.

→ Access Start program mentor videos and share knowledge, tutorials, and videos in Community Resources.

→ Get support or provide help in Questions & Discussions.

→ Show off your work in What I’m Building to get feedback and find playtesters.

→ Looking for documentation?  Developer Docs

→ Looking for account support?  Support Center

→ Looking for the previous forum?  Forum Archive

→ Looking to join the Start program? Apply here.

 

Recent Discussions