diff --git a/support/android/apk/servoview/src/main/java/org/mozilla/servoview/ServoView.java b/support/android/apk/servoview/src/main/java/org/mozilla/servoview/ServoView.java index 4bb05cfa2cb..fcf3f9f4c93 100644 --- a/support/android/apk/servoview/src/main/java/org/mozilla/servoview/ServoView.java +++ b/support/android/apk/servoview/src/main/java/org/mozilla/servoview/ServoView.java @@ -60,8 +60,17 @@ public class ServoView extends GLSurfaceView private boolean mRedrawing; + public ServoView(Context context) { + super(context); + init(context); + } + public ServoView(Context context, AttributeSet attrs) { super(context, attrs); + init(context); + } + + private void init(Context context) { mActivity = (Activity) context; setFocusable(true); setFocusableInTouchMode(true);