我不小心在布局中做了一些事情,现在我的所有活动都是深色的,白色文字“在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>
答案 0 :(得分:2)
您已在活动中设置android:theme="@android:style/Theme.NoTitleBar"
,该样式将为您提供Holo Dark主题。
你必须用
替换它android:theme="@android:style/Theme.Light.NoTitleBar"