Friday, 1 June 2012

Use system wallpaper in android application(Total Application/Specific Activity)

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:

No comments:

Post a Comment

Android SQLite Database Viewer or Debuging with Stetho

Every Android Developer uses SQLite Database to store data into the Android Application data. But to view the data in SQLite have a lot of...