fixed home drawer indicator color
This commit is contained in:
parent
dd41a0a498
commit
a741047c6e
|
@ -40,7 +40,7 @@ public class ChameleonAutoCompleteTextView extends AppCompatAutoCompleteTextView
|
|||
|
||||
@Override
|
||||
public void applyAppearance(@NonNull Appearance appearance) {
|
||||
final ChameleonEditText.Appearance a = (ChameleonEditText.Appearance) appearance;
|
||||
final ChameleonTextView.Appearance a = (ChameleonTextView.Appearance) appearance;
|
||||
ChameleonTextView.Appearance.apply(this, a);
|
||||
}
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ public class ChameleonEditText extends AppCompatEditText implements ChameleonVie
|
|||
|
||||
@Override
|
||||
public void applyAppearance(@NonNull ChameleonView.Appearance appearance) {
|
||||
final Appearance a = (Appearance) appearance;
|
||||
final ChameleonTextView.Appearance a = (ChameleonTextView.Appearance) appearance;
|
||||
ChameleonTextView.Appearance.apply(this, a);
|
||||
}
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ public class ChameleonMultiAutoCompleteTextView extends AppCompatMultiAutoComple
|
|||
|
||||
@Override
|
||||
public void applyAppearance(@NonNull ChameleonView.Appearance appearance) {
|
||||
final ChameleonEditText.Appearance a = (ChameleonEditText.Appearance) appearance;
|
||||
final ChameleonTextView.Appearance a = (ChameleonTextView.Appearance) appearance;
|
||||
ChameleonTextView.Appearance.apply(this, a);
|
||||
}
|
||||
|
||||
|
|
|
@ -64,7 +64,7 @@ public class ChameleonTextView extends AppCompatTextView implements ChameleonVie
|
|||
private int linkTextColor;
|
||||
private int backgroundColor;
|
||||
|
||||
public static void apply(TextView view, ChameleonEditText.Appearance appearance) {
|
||||
public static void apply(TextView view, ChameleonTextView.Appearance appearance) {
|
||||
view.setLinkTextColor(appearance.getLinkTextColor());
|
||||
ViewCompat.setBackgroundTintList(view, ColorStateList.valueOf(appearance.getBackgroundColor()));
|
||||
setCursorTint(view, appearance.getBackgroundColor());
|
||||
|
@ -73,7 +73,7 @@ public class ChameleonTextView extends AppCompatTextView implements ChameleonVie
|
|||
}
|
||||
|
||||
public static ChameleonEditText.Appearance create(Context context, AttributeSet attributeSet, Chameleon.Theme theme) {
|
||||
ChameleonEditText.Appearance appearance = new ChameleonEditText.Appearance();
|
||||
ChameleonTextView.Appearance appearance = new ChameleonTextView.Appearance();
|
||||
ChameleonTypedArray a = ChameleonTypedArray.obtain(context, attributeSet,
|
||||
R.styleable.ChameleonEditText, theme);
|
||||
appearance.setLinkTextColor(a.getColor(R.styleable.ChameleonEditText_android_textColorLink, theme.getTextColorLink()));
|
||||
|
|
|
@ -62,6 +62,7 @@ import kotlinx.android.synthetic.main.activity_home_content.*
|
|||
import kotlinx.android.synthetic.main.layout_empty_tab_hint.*
|
||||
import org.mariotaku.abstask.library.AbstractTask
|
||||
import org.mariotaku.abstask.library.TaskStarter
|
||||
import org.mariotaku.chameleon.ChameleonUtils
|
||||
import org.mariotaku.kpreferences.get
|
||||
import org.mariotaku.kpreferences.set
|
||||
import org.mariotaku.ktextension.addOnAccountsUpdatedListenerSafe
|
||||
|
@ -113,6 +114,7 @@ class HomeActivity : BaseActivity(), OnClickListener, OnPageChangeListener, Supp
|
|||
private val homeDrawerToggleDelegate = object : ActionBarDrawerToggle.Delegate {
|
||||
override fun setActionBarUpIndicator(upDrawable: Drawable, @StringRes contentDescRes: Int) {
|
||||
drawerToggleButton.setImageDrawable(upDrawable)
|
||||
drawerToggleButton.setColorFilter(ChameleonUtils.getColorDependent(overrideTheme.colorToolbar))
|
||||
drawerToggleButton.contentDescription = getString(contentDescRes)
|
||||
}
|
||||
|
||||
|
@ -121,8 +123,8 @@ class HomeActivity : BaseActivity(), OnClickListener, OnPageChangeListener, Supp
|
|||
}
|
||||
|
||||
override fun getThemeUpIndicator(): Drawable {
|
||||
val a = TintTypedArray.obtainStyledAttributes(
|
||||
actionBarThemedContext, null, HOME_AS_UP_ATTRS)
|
||||
val a = TintTypedArray.obtainStyledAttributes(actionBarThemedContext, null,
|
||||
HOME_AS_UP_ATTRS)
|
||||
val result = a.getDrawable(0)
|
||||
a.recycle()
|
||||
return result
|
||||
|
|
Loading…
Reference in New Issue