Theme in Android means applying the same style to a single activity or whole application .
Note:
- If you will apply theme to a single activity then the style will appear to that particular activity .
- If you will apply theme to whole application then the style will appear to the whole application.
Now lets us learn how to change the theme in android.
- Now start with a project by selecting new-> file-> Android Application Project.
- Fill the following details in the project.
- Application Name- AndroidTheme
- Project Name -AndroidTheme
- Package Name- theme.android
- Minimum required SDK - 2.2 froyo and then click next and next then finish.
- Now open your project explorer you will see the following three folder under res folder.
- value - it contain themes and styles for android API 10 and lower version.
- value-v11- it contain themes and styles for Android API 11 to API 13.
- value-v14- it contain themes and styles for Android API 14 and Higher.
- Lets change the theme,Open the values-v14 folder because here i have configured my emulator for android 4.1(API 16) then open styles.xml
- In styles.xml you will see the following line .here the themeTheme.Holo.Light.DarkActionBar
<resources>
<style name="AppTheme" parent="android:Theme.Holo.Light.DarkActionBar" />
</resources>
- Now we will change the theme ie. Theme.Holo.Light.NoActionBar so final code will look like this.
<resources>
<style name="AppTheme" parent="android:Theme.Holo.Light.NoActionBar" />
</resources>
- Now when you will run this you will see following change.
|
(Before)Theme.Holo.Light.DarkActionBar |
|
(After)Theme.Holo.Light.NoActionBar |
I don't cerebrate some of websites offer this typewrite of assemblage. premium wordpress themes
ReplyDelete