mirror of
https://gitlab.com/android_translation_layer/android_translation_layer.git
synced 2025-04-29 04:37:58 +03:00
implement some Canvas methods needed for composeUI
This commit is contained in:
parent
cb7805bb45
commit
d0952101a6
17 changed files with 143 additions and 18 deletions
|
@ -5,6 +5,7 @@ import android.content.res.ColorStateList;
|
|||
import android.content.res.TypedArray;
|
||||
import android.graphics.Typeface;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.text.BoringLayout;
|
||||
import android.text.Editable;
|
||||
import android.text.InputFilter;
|
||||
import android.text.Layout;
|
||||
|
@ -281,7 +282,7 @@ public class TextView extends View {
|
|||
}
|
||||
|
||||
public Layout getLayout() {
|
||||
return new Layout();
|
||||
return new BoringLayout(getText(), getPaint(), getWidth(), Layout.Alignment.ALIGN_NORMAL, 1, 0, new BoringLayout.Metrics(), false);
|
||||
}
|
||||
|
||||
public int getCurrentTextColor() {return 0;}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue