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:
@@ -35,12 +35,12 @@ public class LayoutInflater {
|
||||
public final View createView(String name, String prefix, AttributeSet attrs) throws Exception {
|
||||
System.out.println(">>>>>>>>>>>>>>>>>>>>>>>>> createView(" + name + ", " + prefix + ", " + attrs + ");");
|
||||
|
||||
String view_class_name = prefix + name;
|
||||
String view_class_name = prefix!=null ? prefix + name : name;
|
||||
Class view_class = Class.forName(view_class_name);
|
||||
|
||||
Constructor constructor = view_class.getConstructor(AttributeSet.class);
|
||||
Constructor constructor = view_class.getConstructor(Context.class, AttributeSet.class);
|
||||
|
||||
View view_instance = (View)constructor.newInstance(attrs);
|
||||
View view_instance = (View)constructor.newInstance(Context.this_application, attrs);
|
||||
|
||||
return view_instance;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user