Unexpected-Keyboard/srcs/juloo.keyboard2/ClipboardHistoryCheckBox.java
Jules Aguillon dc922b0258
Some checks failed
Check layouts / Generated files (push) Has been cancelled
Check layouts / check_layout.output (push) Has been cancelled
Check translations / check-translations (push) Has been cancelled
Make Apk CI / Build-Apk (push) Has been cancelled
Persist state of clipboard history checkbox
2024-12-06 00:10:05 +01:00

24 lines
624 B
Java

package juloo.keyboard2;
import android.content.Context;
import android.util.AttributeSet;
import android.widget.CheckBox;
import android.widget.CompoundButton;
final class ClipboardHistoryCheckBox extends CheckBox
implements CompoundButton.OnCheckedChangeListener
{
public ClipboardHistoryCheckBox(Context ctx, AttributeSet attrs)
{
super(ctx, attrs);
setChecked(Config.globalConfig().clipboard_history_enabled);
setOnCheckedChangeListener(this);
}
@Override
public void onCheckedChanged(CompoundButton _v, boolean isChecked)
{
ClipboardHistoryService.set_history_enabled(isChecked);
}
}