toolbar: navigation icon & back button

This commit is contained in:
tobiasKaminsky 2017-06-14 09:13:55 +02:00
parent db7f93fd14
commit 6ab67f9c9d
No known key found for this signature in database
GPG key ID: 0E00D4D47D0C5AF7
4 changed files with 13 additions and 14 deletions

View file

@ -253,6 +253,7 @@ public abstract class DrawerActivity extends ToolbarActivity implements DisplayU
// Set the drawer toggle as the DrawerListener
mDrawerLayout.addDrawerListener(mDrawerToggle);
mDrawerToggle.setDrawerIndicatorEnabled(true);
mDrawerToggle.getDrawerArrowDrawable().setColor(DisplayUtils.fontColor());
}
/**

View file

@ -50,7 +50,6 @@ import android.support.v4.content.ContextCompat;
import android.support.v4.view.MenuItemCompat;
import android.support.v7.app.AlertDialog;
import android.support.v7.widget.SearchView;
import android.support.v7.widget.Toolbar;
import android.text.TextUtils;
import android.view.Menu;
import android.view.MenuInflater;
@ -384,10 +383,6 @@ public class FileDisplayActivity extends HookActivity
setupDrawer();
}
// update toolbar
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
toolbar.setBackgroundColor(DisplayUtils.primaryColor());
if (!stateWasRecovered) {
Log_OC.d(TAG, "Initializing Fragments in onAccountChanged..");
initFragmentsWithFile();

View file

@ -119,7 +119,7 @@ public class NotificationsActivity extends FileActivity {
// setup drawer
setupDrawer(R.id.nav_notifications);
getSupportActionBar().setTitle(getString(R.string.drawer_item_notifications));
DisplayUtils.setColoredTitle(getSupportActionBar(), getString(R.string.drawer_item_notifications));
swipeListRefreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
@Override

View file

@ -58,12 +58,20 @@ public abstract class ToolbarActivity extends BaseActivity {
if (mProgressBar != null) {
mProgressBar.setIndeterminateDrawable(
ContextCompat.getDrawable(this, R.drawable.actionbar_progress_indeterminate_horizontal));
DisplayUtils.colorToolbarProgressBar(this, DisplayUtils.primaryColor());
}
DisplayUtils.colorStatusBar(this, DisplayUtils.primaryDarkColor());
if (toolbar.getOverflowIcon() != null) {
DisplayUtils.tintDrawable(toolbar.getOverflowIcon(), DisplayUtils.fontColor());
}
if (toolbar.getNavigationIcon() != null) {
DisplayUtils.tintDrawable(toolbar.getNavigationIcon(), DisplayUtils.fontColor());
}
if (!useBackgroundImage) {
toolbar.setBackgroundColor(DisplayUtils.primaryColor());
}
@ -102,15 +110,9 @@ public abstract class ToolbarActivity extends BaseActivity {
titleToSet = title;
}
// set the chosen title
// set & color the chosen title
ActionBar actionBar = getSupportActionBar();
// color folder name
DisplayUtils.setColoredTitle(actionBar, title);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
// toolbar.setBackgroundColor(DisplayUtils.primaryColor());
DisplayUtils.setColoredTitle(actionBar, titleToSet);
// set home button properties
if (actionBar != null) {
@ -118,6 +120,7 @@ public abstract class ToolbarActivity extends BaseActivity {
actionBar.setDisplayShowTitleEnabled(true);
}
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
if (toolbar.getNavigationIcon() != null) {
DisplayUtils.tintDrawable(toolbar.getNavigationIcon(), DisplayUtils.fontColor());
}