?
?如果愿意的话,可以把Activity的标题栏给隐藏了。只需要调用requestWindowFeature()方法,同时传递Window.FEATURE_NO_TITLE常量。
?
- package?net.learn2develop.Activity101;??
- ??
- import?android.app.Activity;??
- import?android.os.Bundle;??
- import?android.util.Log;??
- import?android.view.Window;??
- ??
- public?class?Activity101Activity?extends?Activity?{??
- ??
- ????/**?Called?when?the?activity?is?first?created.?*/??
- ????@Override??
- ????public?void?onCreate(Bundle?savedInstanceState)?{??
- ????????super.onCreate(savedInstanceState);??
- ????????//?隐藏标题栏??
- ????????requestWindowFeature(Window.FEATURE_NO_TITLE);??
- ??
- ????????setContentView(R.layout.main);??
- ????}??
- }???
效果图:
?
更多信息请查看?java进阶网?http://www.javady.com