Advertisement
Guest User

Untitled

a guest
Jul 7th, 2015
230
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.34 KB | None | 0 0
  1. <application
  2. android:allowBackup="true"
  3. android:icon="@drawable/logo"
  4. android:label="@string/app_name"
  5. android:largeHeap="true"
  6. android:theme="@style/CustomActionBarTheme" >
  7.  
  8.  
  9. <activity
  10. android:name="com.example.Start"
  11. android:label="@string/app_name"
  12. android:screenOrientation="portrait" >
  13. <intent-filter>
  14. <action android:name="android.intent.action.MAIN" />
  15.  
  16. <category android:name="android.intent.category.LAUNCHER" />
  17. </intent-filter>
  18. </activity>
  19. </application>
  20.  
  21. <?xml version="1.0" encoding="utf-8"?>
  22. <resources>
  23.  
  24. <!-- the theme applied to the application or activity -->
  25. <style name="CustomActionBarTheme" parent="@style/Theme.AppCompat.Light.DarkActionBar">
  26. <item name="android:actionBarStyle">@style/MyActionBar</item>
  27. <item name="android:actionBarTabStyle">@style/MyActionBarTabs</item>
  28.  
  29. <!-- Support library compatibility -->
  30.  
  31. <item name="android:actionBarTabTextStyle">@style/MyTheme.ActionBar.TabText</item>
  32. <item name="android:actionBarTabBarStyle">@style/Divider</item>
  33. </style>
  34.  
  35. <!-- for Tab divider -->
  36. <style name="Divider" parent="@android:style/Widget.Holo.ActionBar.TabBar">
  37. <item name="android:divider">@android:color/transparent</item> //or use your transparent drawable image
  38. <item name="android:showDividers">middle</item>
  39. <item name="android:dividerPadding">0dp</item>
  40. </style>
  41.  
  42. <!-- ActionBar styles -->
  43. <style name="MyActionBar" parent="@style/Widget.AppCompat.Light.ActionBar.Solid.Inverse">
  44. <item name="android:background">@color/easy</item>
  45. <!-- Support library compatibility -->
  46. <item name="background">@color/easy</item>
  47. </style>
  48.  
  49. <style name="MyActionBarTabs" parent="@style/Widget.AppCompat.ActionBar.TabView">
  50. <item name="android:background">@drawable/actionbar_tab_indicator</item>
  51. </style>
  52.  
  53. <style name="MyTheme.ActionBar.TabText" parent="android:style/Widget.Holo.ActionBar.TabText">
  54.  
  55. <!-- This is a Black text color when selected and a WHITE color otherwise -->
  56. <item name="android:textColor">@color/selector_tab_text</item>
  57. </style>
  58.  
  59. </resources>
  60.  
  61. getSupportActionBar().setIcon(R.drawable.ic_your_icon);
  62.  
  63. <item name="colorPrimary">@color/your_color</item>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement