Quantcast
Viewing all articles
Browse latest Browse all 89864

TabbedPage background on Android with AppCompat

Hello everyone,

i am trying to use Xamarin.Android.Support.v7.AppCompat in my new aplication and i saw many tutorials how to use this and i got it:

values/style.xml

<?xml version="1.0" encoding="UTF-8" ?>
<resources xmlns:tools="http://schemas.android.com/tools" xmlns:android="http://schemas.android.com/apk/res/android">

  <style name="MyTheme.Base" parent="@android:style/Theme.Holo.Light.DarkActionBar">
  </style>

  <style name="MyTheme" parent="MyTheme.Base">
    <item name="android:windowBackground">@android:color/white</item>
    <item name="android:actionBarStyle">@style/MyTheme.ActionBarStyle</item>
  </style>

  <style name="MyTheme.ActionBarStyle" parent="@android:style/Widget.Holo.Light.ActionBar">
    <item name="android:titleTextStyle">@style/MyTheme.ActionBar.TitleTextStyle</item>
    <item name="android:background">@color/primary</item>
  </style>

    <style name="MyTheme.ActionBar.TitleTextStyle" parent="@android:style/TextAppearance.Holo.Widget.ActionBar.Title">
      <item name="android:textColor">@android:color/white</item>
    </style>

  <style name="MyActionBarTabText" parent="@android:style/Widget.Holo.ActionBar.TabText">
    <item name="android:textColor">#FFFFFF</item>
  </style>

</resources>

values-v21/style.xml

<?xml version="1.0" encoding="utf-8"?>
<resources>
  <!--
        Base application theme for API 21+. This theme replaces
        MyTheme from resources/values/styles.xml on API 21+ devices.
    -->
  <style name="MyTheme" parent="MyTheme.Base">
    <item name="android:windowContentTransitions">true</item>
    <item name="android:windowAllowEnterTransitionOverlap">true</item>
    <item name="android:windowAllowReturnTransitionOverlap">true</item>
    <item name="android:windowSharedElementEnterTransition">@android:transition/move</item>
    <item name="android:windowSharedElementExitTransition">@android:transition/move</item>
    <!--<item name="android:actionBarStyle">@style/MyTheme.ActionBarStyle</item>-->
  </style>
</resources>

i want make my action bar (navigation bar) and my tabbar (TabbedPage ) the same color, like many Material design apps like WhatsApp like this:
Image may be NSFW.
Clik here to view.

but everything that i tried did not work.... my action bar gets the color but my tabbed not...
i want the tab with the same color as my actionbar and the line blue that it have i want to put the color white...

this is my actual screen with the theme applied
Image may be NSFW.
Clik here to view.

thank you all


Viewing all articles
Browse latest Browse all 89864

Trending Articles