How to make my app full screen on Galaxy Tab

后端 未结 8 1358
余生分开走
余生分开走 2020-12-30 11:29

I\'ve been trying everything I can think of to get my app to display full screen on the Galaxy Tab.

Basically, it works like the Lunar Lander example app that comes

相关标签:
8条回答
  • 2020-12-30 11:56

    Ted mentioned XLargeSceens, the Galaxy Tab is running 2.2 and therefore doesn't have the xlargeScreens attribute as it was added in 2.3; Because the upcoming generation of tablets will have 3.0 and XlargeScreens you are going to want to use it anyway (and compile against 2.3/3.0)

    In your Manifest you need to declare support for all reasonable screen sizes and provide the correct set of resources

    <supports-screens 
        android:smallScreens="false" 
        android:largeScreens="true"
        android:xlargeScreens="true"  
        android:normalScreens="true" 
        android:anyDensity="true"
    />
    
    0 讨论(0)
  • 2020-12-30 11:59
     public void onCreate(Bundle savedInstanceState) {
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
    

    This is working fine for me... try this

    0 讨论(0)
提交回复
热议问题