Activity 的窗口去头的方式
1\窗口去头的第一种方式
public class SplashActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);//窗口去头的第一种方式,必须在下句前面
setContentView(R.layout.activity_splash);
}
}
2\第2种,清单文件中修改 android:theme="@android:style/Theme.Light.NoTitleBar" >
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@android:style/Theme.Light.NoTitleBar" >
<activity
android:name="com.phonesalf.SplashActivity.SplashActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
3\修改默认的android:theme="@style/AppTheme" >里面的内容:
<!-- Application theme. -->
<style name="AppTheme" parent="AppBaseTheme">
<!-- All customizations that are NOT specific to a particular API-level can go here. -->
<item name="android:windowNoTitle">true</item>
</style>
最新文章
- Java学习笔记10
- ansible 安装
- Smarty模板函数
- 在android 6.0(API 23)中,Google已经移除了移除了Apache HttpClient相关的类
- ADO.NET 学习笔记 入门教程
- error C2440:“类型转换";:无法从“void (__thiscall Play1::* )(int *)”转换为“cocos2d::SEL_CallFucN
- 自选项目--手机锁屏软件--NABC分析
- Image1.Canvas画图笔刷
- Android Mediaplayer各种属性和方法简单介绍
- Python Socket单线程+阻塞模式
- 云服务器 远程mysql 无法连接
- JavaScript预编译原理分析
- js jquery数组去重
- 【收藏】UICrawler
- leetcode — longest-common-prefix
- 03 自学Aruba之2.4GHz及5GHz无线信道
- hdu1358 Period kmp求循环节
- hadoop搭建部署
- 解决:oracle+myBatis ResultMap 类型为 map 时返回结果中存在 timestamp 时使用 jackson 转 json 报错
- 使用 Azure CLI 在 Azure China Cloud 云平台上手动部署一套 Cloud Foundry