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
implement some Canvas methods needed for composeUI
This commit is contained in:
@@ -1,22 +1,14 @@
|
||||
package android.text;
|
||||
|
||||
import android.graphics.Canvas;
|
||||
|
||||
public class StaticLayout extends Layout {
|
||||
|
||||
private CharSequence text;
|
||||
|
||||
public StaticLayout(CharSequence source, int bufstart, int bufend,
|
||||
TextPaint paint, int outerwidth,
|
||||
Alignment align, TextDirectionHeuristic textDir,
|
||||
float spacingmult, float spacingadd,
|
||||
boolean includepad,
|
||||
TextUtils.TruncateAt ellipsize, int ellipsizedWidth, int maxLines) {
|
||||
this.text = source;
|
||||
}
|
||||
|
||||
public CharSequence getText() {
|
||||
return text;
|
||||
super(source, paint, outerwidth, align, spacingmult, spacingadd);
|
||||
}
|
||||
|
||||
public int getWidth() {
|
||||
@@ -29,5 +21,4 @@ public class StaticLayout extends Layout {
|
||||
|
||||
public float getLineLeft(int line) {return 0;}
|
||||
|
||||
public void draw(Canvas canvas) {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user