vikramkakkar / SublimeNavigationView

...is a complete rewrite of NavigationView (from Design Support library) that enables - usage of Checkboxes, Switches & Badges as menu items - XML definition - Parcelable menus - collapsible/expandable menu-groups - multiple menus - custom styling.
Apache License 2.0
309 stars 42 forks source link

Expose an attr to style the divider #3

Closed vikramkakkar closed 8 years ago

vikramkakkar commented 8 years ago

At present, the divider color is hardcoded.

This was pointed out by McLeroy Ibe in comments to this post: https://plus.google.com/100964782314646213329/posts/4bnWPTvg7kU

vikramkakkar commented 8 years ago

This is now available on the dev branch.

Usage:

Define attribute snvDividerColor under your app's main theme:

<!-- Example base application theme. -->
<style name="AppThemeBase" parent="Theme.AppCompat.Light.NoActionBar">
    ....
    ....
    <item name="snvDividerColor">........</item>
</style>

Valid values are:

- hex values: #000, #a000, #ab123456, #123456
- attrs that resolve to a color: ?attr/colorAccent
- colors defined in xml: @color/my_divider_color