requestWindowFeature(Window.FEATURE_NO_TITLE);
API上是这么说的:
int FEATURE_NO_TITLE Flag for the "no title" feature, turning off the title at the top of the screen.
屏幕全屏:
getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
API上是这么说的:
int FLAG_FULLSCREEN Window flag: Hide all screen decorations (e.g.
屏幕没有边界限制(允许窗口扩展到屏幕外):
getWindow().addFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);
API上是这么说的:
int FLAG_LAYOUT_NO_LIMITS Window flag: allow window to extend outside of the screen.
用法:
代码如下:
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);
setContentView(R.layout.newslists);
newsListLayout = findViewById(R.id.newslistlayout);
newsListLayout.setBackgroundColor(Color.MAGENTA);
newsNameList = (ListView) findViewById(R.id.newsnamelist);
model = new Model(0, 6);
nameListAdapter = new NewsNameListAdapter(this, model);
newsNameList.setAdapter(nameListAdapter);
showPage = (TextView) findViewById(R.id.newslistshowpage);
updatePage(model.getIndex());
}
您可能感兴趣的文章:Android调用默认浏览器打开指定Url的方法实例android webview 简单浏览器实现代码android 浏览器之多窗口方案详解Android调用系统默认浏览器访问的方法Android自定义 WebView浏览器android全屏去掉title栏的多种实现方法Android 设置应用全屏的两种解决方法android activity设置无标题实现全屏android 设置全屏的两种方法Android下Activity全屏显示实现方法Android 全屏无标题栏的三种实现方法Android开发实现浏览器全屏显示功能