add more API stubs for NewPipe

This commit is contained in:
Julian Winkler
2023-09-19 23:22:21 +02:00
parent 2013024971
commit c830abc5f3
34 changed files with 310 additions and 23 deletions

View File

@@ -0,0 +1,28 @@
package android.widget;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
public abstract class AbsSeekBar extends ProgressBar {
public AbsSeekBar(Context context) {
super(context);
}
public AbsSeekBar(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
}
public Drawable getThumb() {
return new Drawable() {
@Override
public void draw(Canvas canvas) {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'draw'");
}
};
}
}

View File

@@ -2,9 +2,8 @@ package android.widget;
import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
public class CheckBox extends View {
public class CheckBox extends CompoundButton {
public CheckBox(Context context) {
super(context);
@@ -14,10 +13,4 @@ public class CheckBox extends View {
super(context, attributeSet);
}
public void setChecked(boolean checked) {}
public void setOnCheckedChangeListener(CompoundButton.OnCheckedChangeListener listener) {}
public boolean isChecked() {return false;}
}

View File

@@ -4,6 +4,8 @@ import android.content.Context;
import android.util.AttributeSet;
public abstract class CompoundButton extends Button {
private boolean checked;
public CompoundButton(Context context) {
super(context);
@@ -16,4 +18,12 @@ public abstract class CompoundButton extends Button {
public static interface OnCheckedChangeListener {}
public void setOnCheckedChangeListener(OnCheckedChangeListener listener) {}
public void setChecked(boolean checked) {
this.checked = checked;
}
public boolean isChecked() {
return checked;
}
}

View File

@@ -1,6 +1,7 @@
package android.widget;
import android.content.Context;
import android.content.res.ColorStateList;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Matrix;
@@ -131,4 +132,6 @@ public class ImageView extends View {
}
public final void setColorFilter(int color, PorterDuff.Mode mode) {}
public void setImageTintList(ColorStateList tint) {}
}

View File

@@ -0,0 +1,6 @@
package android.widget;
public class PopupWindow {
public interface OnDismissListener {}
}

View File

@@ -1,6 +1,8 @@
package android.widget;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
import android.view.View;
@@ -14,4 +16,24 @@ public class ProgressBar extends View {
}
public synchronized void setIndeterminate(boolean indeterminate) {}
public Drawable getProgressDrawable() {
return new Drawable() {
@Override
public void draw(Canvas canvas) {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'draw'");
}
};
}
public Drawable getIndeterminateDrawable() {
return new Drawable() {
@Override
public void draw(Canvas canvas) {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'draw'");
}
};
}
}

View File

@@ -3,7 +3,7 @@ package android.widget;
import android.content.Context;
import android.util.AttributeSet;
public class SeekBar extends ProgressBar {
public class SeekBar extends AbsSeekBar {
public SeekBar(Context context) {
super(context);
@@ -13,7 +13,9 @@ public class SeekBar extends ProgressBar {
super(context, attributeSet);
}
public interface OnSeekBarChangeListener {
public void setOnSeekBarChangeListener(OnSeekBarChangeListener l) {}
public static interface OnSeekBarChangeListener {
}
}

View File

@@ -11,7 +11,9 @@ import android.text.TextPaint;
import android.text.TextUtils;
import android.text.TextWatcher;
import android.text.method.KeyListener;
import android.text.method.MovementMethod;
import android.text.method.TransformationMethod;
import android.text.style.URLSpan;
import android.util.AttributeSet;
import android.view.Gravity;
import android.view.View;
@@ -165,6 +167,20 @@ public class TextView extends View {
public void setCompoundDrawablesRelative(Drawable start, Drawable top, Drawable end, Drawable bottom) {}
public int getLineCount() {return 1;}
public URLSpan[] getUrls() {return new URLSpan[0];}
public void setMovementMethod(MovementMethod method) {}
public void setTextIsSelectable(boolean selectable) {}
public static interface OnEditorActionListener {
}
public static enum BufferType {
EDITABLE,
NORMAL,
SPANNABLE,
}
}