You've already forked android_translation_layer
mirror of
https://gitlab.com/android_translation_layer/android_translation_layer.git
synced 2025-10-27 11:48:10 -07:00
add more APIs needed for NewPipe
This commit is contained in:
@@ -16,14 +16,22 @@ public abstract class CompoundButton extends Button implements Checkable {
|
||||
@Override
|
||||
protected native long native_constructor(Context context, AttributeSet attrs);
|
||||
|
||||
public static interface OnCheckedChangeListener {}
|
||||
public static interface OnCheckedChangeListener {
|
||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked);
|
||||
}
|
||||
|
||||
public native void setOnCheckedChangeListener(OnCheckedChangeListener listener);
|
||||
|
||||
@Override
|
||||
public native void setChecked(boolean checked);
|
||||
|
||||
@Override
|
||||
public native boolean isChecked();
|
||||
|
||||
public void toggle() {
|
||||
setChecked(!isChecked());
|
||||
}
|
||||
|
||||
// following methods are overridden to prevent calling incompatible methods from superclasses
|
||||
@Override
|
||||
public void setOnClickListener(final OnClickListener l) {}
|
||||
|
||||
Reference in New Issue
Block a user