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
api-impl: misc stubs and fixes for several apps including F-Droid and AuroraStore
This commit is contained in:
@@ -234,9 +234,8 @@ public class PopupMenu {
|
||||
}
|
||||
|
||||
@Override
|
||||
public MenuItem getItem(int id) {
|
||||
// TODO Auto-generated method stub
|
||||
throw new UnsupportedOperationException("Unimplemented method 'getItem'");
|
||||
public MenuItem getItem(int index) {
|
||||
return items.get(index);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -297,8 +296,7 @@ public class PopupMenu {
|
||||
|
||||
@Override
|
||||
public int size() {
|
||||
// TODO Auto-generated method stub
|
||||
throw new UnsupportedOperationException("Unimplemented method 'size'");
|
||||
return items.size();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package android.widget;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Rect;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.Log;
|
||||
@@ -118,4 +119,8 @@ public class PopupWindow {
|
||||
}
|
||||
|
||||
public void setWindowLayoutType(int type) {}
|
||||
|
||||
public void setIsClippedToScreen(boolean isClippedToScreen) {}
|
||||
|
||||
public void setEpicenterBounds(Rect bounds) {}
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@ public class ProgressBar extends View {
|
||||
protected int progress = 0;
|
||||
private boolean indeterminate = false;
|
||||
private Drawable indeterminateDrawable;
|
||||
private Drawable progressDrawable = new Drawable();
|
||||
|
||||
public ProgressBar(Context context, AttributeSet attrs, int defStyle) {
|
||||
super(context, attrs, defStyle);
|
||||
@@ -58,13 +59,7 @@ public class ProgressBar extends View {
|
||||
|
||||
|
||||
public Drawable getProgressDrawable() {
|
||||
return new Drawable() {
|
||||
@Override
|
||||
public void draw(Canvas canvas) {
|
||||
// TODO Auto-generated method stub
|
||||
throw new UnsupportedOperationException("Unimplemented method 'draw'");
|
||||
}
|
||||
};
|
||||
return progressDrawable;
|
||||
}
|
||||
|
||||
public Drawable getIndeterminateDrawable() {
|
||||
@@ -103,7 +98,8 @@ public class ProgressBar extends View {
|
||||
this.indeterminateDrawable = indeterminateDrawable;
|
||||
}
|
||||
|
||||
public void setProgressDrawable(Drawable indeterminateDrawable) {
|
||||
public void setProgressDrawable(Drawable progressDrawable) {
|
||||
this.progressDrawable = progressDrawable;
|
||||
}
|
||||
|
||||
public native void native_setIndeterminate(boolean indeterminate);
|
||||
|
||||
16
src/api-impl/android/widget/RatingBar.java
Normal file
16
src/api-impl/android/widget/RatingBar.java
Normal file
@@ -0,0 +1,16 @@
|
||||
package android.widget;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.AttributeSet;
|
||||
|
||||
public class RatingBar extends AbsSeekBar {
|
||||
|
||||
public RatingBar(Context context) {
|
||||
this(context, null);
|
||||
}
|
||||
|
||||
public RatingBar(Context context, AttributeSet attributeSet) {
|
||||
super(context, attributeSet);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -397,4 +397,6 @@ public class TextView extends View {
|
||||
public int getImeOptions() {return 0;}
|
||||
|
||||
public void setShadowLayer(float radius, float dx, float dy, int color) {}
|
||||
|
||||
public void setBreakStrategy(int strategy) {}
|
||||
}
|
||||
|
||||
16
src/api-impl/android/widget/ViewFlipper.java
Normal file
16
src/api-impl/android/widget/ViewFlipper.java
Normal file
@@ -0,0 +1,16 @@
|
||||
package android.widget;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.AttributeSet;
|
||||
|
||||
public class ViewFlipper extends ViewAnimator {
|
||||
|
||||
public ViewFlipper(Context context) {
|
||||
this(context, null);
|
||||
}
|
||||
|
||||
public ViewFlipper(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user