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

@@ -73,6 +73,8 @@ public class PopupWindow {
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 setHeight(int height);
@@ -114,4 +116,6 @@ public class PopupWindow {
public void update(View anchor, int xoff, int yoff, int width, int 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.res.ColorStateList;
import android.content.res.TypedArray;
import android.graphics.Color;
import android.graphics.Typeface;
import android.graphics.drawable.Drawable;
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);
}
public int getCurrentTextColor() {return 0;}
public int getCurrentTextColor() {
return Color.CYAN;
}
public void setSingleLine(boolean singleLine) {}
@@ -392,4 +395,6 @@ public class TextView extends View {
public int getTotalPaddingTop() {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;
import android.content.Context;
import android.view.View;
public class Toast {
@@ -23,4 +24,6 @@ public class Toast {
public void show() {
System.out.println("showing toast: " + text);
}
public void setView(View view) {}
}