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 API stubs for NewPipe
This commit is contained in:
28
src/api-impl/android/widget/AbsSeekBar.java
Normal file
28
src/api-impl/android/widget/AbsSeekBar.java
Normal 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'");
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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;}
|
||||
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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) {}
|
||||
}
|
||||
|
||||
6
src/api-impl/android/widget/PopupWindow.java
Normal file
6
src/api-impl/android/widget/PopupWindow.java
Normal file
@@ -0,0 +1,6 @@
|
||||
package android.widget;
|
||||
|
||||
public class PopupWindow {
|
||||
|
||||
public interface OnDismissListener {}
|
||||
}
|
||||
@@ -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'");
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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 {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user