简体   繁体   中英

How to apply theme in AndroidManifest.xml ?

I am developing fragments tabs,in that I want to develop tabs and page indicators. For this purpose I am using Jack Wharton's ViewPagerIndicator project, but the tabs showing normal view no indicator is getting. I am not unable to applying theme as android:theme="@style/Theme.PageIndicatorDefaults in manifest file how can i applying theme.

How i can apply this theme for fragments in mnanifest file. ?

<?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>

set

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

instead of:

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

Bye. ;)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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