2023-08-17 10:46:24 +02:00
|
|
|
package android.widget;
|
|
|
|
|
|
|
|
|
|
import android.content.Context;
|
|
|
|
|
import android.util.AttributeSet;
|
|
|
|
|
|
2023-09-19 23:22:21 +02:00
|
|
|
public class SeekBar extends AbsSeekBar {
|
2023-08-17 10:46:24 +02:00
|
|
|
|
|
|
|
|
public SeekBar(Context context) {
|
|
|
|
|
super(context);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public SeekBar(Context context, AttributeSet attributeSet) {
|
|
|
|
|
super(context, attributeSet);
|
|
|
|
|
}
|
|
|
|
|
|
2024-03-10 17:33:37 +01:00
|
|
|
@Override
|
|
|
|
|
protected native long native_constructor(Context context, AttributeSet attrs);
|
|
|
|
|
@Override
|
|
|
|
|
protected native void native_setProgress(long widget, float fraction);
|
|
|
|
|
protected native void native_setMax(long widget, int max);
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void setMax(int max) {
|
|
|
|
|
this.max = max;
|
|
|
|
|
native_setMax(widget, max);
|
|
|
|
|
}
|
|
|
|
|
@Override
|
|
|
|
|
public void setProgress(int progress) {
|
|
|
|
|
this.progress = progress;
|
|
|
|
|
native_setProgress(widget, progress);
|
|
|
|
|
}
|
|
|
|
|
@Override
|
|
|
|
|
public void setIndeterminate(boolean indeterminate) {}
|
|
|
|
|
|
|
|
|
|
public native void setOnSeekBarChangeListener(final OnSeekBarChangeListener l);
|
2023-09-19 23:22:21 +02:00
|
|
|
|
|
|
|
|
public static interface OnSeekBarChangeListener {
|
2024-05-13 20:00:17 +02:00
|
|
|
public void onStartTrackingTouch(SeekBar seekBar);
|
|
|
|
|
|
|
|
|
|
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser);
|
|
|
|
|
|
|
|
|
|
public void onStopTrackingTouch(SeekBar seekBar);
|
2023-08-17 10:46:24 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|