SoFunction
Updated on 2025-04-09

Share the problem that the development of applications on Android tablets cannot be displayed in full screen


public class myactivity extends Activity {
    public myview v;
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        (savedInstanceState);
        // setContentView( );
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        getWindow().setFlags(.FLAG_FULLSCREEN,
                .FLAG_FULLSCREEN);
// Obtain screen width and height
        WindowManager windowManager = getWindowManager();
        Display display = ();
        int w = ();
        int h = ();
        v=new myview(this,w,h);
        setContentView(v);
        ();
    }

}