去掉Android新建项目的顶部标题-application:Theme
来源:互联网 发布:2016年就业数据 编辑:程序博客网 时间:2024/06/05 03:38
说明:
AndroidStudio新建项目会有默认的主题,默认主题是带等不标题的,项目中用不到,这时候就需要修改application的Theme了。
application的Theme起到全局作用:定义工具栏颜色等。
图片:
原图:
修改后图:
代码:只用修改styles中的代码即可。
原AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?><manifest package="mandao.component" xmlns:android="http://schemas.android.com/apk/res/android"> <application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:supportsRtl="true" android:theme="@style/AppTheme"> <activity android:name=".MainActivity"> <intent-filter> <action android:name="android.intent.action.MAIN"/> <category android:name="android.intent.category.LAUNCHER"/> </intent-filter> </activity> </application></manifest>原Styles.xml
<resources> <!-- Base application theme. --> <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> <!-- Customize your theme here. --> <item name="colorPrimary">@color/colorPrimary</item> <item name="colorPrimaryDark">@color/colorPrimaryDark</item> <item name="colorAccent">@color/colorAccent</item> </style></resources>
修改后Styles.xml:
<resources> <!-- Base application theme. --> <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar"> <!-- Customize your theme here. --> <item name="colorPrimary">@color/colorPrimary</item> <item name="colorPrimaryDark">@color/colorPrimaryDark</item> <item name="colorAccent">@color/colorAccent</item> </style></resources>
1 0
- 去掉Android新建项目的顶部标题-application:Theme
- 如何去掉app顶部标题
- Android studio 不能新建application 项目
- android去掉标题的做法
- Android去掉标题的方法
- Android去掉标题的方法
- Android去掉标题的方法
- android去掉标题的方法
- Android新建项目选择SDK的区别(MiniMum Required SDK; Target SDK; Compile With; Theme )
- android开发去掉顶部标题栏的方法
- android 去掉顶部状态栏
- android 去掉顶部状态栏
- android去掉顶部标题栏
- android去掉顶部标题栏
- android 去掉顶部状态栏
- 新建Android项目的时候去掉对appcompat_v7项目的依赖
- Android 主题 application theme
- 【Theme】Android隐藏标题
- jQ选择器
- js判断undefined类型
- 常用代码生成工具汇总(转)
- OpenCV - win7+vs2013(2012)+opencv3.0.0 环境配置
- IOS/Android 读取蓝牙设备电量信息
- 去掉Android新建项目的顶部标题-application:Theme
- iOS6、7、8、9区别和新特性
- 第一个struts2程序
- Vue.js数据绑定
- python抓取糗事百科段子 图片
- 如何递归创建Ttee的Node
- 将数组中值为0的项去掉,将不为0的值存入一个新的数组,生成新数组
- spring MVC的实现原理
- linux文件I/O编程