<!-- 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> <item name="android:textColor">@android:color/black</item> <item name="mainBackground">@android:color/white</item> <item name="android:drawable">@drawable/a9</item> <item name="textContent">@string/changge_to_night</item> </style> <style name="NightAppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> <!-- Customize your theme here. --> <item name="colorPrimary">@color/nightcolorPrimary</item> <item name="colorPrimaryDark">@color/nightcolorPrimaryDark</item> <item name="colorAccent">@color/nightcolorAccent</item> <item name="android:textColor">@android:color/white</item> <item name="mainBackground">@color/nightcolorPrimaryDark</item> <item name="android:drawable">@drawable/a10</item> <item name="textContent">@string/changge_to_day</item> </style> </resources> //权限<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.bawei.qxiangmu"> <uses-permission android:name="android.permission.INTERNET"/> <uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS"/> <!-- 往SDCard写入数据权限 --> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> <!-- 震动权限 --> <uses-permission android:name="android.permission.VIBRATE"/> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/> <application android:name=".util.App" android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_round" 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> <activity android:name=".Shezhi"/> <activity android:name=".Main2Activity"> </activity> </application> </manifest>
今日头条的style类和权限
最新推荐文章于 2020-12-29 04:31:15 发布