add missing Context attribute to all View constructors

This commit is contained in:
Julian Winkler
2023-07-14 18:02:04 +02:00
parent 151eb334cc
commit 6b79adb2c3
12 changed files with 46 additions and 26 deletions

View File

@@ -17,8 +17,8 @@ public class TextView extends View {
id = _id;
}
public TextView(AttributeSet attrs) {
super(attrs);
public TextView(Context context, AttributeSet attrs) {
super(context, attrs);
native_constructor(attrs);
}
@@ -44,6 +44,10 @@ public class TextView extends View {
native_set_markup(1);
}
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);