- 食用指南:
- 框架/语言:
- 问题描述:
- 解决方案:
- 安利时间:
框架使用过程中的问题首先要注意弃用方法的现有替代 & 引入内容本身是否有限制
当你在CSDN等网站查找不到最新版本框架的问题解决,别迟疑,马上去Goole
语言问题比框架问题稳定
如果本篇debug博客解决了你的问题,不妨留下你的👍
欢迎关注博主,查看更多c/c++/JAVA/算法/框架知识
- android studio 中的 xml配置文件
-
当我们想要隐藏掉Android studio自带的顶部ActionBar
-
查阅资料后发现只需要themes文件中style标签的parent选择为NoActionBar:
<resources xmlns:tools="http://schemas.android.com/tools">
<style name="此处默认是你的项目名" parent="Theme.AppCompat.Light.NoActionBar">
- "colorPrimary"
>@color/purple_500
- "colorPrimaryVariant"
>@color/purple_700
- "colorOnPrimary">@color/white
- "colorSecondary">@color/teal_200
- "colorSecondaryVariant">@color/teal_700
- "colorOnSecondary">@color/black
- "android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant
style>
resources>
- 修改后重新运行发现APP端并没有去掉ActionBar
- 需要将themes文件中style标签中的name重命名,不要采用默认的项目名称了
- 先修改style的name:
<resources xmlns:tools="http://schemas.android.com/tools">
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
- "colorPrimary"
>@color/purple_500
- "colorPrimaryVariant"
>@color/purple_700
- "colorOnPrimary">@color/white
- "colorSecondary">@color/teal_200
- "colorSecondaryVariant">@color/teal_700
- "colorOnSecondary">@color/black
- "android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant
style>
resources>
- 再修改清单文件maifest中android:theme = “@style/重命名的style名称”
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.finall">
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<application
android:allowBackup="true"
android:icon="@drawable/icon1"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:usesCleartextTraffic="true"
android:theme="@style/AppTheme">
<activity
android:name=".MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
intent-filter>
activity>
application>
manifest>
安利时间:
-
如果本篇博客解决了你的问题,不妨留下你的👍
让博主知道原来也有小伙伴在同一个坑摔倒了啊hh
-
欢迎关注大二的博主,在学习C/C++/JAVA/算法/框架的路上作伴
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)