tint action bar icon

Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
This commit is contained in:
tobiasKaminsky 2018-05-29 09:04:39 +02:00 committed by AndyScherzinger
parent 1c6fec7192
commit ebb04db951
No known key found for this signature in database
GPG key ID: 6CADC7E3523C308B

View file

@ -30,6 +30,7 @@ import android.accounts.AccountManagerFuture;
import android.content.Context;
import android.content.Intent;
import android.content.res.Configuration;
import android.graphics.PorterDuff;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.LayerDrawable;
@ -39,6 +40,7 @@ import android.support.design.widget.NavigationView;
import android.support.v4.view.GravityCompat;
import android.support.v4.widget.DrawerLayout;
import android.support.v7.app.ActionBarDrawerToggle;
import android.support.v7.graphics.drawable.DrawerArrowDrawable;
import android.text.Html;
import android.text.TextUtils;
import android.view.Menu;
@ -718,12 +720,18 @@ public abstract class DrawerActivity extends ToolbarActivity implements DisplayU
protected void updateActionBarTitleAndHomeButton(OCFile chosenFile) {
super.updateActionBarTitleAndHomeButton(chosenFile);
/// set home button properties
// set home button properties
if (mDrawerToggle != null && chosenFile != null) {
mDrawerToggle.setDrawerIndicatorEnabled(isRoot(chosenFile));
} else if (mDrawerToggle != null){
mDrawerToggle.setDrawerIndicatorEnabled(false);
}
if (mDrawerToggle != null) {
DrawerArrowDrawable icon = mDrawerToggle.getDrawerArrowDrawable();
icon.setColorFilter(ThemeUtils.fontColor(this), PorterDuff.Mode.SRC_ATOP);
mDrawerToggle.setDrawerArrowDrawable(icon);
}
}
/**