Search in sources :

Example 1 with FlatRadioButton

use of com.cengalabs.flatui.views.FlatRadioButton 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");
}
Also used : FlatButton(com.cengalabs.flatui.views.FlatButton) FlatCheckBox(com.cengalabs.flatui.views.FlatCheckBox) FlatTextView(com.cengalabs.flatui.views.FlatTextView) FlatEditText(com.cengalabs.flatui.views.FlatEditText) FlatRadioButton(com.cengalabs.flatui.views.FlatRadioButton) FlatToggleButton(com.cengalabs.flatui.views.FlatToggleButton)

Aggregations

FlatButton (com.cengalabs.flatui.views.FlatButton)1 FlatCheckBox (com.cengalabs.flatui.views.FlatCheckBox)1 FlatEditText (com.cengalabs.flatui.views.FlatEditText)1 FlatRadioButton (com.cengalabs.flatui.views.FlatRadioButton)1 FlatTextView (com.cengalabs.flatui.views.FlatTextView)1 FlatToggleButton (com.cengalabs.flatui.views.FlatToggleButton)1