Pregunta

I've followed those instructions and I've created MyStyle with Android Action Bar Style Generator, but my style is not working, I can't see my colors.

I have a styles_mystyle.xmlwith

<style name="Theme.Mystyle" parent="@style/Theme.Sherlock.Light">

and in AndroidManifest.xml

<application
    //...
    android:theme="@style/Theme.Mystyle" >

So I don't know where is the problem. Can you help me? My code is exactly the same as the one in previous links.

¿Fue útil?

Solución

The style generator creates a theme for ActionBar tabs. The ViewPager looks similar but requires a different set of defined styles. You can find examples for the ViewPagerIndicator styles here:

https://github.com/JakeWharton/Android-ViewPagerIndicator/blob/master/sample/res/values/styles.xml

Alternatively, you can use the styles created from the style generator by using ActionBar tabs instead of the ViewPagerIndicator.

VERY Basic actionbarsherlock tabs with fragments: FragmentTransaction is null in the onTabSelected() method

More information on tabs vs title strips can be found here:

http://developer.android.com/training/implementing-navigation/lateral.html

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top