Looks like you didn't apply the theme

On Fri, Dec 5, 2014, 12:11 AM Benny Thompson <ben.d.tho...@gmail.com> wrote:

> I have configured a very basic theme for an app using AppCompat v7.  No
> matter what I try, my theme is not applied, the colors are off, and my
> ListView is semi-transparent (see screenshot).  Any ideas what I'm doing or
> is this a bug in resource generation?
>
> I'm using Macroid, here is my layout:
>
>   override def onCreate(savedInstanceState: Bundle) = {
>     super.onCreate(savedInstanceState)
>
>     val items =
> getResources.getStringArray(R.array.list_items).map(MenuItem)
>     var toolbar = slot[Toolbar]
>
>     val view = l[VerticalLinearLayout](
>       w[Toolbar] <~ matchWidth <~ wire(toolbar) <~ Tweak[Toolbar] { t =>
>         t.setPopupTheme(R.style.AppTheme)
>         setSupportActionBar(t)
>         getSupportActionBar.setDisplayHomeAsUpEnabled(true)
>         getSupportActionBar.setHomeButtonEnabled(true)
>       },
>       l[DrawerLayout](
>         f[WorkOrderFragment].framed(Id.something, Tag.elss) <~ matchParent,
>         w[ListView] <~ matchParent <~ ListTweaks.noDivider <~
> BgTweaks.color(R.color.red) <~ userListable.listAdapterTweak(items)
>           <~ Tweak[ListView] { lv =>
>             val p = new DrawerLayout.LayoutParams(240 dp,
> LayoutParams.MATCH_PARENT, GravityCompat.START)
>             lv.setLayoutParams(p)
>             lv.setAlpha(1)
>           }
>       ) <~ matchParent <~ Tweak[DrawerLayout] { d =>
>         d.setDrawerShadow(R.drawable.drawer_shadow, GravityCompat.START)
>
>         actionBarDrawerToggle = new
> ActionBarDrawerToggle(MainActivity.this, d, toolbar.get, R.string.app_name,
> R.string.app_name)
>         d.setDrawerListener(actionBarDrawerToggle)
>       }
>     ) <~ matchParent
>
>     setContentView(getUi(view))
>   }
>
>
>  Here's my styles.xml:
>
> <?xml version="1.0" encoding="utf-8"?>
> <resources>
>     <!-- Base application theme. -->
>     <style name="AppTheme" parent="Theme.AppCompat.Light">
>         <item name="windowActionBar">false</item>
>         <item name="android:windowNoTitle">true</item>
>         <item name="colorPrimary">#ff0000</item>
>         <item name="android:colorPrimary">#ff0000</item>
>         <item name="colorPrimaryDark">#ff0000</item>
>         <item name="colorAccent">@color/light_green</item>
>     </style>
>
>     <style name="ToolbarCustomIconColor" parent="AppTheme">
>         <!-- android:textColorSecondary is used for coloring the
> navigation drawer icon and up arrow. -->
>         <item name="android:textColorSecondary">#FFFFFFFF</item>
>     </style>
> </resources>
>
>
> And here's what it looks like:
>
>
> <https://lh3.googleusercontent.com/-5AzUEW4eo8g/VIFoonSv1rI/AAAAAAAAAG8/Gh42VASWq1c/s1600/Screen%2BShot%2B2014-12-05%2Bat%2B2.10.58%2BAM.png>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "scala-on-android" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to scala-on-android+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"scala-on-android" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to scala-on-android+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to