The open source OpenXR runtime
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

t/oxr_android: Add fragment to the main activity

+10
+10
src/xrt/targets/openxr_android/src/main/java/org/freedesktop/monado/openxr_runtime/MainActivity.java
··· 13 13 import android.widget.TextView; 14 14 15 15 import androidx.appcompat.app.AppCompatActivity; 16 + import androidx.fragment.app.FragmentManager; 17 + import androidx.fragment.app.FragmentTransaction; 16 18 17 19 public class MainActivity extends AppCompatActivity { 18 20 ··· 23 25 // Make our Monado link clickable 24 26 ((TextView) findViewById(R.id.textPowered)).setMovementMethod(LinkMovementMethod.getInstance()); 25 27 28 + FragmentManager fragmentManager = getSupportFragmentManager(); 29 + FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction(); 30 + 31 + @VrModeStatus.Status 32 + int status = VrModeStatus.detectStatus(this, BuildConfig.APPLICATION_ID); 33 + VrModeStatus statusFrag = VrModeStatus.newInstance(status); 34 + fragmentTransaction.add(R.id.statusFrame, statusFrag, null); 35 + fragmentTransaction.commit(); 26 36 } 27 37 }