Bug 1359422 - Add GeckoView constructor that allows both xml attribs and settings r=esawin
authorJames Willcox <snorp@snorp.net>
Fri, 21 Apr 2017 17:09:07 -0500
changeset 355081 f9c205fca9996868bb04ad2b16c24428a8c8d4e5
parent 355080 23cfef4874a005919989e4b9731f316e9096bcc5
child 355082 0a18abb7a8f373df8cf8123b9ec7681c352cbef7
push id31720
push userkwierso@gmail.com
push dateThu, 27 Apr 2017 00:30:39 +0000
treeherdermozilla-central@0b77ed3f26c5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersesawin
bugs1359422
milestone55.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1359422 - Add GeckoView constructor that allows both xml attribs and settings r=esawin MozReview-Commit-ID: 8U1ojpLSSiK
mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoView.java
--- a/mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoView.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoView.java
@@ -252,16 +252,23 @@ public class GeckoView extends LayerView
         // TODO: Convert custom attributes to GeckoViewSettings
         init(context, null);
     }
 
     public GeckoView(Context context, final GeckoViewSettings settings) {
         super(context);
 
         final GeckoViewSettings newSettings = new GeckoViewSettings(settings, getEventDispatcher());
+        init(context, settings);
+    }
+
+    public GeckoView(Context context, AttributeSet attrs, final GeckoViewSettings settings) {
+        super(context, attrs);
+
+        final GeckoViewSettings newSettings = new GeckoViewSettings(settings, getEventDispatcher());
         init(context, newSettings);
     }
 
     private void init(final Context context, final GeckoViewSettings settings) {
         if (GeckoAppShell.getApplicationContext() == null) {
             GeckoAppShell.setApplicationContext(context.getApplicationContext());
         }