convert MainActivity to Kotlin and upgrade MaterialDrawer to version 8 (#1748)
* convert MainActivity to Kotlin * migrate to MaterialDrawer 8 * fix drawer styles * revert removing BezelImageView and material_drawer_header override * fix tests * add lost comment back to material_drawer_header.xml * add tools:parentTag to material_drawer_header.xml * use when instead of if in MainActivity * fix statusbar color over the drawer * cleanup drawer item creation * tint secondary drawer items as well * remove unnecessary ids * fix header text color in the light theme * improve header text contrast
This commit is contained in:
parent
d44eada140
commit
2cf1e366b8
22 changed files with 878 additions and 791 deletions
|
|
@ -26,7 +26,9 @@
|
|||
|
||||
<color name="transparent_tusky_blue">#8c2b90d9</color>
|
||||
<color name="transparent_black">#8f000000</color>
|
||||
<color name="header_background_filter">#44000000</color>
|
||||
<color name="header_background_filter_dark">#44000000</color>
|
||||
<color name="header_background_filter_light">#66FFFFFF</color>
|
||||
<color name="transparent_statusbar_background">#44000000</color>
|
||||
|
||||
<!-- colors used in the elephant friend drawables -->
|
||||
<color name="elephant_friend_border_color">#121419</color>
|
||||
|
|
|
|||
|
|
@ -67,14 +67,8 @@
|
|||
|
||||
<item name="textColorDisabled">@color/textColorDisabled</item>
|
||||
|
||||
<item name="material_drawer_background">@color/colorBackground</item>
|
||||
<item name="material_drawer_primary_text">@color/textColorSecondary</item>
|
||||
<item name="material_drawer_primary_icon">@color/iconColor</item>
|
||||
<item name="material_drawer_secondary_text">@color/textColorTertiary</item>
|
||||
<item name="material_drawer_hint_text">@color/textColorTertiary</item>
|
||||
<item name="material_drawer_divider">?attr/dividerColor</item>
|
||||
<item name="material_drawer_header_selection_text">@color/white</item>
|
||||
<item name="material_drawer_header_selection_subtext">@color/white</item>
|
||||
<item name="materialDrawerStyle">@style/TuskyDrawerStyle</item>
|
||||
<item name="materialDrawerHeaderStyle">@style/TuskyDrawerHeaderStyle</item>
|
||||
|
||||
<item name="alertDialogTheme">@style/TuskyDialog</item>
|
||||
<item name="snackbarButtonStyle">@style/TuskyButton.TextButton</item>
|
||||
|
|
@ -142,17 +136,26 @@
|
|||
<item name="colorBackgroundAccent">@color/tusky_grey_20</item>
|
||||
|
||||
<item name="dividerColor">@color/tusky_grey_10</item>
|
||||
|
||||
<item name="material_drawer_background">@color/black</item>
|
||||
<item name="material_drawer_primary_icon">@color/tusky_grey_40</item>
|
||||
</style>
|
||||
|
||||
<style name="TuskyBlackTheme" parent="TuskyBlackThemeBase" />
|
||||
|
||||
<style name="TuskyDrawerStyle" parent ="Widget.MaterialDrawerStyle">
|
||||
<item name="materialDrawerBackground">?android:colorBackground</item>
|
||||
<item name="materialDrawerPrimaryIcon">?iconColor</item>
|
||||
<item name="materialDrawerSecondaryIcon">?iconColor</item>
|
||||
<item name="materialDrawerDividerColor">?dividerColor</item>
|
||||
</style>
|
||||
|
||||
<style name="TuskyDrawerHeaderStyle" parent ="Widget.MaterialDrawerHeaderStyle">
|
||||
<item name="materialDrawerHeaderSelectionText">?android:textColorPrimary</item>
|
||||
<item name="materialDrawerHeaderSelectionSubtext">?android:textColorPrimary</item>
|
||||
</style>
|
||||
|
||||
<!-- customize the shape of the avatars in account selection list -->
|
||||
<style name="BezelImageView">
|
||||
<item name="biv_maskDrawable">@drawable/materialdrawer_shape_small</item>
|
||||
<item name="biv_drawCircularShadow">false</item>
|
||||
<item name="materialDrawerMaskDrawable">@drawable/materialdrawer_shape_small</item>
|
||||
<item name="materialDrawerDrawCircularShadow">false</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
|
|
|
|||
|
|
@ -19,6 +19,8 @@
|
|||
|
||||
<color name="favoriteButtonActiveColor">@color/tusky_orange_light</color>
|
||||
|
||||
<color name="headerBackgroundFilter">@color/header_background_filter_light</color>
|
||||
|
||||
<bool name="lightNavigationBar">true</bool>
|
||||
|
||||
</resources>
|
||||
Loading…
Add table
Add a link
Reference in a new issue