mirror of
https://gitlab.com/android_translation_layer/android_translation_layer.git
synced 2025-04-29 04:37:58 +03: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:
parent
32f344c301
commit
757d689689
7 changed files with 25 additions and 54 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue