3

I'm trying to do an Android-Tablet app for presentations on trade fairs etc. I don't want to upload the app to the app store, only use it on my tablet.

I try to run the app in ful screen mode (without status bar) with:

requestWindowFeature(Window.FEATURE_NO_TITLE);
this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);

Works great. I try to disable the home button with:

@Override
public void onAttachedToWindow() {
    super.onAttachedToWindow();
    this.getWindow().setType(WindowManager.LayoutParams.TYPE_KEYGUARD);           
}

in my OnCreate-Method. Works great.

But if I try to use both in one app, only disabling the home button still works, any idea what i can do about this?

Thank you!

Grt
  • 141
  • 1
  • 2
  • 11

1 Answers1

0

Try declaring the activity as fullscreen in AndroidManifest.xml, and then doing what you already do to capture the home button

<activity android:name="..." android:label="..."
    android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen" />
Andrei
  • 1,015
  • 1
  • 11
  • 19