How to Make an Activity Fullscreenインタフェースをフルスクリーンにする方法

650 ワード


 
This code makes the current Activity Full-Screen. No Status-Bar or anything except the Activity-Window!
 
 
 
 
public class FullScreen extends Activity {
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

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

        setContentView(R.layout.main);
    }
}