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
add missing Context attribute to all View constructors
This commit is contained in:
@@ -688,11 +688,14 @@ public class View extends Object {
|
||||
|
||||
public View() {} // FIXME
|
||||
|
||||
public View(AttributeSet attrs) {
|
||||
id = attrs.getAttributeResourceValue("http://schemas.android.com/apk/res/android", "id", 0);
|
||||
public View(Context context, AttributeSet attrs) {
|
||||
this(context);
|
||||
|
||||
if (id != 0)
|
||||
view_by_id.put(id, this);
|
||||
if (attrs != null) {
|
||||
id = attrs.getAttributeResourceValue("http://schemas.android.com/apk/res/android", "id", 0);
|
||||
if (id != 0)
|
||||
setId(id);
|
||||
}
|
||||
}
|
||||
|
||||
public View findViewById(int id) {
|
||||
@@ -766,7 +769,9 @@ public class View extends Object {
|
||||
System.out.println("setContentDescription called with: >" + contentDescription + "<");
|
||||
}
|
||||
|
||||
public void setId(int id) {}
|
||||
public void setId(int id) {
|
||||
view_by_id.put(id, this);
|
||||
}
|
||||
|
||||
public void setOnKeyListener(OnKeyListener l) {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user