api-impl: add misc APIs for Open Sudoku

This commit is contained in:
Julian Winkler
2025-02-18 18:59:24 +01:00
parent 227f3c9682
commit 3fb1f56da2
8 changed files with 29 additions and 1 deletions

View File

@@ -186,6 +186,11 @@ public class Path {
return false; return false;
} }
public void set(Path src) {
reset();
addPath(src);
}
@SuppressWarnings("deprecation") @SuppressWarnings("deprecation")
@Override @Override
protected void finalize() throws Throwable { protected void finalize() throws Throwable {

View File

@@ -14,6 +14,7 @@ import android.graphics.Bitmap;
import android.graphics.Canvas; import android.graphics.Canvas;
import android.graphics.Rect; import android.graphics.Rect;
import android.graphics.RectF; import android.graphics.RectF;
import android.graphics.Shader;
import android.util.AttributeSet; import android.util.AttributeSet;
public class BitmapDrawable extends Drawable { public class BitmapDrawable extends Drawable {
@@ -56,4 +57,6 @@ public class BitmapDrawable extends Drawable {
public int getIntrinsicHeight() { public int getIntrinsicHeight() {
return bitmap.getHeight(); return bitmap.getHeight();
} }
public void setTileModeX(Shader.TileMode mode) {}
} }

View File

@@ -2136,4 +2136,6 @@ public class View implements Drawable.Callback {
public boolean performAccessibilityAction(int action, Bundle arguments) { return false; } public boolean performAccessibilityAction(int action, Bundle arguments) { return false; }
public boolean isDirty() { return false; } public boolean isDirty() { return false; }
public float getX() { return getLeft(); }
} }

View File

@@ -74,6 +74,10 @@ public class ViewPropertyAnimator {
return this; return this;
} }
public ViewPropertyAnimator rotationBy(float rotation) {
return this;
}
public void start() { public void start() {
new Handler().postDelayed(new Runnable() { new Handler().postDelayed(new Runnable() {

View File

@@ -33,6 +33,8 @@ public class Animation {
public void setRepeatCount(int count) {} public void setRepeatCount(int count) {}
public void setRepeatMode(int mode) {}
public void reset() {} public void reset() {}
public void start() {} public void start() {}

View File

@@ -73,6 +73,8 @@ public class PopupWindow {
public int getMaxAvailableHeight(View anchor, int yOffset) {return 500;} public int getMaxAvailableHeight(View anchor, int yOffset) {return 500;}
public int getMaxAvailableHeight(View anchor, int yOffset, boolean ignoreKeyboard) {return 500;}
public native void setWidth(int width); public native void setWidth(int width);
public native void setHeight(int height); public native void setHeight(int height);
@@ -114,4 +116,6 @@ public class PopupWindow {
public void update(View anchor, int xoff, int yoff, int width, int height) { public void update(View anchor, int xoff, int yoff, int width, int height) {
native_update(popover, anchor.widget, xoff, yoff, width, height); native_update(popover, anchor.widget, xoff, yoff, width, height);
} }
public void setWindowLayoutType(int type) {}
} }

View File

@@ -3,6 +3,7 @@ package android.widget;
import android.content.Context; import android.content.Context;
import android.content.res.ColorStateList; import android.content.res.ColorStateList;
import android.content.res.TypedArray; import android.content.res.TypedArray;
import android.graphics.Color;
import android.graphics.Typeface; import android.graphics.Typeface;
import android.graphics.drawable.Drawable; import android.graphics.drawable.Drawable;
import android.os.Bundle; import android.os.Bundle;
@@ -293,7 +294,9 @@ public class TextView extends View {
return new BoringLayout(getText(), getPaint(), getWidth(), Layout.Alignment.ALIGN_NORMAL, 1, 0, new BoringLayout.Metrics(), false); return new BoringLayout(getText(), getPaint(), getWidth(), Layout.Alignment.ALIGN_NORMAL, 1, 0, new BoringLayout.Metrics(), false);
} }
public int getCurrentTextColor() {return 0;} public int getCurrentTextColor() {
return Color.CYAN;
}
public void setSingleLine(boolean singleLine) {} public void setSingleLine(boolean singleLine) {}
@@ -392,4 +395,6 @@ public class TextView extends View {
public int getTotalPaddingTop() {return 0;} public int getTotalPaddingTop() {return 0;}
public int getImeOptions() {return 0;} public int getImeOptions() {return 0;}
public void setShadowLayer(float radius, float dx, float dy, int color) {}
} }

View File

@@ -1,6 +1,7 @@
package android.widget; package android.widget;
import android.content.Context; import android.content.Context;
import android.view.View;
public class Toast { public class Toast {
@@ -23,4 +24,6 @@ public class Toast {
public void show() { public void show() {
System.out.println("showing toast: " + text); System.out.println("showing toast: " + text);
} }
public void setView(View view) {}
} }