安卓6.0去掉标题栏的方法
来源:互联网 发布:java跨域上传图片 编辑:程序博客网 时间:2024/04/20 15:40
在style文件中如下面写法:
<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> <!--安卓6.0去掉标题栏的方法--> <style name="AppTheme.NoActionBar"> <item name="windowActionBar">false</item> <item name="windowNoTitle">true</item> </style></resources>
在AndroidManifest文件中这样写: android:theme=”@style/AppTheme.NoActionBar”>
<application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:supportsRtl="true" android:theme="@style/AppTheme.NoActionBar"> <activity android:name=".ui.activity.MainActivity" android:screenOrientation="portrait"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application>
在代码中这样写:getSupportActionBar().hide(); //去掉标题栏
public class BaseActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); getSupportActionBar().hide(); //去掉标题栏 }
1 0
- 安卓6.0去掉标题栏的方法
- 安卓开发:去掉标题栏和任务栏的方法
- 安卓去掉标题栏
- 安卓去掉界面的标题栏
- 安卓去掉顶端标题栏
- Android去掉标题栏的方法
- [Android] 去掉标题栏的方法
- android去掉标题栏的方法
- Android去掉标题栏的方法
- 安卓应用中去掉标题栏
- Win32编程中去掉标题栏的方法
- android应用中去掉标题栏的方法
- Android去掉标题栏和状态栏的方法
- android应用中去掉标题栏的方法
- android应用中去掉标题栏的方法
- 去掉标题栏,通知栏的集中方法
- android应用中去掉标题栏的方法
- android应用中去掉标题栏的方法
- UIScrollView基本使用
- 用户添加sudo权限
- PHP数据库操作
- nyoj--148 fibonacci数列(二)(矩阵快速幂)
- JFinal学习(二)
- 安卓6.0去掉标题栏的方法
- 几个常用的JS代码
- Java总结篇系列:类型转换/造型
- iOS cell分割线长度设置
- java基本规则
- Shell脚本
- UIScrollView使用自动布局不能滑动的解决方法
- js 监测页面回车事件,载入加载事件
- eXtremeDB compiling error based on vxworks ppcgnu