TextView: add stubs to fix RecyclerView demo apk

The views_widgets_samples_flower_finder.apk was broken, because of
recent changes
This commit is contained in:
Julian Winkler
2024-02-16 11:02:40 +01:00
parent a2eaaeb7d7
commit 1d8e140a3b
2 changed files with 18 additions and 0 deletions

View File

@@ -1,5 +1,7 @@
package android.text; package android.text;
import android.graphics.Canvas;
public class StaticLayout extends Layout { public class StaticLayout extends Layout {
private CharSequence text; private CharSequence text;
@@ -16,4 +18,16 @@ public class StaticLayout extends Layout {
public CharSequence getText() { public CharSequence getText() {
return text; return text;
} }
public int getWidth() {
return 200; // arbitrary value for stub method
}
public int getHeight() {
return 50; // arbitrary value for stub method
}
public float getLineLeft(int line) {return 0;}
public void draw(Canvas canvas) {}
} }

View File

@@ -203,4 +203,8 @@ public class TextView extends View {
public int getCurrentTextColor() {return 0;} public int getCurrentTextColor() {return 0;}
public void setSingleLine(boolean singleLine) {} public void setSingleLine(boolean singleLine) {}
public int getCompoundPaddingLeft() {return 0;}
public int getCompoundPaddingRight() {return 0;}
} }