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
unify View construction and measurement
No longer allow constructing Views without Context. Lets have only one onMeasure() method to unify behaviour
This commit is contained in:
@@ -22,10 +22,6 @@ import android.view.View;
|
||||
public class TextView extends View {
|
||||
public String text;
|
||||
|
||||
public TextView(int _id) { // FIXME
|
||||
id = _id;
|
||||
}
|
||||
|
||||
public TextView(Context context, AttributeSet attrs) {
|
||||
this(context, attrs, 0);
|
||||
}
|
||||
@@ -50,6 +46,7 @@ public class TextView extends View {
|
||||
}
|
||||
a.recycle();
|
||||
}
|
||||
haveComplexMeasure = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -71,11 +68,6 @@ public class TextView extends View {
|
||||
setText(getContext().getResources().getText(resId));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
|
||||
native_measure(widget, widthMeasureSpec, heightMeasureSpec, true);
|
||||
}
|
||||
|
||||
private native final void native_set_markup(int bool);
|
||||
|
||||
public native final void native_setText(String text);
|
||||
|
||||
Reference in New Issue
Block a user