Tweak divider in drawer
This commit is contained in:
parent
5a83fbde95
commit
e6920e32d4
2 changed files with 10 additions and 6 deletions
|
@ -261,7 +261,7 @@ class K9Drawer(private val parent: MessageList, savedInstanceState: Bundle?) : K
|
|||
}
|
||||
|
||||
sliderView.addItems(unifiedInboxItem)
|
||||
sliderView.addItems(DividerDrawerItem())
|
||||
sliderView.addItems(FixedDividerDrawerItem(identifier = DRAWER_ID_DIVIDER))
|
||||
|
||||
if (unifiedInboxSelected) {
|
||||
openedFolderDrawerId = DRAWER_ID_UNIFIED_INBOX
|
||||
|
@ -388,12 +388,13 @@ class K9Drawer(private val parent: MessageList, savedInstanceState: Bundle?) : K
|
|||
|
||||
companion object {
|
||||
// Bit shift for identifiers of user folders items, to leave space for other items
|
||||
private const val DRAWER_FOLDER_SHIFT: Int = 2
|
||||
private const val DRAWER_ACCOUNT_SHIFT: Int = 16
|
||||
private const val DRAWER_FOLDER_SHIFT: Int = 20
|
||||
private const val DRAWER_ACCOUNT_SHIFT: Int = 3
|
||||
|
||||
private const val DRAWER_ID_UNIFIED_INBOX: Long = 0
|
||||
private const val DRAWER_ID_PREFERENCES: Long = 1
|
||||
private const val DRAWER_ID_FOLDERS: Long = 2
|
||||
private const val DRAWER_ID_DIVIDER: Long = 1
|
||||
private const val DRAWER_ID_PREFERENCES: Long = 2
|
||||
private const val DRAWER_ID_FOLDERS: Long = 3
|
||||
|
||||
private const val PROGRESS_VIEW_END_OFFSET = 32
|
||||
private const val PROGRESS_VIEW_SLINGSHOT_DISTANCE = 48
|
||||
|
@ -412,3 +413,5 @@ private fun Context.obtainDrawerTextColor(): Int {
|
|||
|
||||
return textColor
|
||||
}
|
||||
|
||||
private class FixedDividerDrawerItem(override var identifier: Long) : DividerDrawerItem()
|
||||
|
|
|
@ -52,16 +52,17 @@
|
|||
<item name="materialDrawerPrimaryIcon">?android:textColorSecondary</item>
|
||||
<item name="materialDrawerSecondaryText">?android:textColorSecondary</item>
|
||||
<item name="materialDrawerSecondaryIcon">?android:textColorSecondary</item>
|
||||
<item name="materialDrawerDividerColor">?android:textColorHint</item>
|
||||
<item name="materialDrawerSelectedBackgroundColor">?colorAccent</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.MaterialDrawerStyle.K9.Light" parent="Widget.MaterialDrawerStyle.K9">
|
||||
<item name="materialDrawerInsetForeground">#5aaa</item>
|
||||
<item name="materialDrawerDividerColor">#eee</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.MaterialDrawerStyle.K9.Dark" parent="Widget.MaterialDrawerStyle.K9">
|
||||
<item name="materialDrawerInsetForeground">#4000</item>
|
||||
<item name="materialDrawerDividerColor">#444</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.MaterialDrawerHeaderStyle.K9">
|
||||
|
|
Loading…
Reference in a new issue