gpt4 book ai didi

android - 如何在 AndroidManifest.xml 中应用主题?

转载 作者:太空狗 更新时间:2023-10-29 14:17:01 24 4
gpt4 key购买 nike

我正在开发 fragment 选项卡,因为我想开发选项卡和页面指示器。为此,我正在使用 Jack Wharton 的 ViewPagerIndicator 项目,但显示正常 View 的选项卡没有显示任何指示器。我不能在 list 文件中将主题应用为 android:theme="@style/Theme.PageIndicatorDefaults 我如何应用主题。

我如何将这个主题应用于 mnanifest 文件中的 fragment 。 ?

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.del"
android:versionCode="1"
android:versionName="1.0" >

<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />

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

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.example.del.MainActivity2" >
</activity>
<activity android:name="com.example.del.MainActivity3" >
</activity>
<activity android:name="com.example.del.MainActivity1" >
</activity>
</application>

</manifest>

最佳答案

设置

<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/Theme.PageIndicatorDefaults" >

代替:

<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >

再见。 ;)

关于android - 如何在 AndroidManifest.xml 中应用主题?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20988550/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com