EditTexts in the tag editors are dynamically themed, also fixed toolbar gravity in tag editors

This commit is contained in:
Aidan Follestad 2015-04-16 18:22:44 -05:00
commit 22c701a5f0
3 changed files with 49 additions and 13 deletions

View file

@ -0,0 +1,34 @@
package com.kabouzeid.gramophone.views;
import android.content.Context;
import android.support.v7.internal.widget.TintCheckBox;
import android.util.AttributeSet;
import com.afollestad.materialdialogs.ThemeSingleton;
import com.afollestad.materialdialogs.internal.MDTintHelper;
/**
* @author Aidan Follestad (afollestad)
*/
public class DynamicEditText extends TintCheckBox {
public DynamicEditText(Context context) {
super(context);
init();
}
public DynamicEditText(Context context, AttributeSet attrs) {
super(context, attrs);
init();
}
public DynamicEditText(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
init();
}
private void init() {
final int color = ThemeSingleton.get().positiveColor;
MDTintHelper.setTint(this, color);
}
}