Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/stefan-niedermann/nextcloud-deck.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Niedermann <info@niedermann.it>2020-06-27 19:57:53 +0300
committerNiedermann IT-Dienstleistungen <stefan-niedermann@users.noreply.github.com>2020-06-30 13:58:19 +0300
commitfbd95851e3c3c9dd03fc536a6f786282a3ed3167 (patch)
treeaedfd9dc3e121987d423cb790cac2c6bc4344ab9 /app/src/main/java/it/niedermann/nextcloud
parent1ff26ee3deec7398b6d7909819cfe91862c362e7 (diff)
#525 Adjust design to new style of Nextcloud app
Menu Action Drawer Toggle
Diffstat (limited to 'app/src/main/java/it/niedermann/nextcloud')
-rw-r--r--app/src/main/java/it/niedermann/nextcloud/deck/ui/MainActivity.java7
1 files changed, 3 insertions, 4 deletions
diff --git a/app/src/main/java/it/niedermann/nextcloud/deck/ui/MainActivity.java b/app/src/main/java/it/niedermann/nextcloud/deck/ui/MainActivity.java
index 20c93e336..63182e9f7 100644
--- a/app/src/main/java/it/niedermann/nextcloud/deck/ui/MainActivity.java
+++ b/app/src/main/java/it/niedermann/nextcloud/deck/ui/MainActivity.java
@@ -26,6 +26,7 @@ import androidx.annotation.RequiresApi;
import androidx.annotation.UiThread;
import androidx.appcompat.app.ActionBarDrawerToggle;
import androidx.appcompat.app.AppCompatDelegate;
+import androidx.core.content.ContextCompat;
import androidx.core.graphics.drawable.DrawableCompat;
import androidx.core.util.Pair;
import androidx.core.view.GravityCompat;
@@ -121,7 +122,6 @@ public class MainActivity extends BrandedActivity implements DeleteStackListener
protected static final int ACTIVITY_SETTINGS = 2;
public static final int ACTIVITY_MANAGE_ACCOUNTS = 4;
- private ActionBarDrawerToggle toggle;
@NonNull
protected List<Account> accountsList = new ArrayList<>();
protected SyncManager syncManager;
@@ -175,7 +175,8 @@ public class MainActivity extends BrandedActivity implements DeleteStackListener
setSupportActionBar(binding.toolbar);
- toggle = new ActionBarDrawerToggle(this, binding.drawerLayout, binding.toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close);
+ final ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(this, binding.drawerLayout, binding.toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close);
+ toggle.getDrawerArrowDrawable().setColor(ContextCompat.getColor(this, R.color.accent));
binding.drawerLayout.addDrawerListener(toggle);
toggle.syncState();
@@ -419,7 +420,6 @@ public class MainActivity extends BrandedActivity implements DeleteStackListener
applyBrandToFAB(mainColor, binding.fab);
-
// Is null as soon as the avatar has been set
// @Nullable
// Drawable accountSwitcherDrawable = binding.accountSwitcher.getDrawable();
@@ -427,7 +427,6 @@ public class MainActivity extends BrandedActivity implements DeleteStackListener
// DrawableCompat.setTint(accountSwitcherDrawable, textColor);
// }
DrawableCompat.setTint(headerBinding.logo.getDrawable(), ColorUtil.contrastRatioIsSufficient(mainColor, Color.WHITE) ? Color.WHITE : Color.BLACK);
-
headerBinding.headerView.setBackgroundColor(mainColor);
headerBinding.appName.setTextColor(ColorUtil.contrastRatioIsSufficient(mainColor, Color.WHITE) ? Color.WHITE : Color.BLACK);
}