Loading app/ui/src/main/java/com/fsck/k9/ui/K9Drawer.java +4 −0 Original line number Diff line number Diff line Loading @@ -5,6 +5,7 @@ import android.arch.lifecycle.Observer; import android.arch.lifecycle.ViewModelProvider; import android.arch.lifecycle.ViewModelProviders; import android.graphics.Color; import android.graphics.PorterDuff; import android.net.Uri; import android.os.Bundle; import android.support.annotation.Nullable; Loading Loading @@ -94,6 +95,7 @@ public class K9Drawer { private AccountHeader buildAccountHeader() { AccountHeaderBuilder headerBuilder = new AccountHeaderBuilder() .withActivity(parent) .withHeaderBackground(R.drawable.drawer_header_background) .withTranslucentStatusBar(false); if (!K9.isHideSpecialAccounts()) { Loading Loading @@ -207,6 +209,7 @@ public class K9Drawer { } else { unifiedInboxSelected = false; accountHeader.setActiveProfile((account.getAccountNumber()+1) << DRAWER_ACCOUNT_SHIFT); accountHeader.getHeaderBackgroundView().setColorFilter(account.getChipColor(), PorterDuff.Mode.OVERLAY); ViewModelProvider viewModelProvider = ViewModelProviders.of(parent, new MessageListViewModelFactory()); MessageListViewModel viewModel = viewModelProvider.get(MessageListViewModel.class); viewModel.getFolders(account).observe(parent, new Observer<List<Folder>>() { Loading Loading @@ -288,6 +291,7 @@ public class K9Drawer { unifiedInboxSelected = true; openedFolderServerId = null; accountHeader.setActiveProfile(DRAWER_ID_UNIFIED_INBOX); accountHeader.getHeaderBackgroundView().setColorFilter(0xFFFFFFFF, PorterDuff.Mode.MULTIPLY); clearUserFolders(); } Loading app/ui/src/main/res/drawable/drawer_header_background.xml 0 → 100644 +11 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" > <gradient android:angle="45" android:centerColor="#777" android:endColor="#444" android:startColor="#555" android:type="linear" /> <corners android:radius="0dp"/> </shape> No newline at end of file app/ui/src/main/res/values/colors.xml +0 −2 Original line number Diff line number Diff line Loading @@ -9,6 +9,4 @@ <color name="status_ok_checkmark">#7bad45</color> <color name="drawer_background">#666666</color> <color name="material_drawer_header_selection_text">@color/material_drawer_primary_text</color> </resources> Loading
app/ui/src/main/java/com/fsck/k9/ui/K9Drawer.java +4 −0 Original line number Diff line number Diff line Loading @@ -5,6 +5,7 @@ import android.arch.lifecycle.Observer; import android.arch.lifecycle.ViewModelProvider; import android.arch.lifecycle.ViewModelProviders; import android.graphics.Color; import android.graphics.PorterDuff; import android.net.Uri; import android.os.Bundle; import android.support.annotation.Nullable; Loading Loading @@ -94,6 +95,7 @@ public class K9Drawer { private AccountHeader buildAccountHeader() { AccountHeaderBuilder headerBuilder = new AccountHeaderBuilder() .withActivity(parent) .withHeaderBackground(R.drawable.drawer_header_background) .withTranslucentStatusBar(false); if (!K9.isHideSpecialAccounts()) { Loading Loading @@ -207,6 +209,7 @@ public class K9Drawer { } else { unifiedInboxSelected = false; accountHeader.setActiveProfile((account.getAccountNumber()+1) << DRAWER_ACCOUNT_SHIFT); accountHeader.getHeaderBackgroundView().setColorFilter(account.getChipColor(), PorterDuff.Mode.OVERLAY); ViewModelProvider viewModelProvider = ViewModelProviders.of(parent, new MessageListViewModelFactory()); MessageListViewModel viewModel = viewModelProvider.get(MessageListViewModel.class); viewModel.getFolders(account).observe(parent, new Observer<List<Folder>>() { Loading Loading @@ -288,6 +291,7 @@ public class K9Drawer { unifiedInboxSelected = true; openedFolderServerId = null; accountHeader.setActiveProfile(DRAWER_ID_UNIFIED_INBOX); accountHeader.getHeaderBackgroundView().setColorFilter(0xFFFFFFFF, PorterDuff.Mode.MULTIPLY); clearUserFolders(); } Loading
app/ui/src/main/res/drawable/drawer_header_background.xml 0 → 100644 +11 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" > <gradient android:angle="45" android:centerColor="#777" android:endColor="#444" android:startColor="#555" android:type="linear" /> <corners android:radius="0dp"/> </shape> No newline at end of file
app/ui/src/main/res/values/colors.xml +0 −2 Original line number Diff line number Diff line Loading @@ -9,6 +9,4 @@ <color name="status_ok_checkmark">#7bad45</color> <color name="drawer_background">#666666</color> <color name="material_drawer_header_selection_text">@color/material_drawer_primary_text</color> </resources>