Skip to content
This repository has been archived by the owner on Sep 3, 2024. It is now read-only.

SwitchBar

Yanndroid edited this page Jan 27, 2022 · 3 revisions

de.dlyt.yanndroid.oneui.widget.SwitchBar

Samsung's SwitchBar, same as the one you find in OneUI System Settings app.

<de.dlyt.yanndroid.oneui.widget.SwitchBar
    android:layout_width="match_parent"
    android:layout_height="wrap_content" />

There is also the SwitchBarLayout, a combination of ToolbarLayout and this SwitchBar.

Methods

On and Off text resource id for the SwitchBar (default will be "On" and "Off").

public void setSwitchBarText(int i, int i2)

Enable/disable the SwitchBar.

public void setEnabled(boolean z)

Visibility of the ProgressBar in the SwitchBar.

public void setProgressBarVisible(boolean z)

SwitchBar Listener.

public void addOnSwitchChangeListener(OnSwitchChangeListener onSwitchChangeListener)
Clone this wiki locally