NoTitleBar找不到&NoTitleBar不属于&加载不了NoTitleBar
来源:互联网 发布:网络时间校准到秒 编辑:程序博客网 时间:2024/06/15 09:46
遇到这样问题,刚开始我是在每个Activity里面加载了一个方法
private void noTitle() { requestWindowFeature(Window.FEATURE_NO_TITLE); if (getSupportActionBar() != null) { getSupportActionBar().hide(); }}
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); noTitle(); setContentView(R.layout.activity_main); drawer = (DrawerLayout) findViewById(R.id.drawer_layout); NavigationView navigationView = (NavigationView) findViewById(R.id.nav_view); navigationView.setNavigationItemSelectedListener(this);}是定义了一个noTitle的方法,在super.onCreate的方法和 setContentView的方法之间调用就可以;其实这个方法可以实现;可以用
但是最根本的问题就是解决布局文件里面的Them的问题
强调我们改布局文件不是改的如下图所示的位置!!!不是改这个位置的Them!!!!不是改这个位置的Them!!!!
不是改的上面的APPTheme的位置,不是你想的改成NOTitleBar就可以的要改的位置是要你点击cmd加鼠标左键进去这个方法
CMD+鼠标左键点击AppThem!!!!!
CMD+鼠标左键点击AppThem!!!!!
CMD+鼠标左键点击AppThem!!!!!
然后进入下图的位置来改成NotitileBar
把这里的改成NOActionBar就可以了
0 0
- NoTitleBar找不到&NoTitleBar不属于&加载不了NoTitleBar
- android:style/Theme.NoTitleBar
- Theme.NoTitleBar问题
- android 永久NotitleBar
- style/Theme.NoTitleBar崩溃
- 为什么在AndroidManifest.xml中Activity的theme用不了Theme.Light.NoTitleBar?
- android:theme="@android:style/Theme.NoTitleBar"
- android:theme="@android:style/Theme.NoTitleBar"
- android的Theme.Light.NoTitleBar和Theme.Light.NoTitleBar.Fullscreen的区别
- 设置Theme.NoTitleBar后Activity背景变成黑色
- 解决安卓添加Theme.NoTitleBar报错问题
- AS Theme.Light.NoTitleBar dialog 背景色仍为黑色
- 安卓 Theme.NoTitleBar 添加之后崩溃的问题
- 解决使用Theme.Black.NoTitleBar闪退问题
- [Androidstudio]的坑之【@android:style/Theme.Black.NoTitleBar】
- 安卓NoTitleBar的style下关于switch的坑
- 解决无法在theme中设置NoTitleBar属性的问题
- android编程取消标题栏方法(appcompat_v7、Theme.NoTitleBar)
- Apache
- Python 拷贝对象(深拷贝deepcopy与浅拷贝copy)
- POJ 2528(线段树 区间更新 离散化)
- 1
- Magento 1.x 入门之系列教程一
- NoTitleBar找不到&NoTitleBar不属于&加载不了NoTitleBar
- Android 之 BroadcastReceiver (一) 相关知识
- Android基础之知识体系
- 2
- TREC Real-Time Summarization Track
- 不是每个人都可以是程序员
- 一句话代码
- DBUtils框架及其使用
- Centos7网络配置