mirror of
https://gitlab.com/android_translation_layer/android_translation_layer.git
synced 2025-04-28 12:17:57 +03:00
TextView: chain setText variants in the same direction as AOSP to fix behavior of classes which override it
This commit is contained in:
parent
4d12ad5c90
commit
5c29d2d297
1 changed files with 12 additions and 8 deletions
|
@ -87,7 +87,15 @@ public class TextView extends View {
|
|||
@Override
|
||||
protected native long native_constructor(Context context, AttributeSet attrs);
|
||||
|
||||
public void setText(int resId) {
|
||||
setText(getContext().getResources().getText(resId));
|
||||
}
|
||||
|
||||
public void setText(CharSequence text) {
|
||||
setText(text, null);
|
||||
}
|
||||
|
||||
public void setText(CharSequence text, BufferType type) {
|
||||
this.text = text;
|
||||
native_setText(text != null ? text.toString() : null);
|
||||
|
||||
|
@ -97,10 +105,6 @@ public class TextView extends View {
|
|||
requestLayout();
|
||||
}
|
||||
|
||||
public void setText(int resId) {
|
||||
setText(getContext().getResources().getText(resId));
|
||||
}
|
||||
|
||||
private native final void native_set_markup(int bool);
|
||||
|
||||
public native final void native_setText(String text);
|
||||
|
@ -264,10 +268,6 @@ public class TextView extends View {
|
|||
|
||||
public void setTextIsSelectable(boolean selectable) {}
|
||||
|
||||
public void setText(CharSequence text, BufferType type) {
|
||||
setText(text);
|
||||
}
|
||||
|
||||
public MovementMethod getMovementMethod() {
|
||||
return new BaseMovementMethod();
|
||||
}
|
||||
|
@ -368,6 +368,10 @@ public class TextView extends View {
|
|||
return 10; // FIXME
|
||||
}
|
||||
|
||||
public int getMaxHeight() {
|
||||
return -1;
|
||||
}
|
||||
|
||||
public boolean isAllCaps() { return false; }
|
||||
|
||||
public int getAutoSizeStepGranularity() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue