EditTexts in the tag editors are dynamically themed, also fixed toolbar gravity in tag editors
This commit is contained in:
parent
e07614d065
commit
22c701a5f0
3 changed files with 49 additions and 13 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue