mirror of
https://github.com/nextcloud/android.git
synced 2024-11-24 06:05:42 +03:00
toolbar: navigation icon & back button
This commit is contained in:
parent
db7f93fd14
commit
6ab67f9c9d
4 changed files with 13 additions and 14 deletions
|
@ -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());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue