Crosslight 5 Android Material

15 replies. Last post: July 15, 2016 9:51 AM by Thomas Albert
Tags :
  • New Discussion
  • New Question
  • New Product Feedback

Hello Crosslight Support,

I have several questions about the new material UI:

1. How can I programmatically change the drawer icon (hamburger icon)? I tried the following,but it did nothing.

this.DrawerSettings.ActionBarDrawerIcon = Resource.Drawable.ic_bar_done;


2. How can I (programmatically) change the color of the drawer icon? Is there some "tint" I can set?


3. How can I (programmatically) change the color of the list icons (like in the navigation list)? Is there some "tint" I can set? The idea is to have the icons in one color and to set the definite color in code (like icon tint color = Color.Red).

4. Is there some documentation about how to style every part of the app (e.g. background of list group headers)?

5. To me it seems like your current styling method is not theme friendly. In the samples you have a colors.xml to set the app colors. What if I want to switch the current theme of the app at runtime? I have created the following theme in the styles.xml:

<style name="Theme.Green" parent="Theme.Crosslight.Material.Light">
<item name="colorPrimary">@color/primary_green</item>
...
</style>

primary_green is set in the colors.xml to #4caf50.
primary is set in the colors.xml to #FF00DC.

When I start the app (data drawer samples) and navigate to a list with group headers, then the text color of the group header is #FF00DC, which is the primary color.
To support a theme the colorPrimary of the theme should be used to set the group header color. Otherwise it is not possible to switch the theme at runtime.
Maybe I am getting or doing something wrong.

Thanks for your feeedback.

Thomas

All times are GMT -5. The time now is 7:59 PM.
Previous Next