문제

Kindle fire has a grey toolbar at the bottom of the screen with the Home soft button and some other buttons, as well as a toolbar to get to settings and such on top. I am building an app which will be the only app running on that particular Kindle for a niche business. Is there a way to disable either or both of these soft key toolbars?

Thanks.

도움이 되었습니까?

해결책

No, it's not possible disable the soft key menu. You can take a look at the Kindle Fire documentation but there's no information :(

But, If you want, you can disable the home button and the back button of the soft key menu:

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

@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
    //Disable all keys
    return false;
}

[UPDATE]

And you must update your manifest with:

        <intent-filter>
            ...
            <category android:name="android.intent.category.DEFAULT" />
            <category android:name="android.intent.category.HOME" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>

Then, when you press the home button from the top menu, you'll get a list dialog, enable the "Use by default for this action" checkbox and select you app.

다른 팁

You can hide both the toolbar by setting the app to run on fullscreen.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top