Search in sources :

Example 56 with Switch

use of android.widget.Switch in project android_frameworks_base by crdroidandroid.

the class ElementLayoutActivity method createSwitch.

private void createSwitch() {
    Switch button = new Switch(this);
    button.setChecked(mRandom.nextBoolean());
    mLayout.addView(button);
}
Also used : Switch(android.widget.Switch)

Aggregations

Switch (android.widget.Switch)56 View (android.view.View)29 CompoundButton (android.widget.CompoundButton)18 TextView (android.widget.TextView)18 Context (android.content.Context)11 DialogInterface (android.content.DialogInterface)8 AlertDialog (android.app.AlertDialog)7 LayoutInflater (android.view.LayoutInflater)7 Checkable (android.widget.Checkable)7 OnCancelListener (android.content.DialogInterface.OnCancelListener)6 TypedArray (android.content.res.TypedArray)6 Drawable (android.graphics.drawable.Drawable)6 InputMethodInfo (android.view.inputmethod.InputMethodInfo)6 InputMethodSubtype (android.view.inputmethod.InputMethodSubtype)6 JSONObject (org.json.JSONObject)6 OnClickListener (android.content.DialogInterface.OnClickListener)5 Intent (android.content.Intent)5 LocaleList (android.os.LocaleList)5 ContextThemeWrapper (android.view.ContextThemeWrapper)5 OnCheckedChangeListener (android.widget.CompoundButton.OnCheckedChangeListener)5