繁体   English   中英

如何为所有android应用程序设置Holo light主题

[英]How to set Holo light theme for all android application

我无意间在布局中做了一些操作,现在我所有的活动都在“ TextViews内部”中用白色文字显示为深色,而在我搜索互联网时,我所有的活动都用黑色文字显示为灰色,因此我相信我从某种程度上改变了所有活动从“ Holo light”到“ Holo dark”,如何获得默认主题?

PS。 我不认为问题出在布局上,因为我没有触摸它们。 PS。 这是我的清单:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.excellence.youniversity"
android:versionCode="2"
android:versionName="1.1" >

<uses-sdk
    android:minSdkVersion="9"
    android:targetSdkVersion="22" />

<supports-screens
    android:largeScreens="true"
    android:normalScreens="true"
    android:resizeable="true"
    android:smallScreens="true" />

<application
    android:allowBackup="true"
    android:icon="@drawable/blue"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >
    <activity
        android:name=".MainActivity"
        android:label="@string/app_name"
        android:theme="@android:style/Theme.NoTitleBar" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <activity
        android:name=".CoursesActivity"
        android:label="@string/title_activity_courses"
        android:theme="@android:style/Theme.NoTitleBar" >
    </activity>
    <activity
        android:name=".Technology"
        android:label="@string/title_activity_technology"
        android:theme="@android:style/Theme.NoTitleBar" >
    </activity>
    <activity
        android:name=".Science"
        android:label="@string/title_activity_science"
        android:theme="@android:style/Theme.NoTitleBar" >
    </activity>
    <activity
        android:name=".Langauges"
        android:label="@string/title_activity_langauges"
        android:theme="@android:style/Theme.NoTitleBar" >
    </activity>
    <activity
        android:name=".Thinking"
        android:label="@string/title_activity_thinking"
        android:theme="@android:style/Theme.NoTitleBar" >
    </activity>
    <activity
        android:name=".Art"
        android:label="@string/title_activity_art"
        android:theme="@android:style/Theme.NoTitleBar" >
    </activity>
    <activity
        android:name=".Medicine"
        android:label="@string/title_activity_medicine"
        android:theme="@android:style/Theme.NoTitleBar" >
    </activity>
    <activity
        android:name=".RoboticActivity"
        android:label="@string/title_activity_robotic"
        android:theme="@android:style/Theme.NoTitleBar" >
    </activity>
    <activity
        android:name=".TechActivity"
        android:label="@string/title_activity_tech"
        android:theme="@android:style/Theme.NoTitleBar" >
    </activity>
    <activity
        android:name=".AndroidActivity"
        android:label="@string/title_activity_android"
        android:theme="@android:style/Theme.NoTitleBar" >
    </activity>
    <activity
        android:name=".WedooActivity"
        android:label="@string/title_activity_wedoo"
        android:theme="@android:style/Theme.NoTitleBar" >
    </activity>
    <activity
        android:name=".AndroiddActivity"
        android:label="@string/title_activity_androidd"
        android:theme="@android:style/Theme.NoTitleBar" >
    </activity>
    <activity
        android:name=".CSIActivity"
        android:label="@string/title_activity_csi"
        android:theme="@android:style/Theme.NoTitleBar" >
    </activity>
    <activity
        android:name=".ChemistryActivity"
        android:label="@string/title_activity_chemistry"
        android:theme="@android:style/Theme.NoTitleBar" >
    </activity>
    <activity
        android:name=".AstronomyActivity"
        android:label="@string/title_activity_astronomy"
        android:theme="@android:style/Theme.NoTitleBar" >
    </activity>
    <activity
        android:name=".ArchitectureActivity"
        android:label="@string/title_activity_architecture"
        android:theme="@android:style/Theme.NoTitleBar" >
    </activity>
    <activity
        android:name=".AstronomyyActivity"
        android:label="@string/title_activity_astronomyy"
        android:theme="@android:style/Theme.NoTitleBar" >
    </activity>
    <activity
        android:name=".FashionActivity"
        android:label="@string/title_activity_fashion"
        android:theme="@android:style/Theme.NoTitleBar" >
    </activity>
    <activity
        android:name=".PhotographyActivity"
        android:label="@string/title_activity_photography"
        android:theme="@android:style/Theme.NoTitleBar" >
    </activity>
    <activity
        android:name=".VideoActivity"
        android:label="@string/title_activity_video"
        android:theme="@android:style/Theme.NoTitleBar" >
    </activity>
    <activity
        android:name=".EnglishActivity"
        android:label="@string/title_activity_english"
        android:theme="@android:style/Theme.NoTitleBar" >
    </activity>
    <activity
        android:name=".ChessActivity"
        android:label="@string/title_activity_chess"
        android:theme="@android:style/Theme.NoTitleBar" >
    </activity>
    <activity
        android:name=".BudActivity"
        android:label="@string/title_activity_bud"
        android:theme="@android:style/Theme.NoTitleBar" >
    </activity>
    <activity
        android:name=".FirstaidActivity"
        android:label="@string/title_activity_firstaid"
        android:theme="@android:style/Theme.NoTitleBar" >
    </activity>
    <activity
        android:name=".AboutUs"
        android:label="@string/title_activity_about_us"
        android:theme="@android:style/Theme.NoTitleBar" >
    </activity>
</application>
</manifest>

这是values文件夹中的Styles.xml

<!--
    Base application theme, dependent on API level. This theme is replaced
    by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
-->
<style name="AppBaseTheme" parent="Theme.AppCompat.Light">
    <!--
        Theme customizations available in newer API levels can go in
        res/values-vXX/styles.xml, while customizations related to
        backward-compatibility can go here.
    -->
</style>

<!-- Application theme. -->
<style name="AppTheme" parent="AppBaseTheme">
    <!-- All customizations that are NOT specific to a particular API-level can go here. -->
</style>

您已经在活动中设置了android:theme="@android:style/Theme.NoTitleBar" ,该样式将为您提供Holo Dark主题。

您必须将其替换为

android:theme="@android:style/Theme.Light.NoTitleBar"

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM