SwitchBarLayout - OneUIProject/OneUI-Design-Library GitHub Wiki
de.dlyt.yanndroid.oneui.layout.SwitchBarLayout
This is an extended ToolbarLayout with SwitchBar. Useful for creating inner preferences layouts in pair with SwitchPreferenceScreen.
<de.dlyt.yanndroid.oneui.layout.SwitchBarLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout="...">
</de.dlyt.yanndroid.oneui.layout.SwitchBarLayout>
See ToolbarLayout for all the layout attributes, except for android:layout
, here you need to use all the views and ids of this view.
Methods
Additionally, to all the ToolbarLayout methods:
SwitchBar methods.
public SwitchBar getSwitchBar()
public void setChecked(boolean checked)
public boolean isChecked()
public void addOnSwitchChangeListener(SwitchBar.OnSwitchChangeListener onSwitchChangeListener)