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 403198 f9c205fca9996868bb04ad2b16c24428a8c8d4e5
parent 403197 23cfef4874a005919989e4b9731f316e9096bcc5
child 403199 0a18abb7a8f373df8cf8123b9ec7681c352cbef7
push id7391
push usermtabara@mozilla.com
push dateMon, 12 Jun 2017 13:08:53 +0000
treeherdermozilla-beta@2191d7f87e2e [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());
         }