use of com.cengalabs.flatui.views.FlatEditText in project FlatUI by eluleci.
the class MainActivity method changeTheme.
private void changeTheme(int colorReference) {
for (FlatTextView view : flatTextViews) {
view.getAttributes().setTheme(colorReference, getResources());
}
for (FlatEditText view : flatEditTexts) {
view.getAttributes().setTheme(colorReference, getResources());
}
for (FlatButton view : flatButtons) {
view.getAttributes().setTheme(colorReference, getResources());
}
for (FlatCheckBox view : flatCheckBoxes) {
view.getAttributes().setTheme(colorReference, getResources());
}
for (FlatRadioButton view : flatRadioButtons) {
view.getAttributes().setTheme(colorReference, getResources());
}
for (FlatToggleButton view : flatToggleButtons) {
view.getAttributes().setTheme(colorReference, getResources());
}
flatSeekBar.getAttributes().setTheme(colorReference, getResources());
runOnUiThread(new Runnable() {
@Override
public void run() {
flatSeekBar.setProgress(30);
flatSeekBar.setSecondaryProgress(40);
}
});
// if you are using standard action bar (not compatibility library) use this
// getActionBar().setBackgroundDrawable(FlatUI.getActionBarDrawable(this, colorReference, false));
// if you are using ActionBar of Compatibility library, get drawable and set it manually
getSupportActionBar().setBackgroundDrawable(FlatUI.getActionBarDrawable(this, colorReference, false));
setTitle("FlatUI Sample App");
}
Aggregations