Android provides other built-in resouces using in android project.
He we can see how to set System wallpaper as our application wallpaper.
To set this theme for all the activites of your application,
Use android:theme attribute with the theme name to <application> tag in AndroidManifest file
To set this theme for one Acitivty in your application,
Use android:theme attribute with the theme name to <acitvity> tag in Android Manifest file.
AndroidManifest file (Apply theme for all the activities of your application)
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@android:style/Theme.Wallpaper" >
For only Specific Activity
<activity
android:name="com.androidsurya.usewallpaper"
android:label="@string/app_name"
android:theme="@android:style/Theme.Wallpaper" >
Output Screenshot:
To set this theme for all the activites of your application,
Use android:theme attribute with the theme name to <application> tag in AndroidManifest file
To set this theme for one Acitivty in your application,
Use android:theme attribute with the theme name to <acitvity> tag in Android Manifest file.
AndroidManifest file (Apply theme for all the activities of your application)
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@android:style/Theme.Wallpaper" >
For only Specific Activity
<activity
android:name="com.androidsurya.usewallpaper"
android:label="@string/app_name"
android:theme="@android:style/Theme.Wallpaper" >
Output Screenshot:
No comments:
Post a Comment