Android应用程序全屏显示方法
时间:2014-05-13 23:19:51
收藏:0
阅读:509
导入两个包:
import android.view.Window; import android.view.WindowManager;
public class MainActivity extends ActionBarActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); this.requestWindowFeature(Window.FEATURE_NO_TITLE); //设置程序不显示标题 this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); //设置不显示状态栏 setContentView(R.layout.activity_main); } }
评论(0)