docs: Long press to dismiss fix by Wayne

Bug: 17924105

Change-Id: Ifbc26b923771e7389e4df6abe9005bc3f0269c1e
This commit is contained in:
Ricardo Cervera
2014-12-02 13:08:10 -08:00
parent 64f4916246
commit 6ee2ca2f1e

View File

@@ -67,7 +67,7 @@ For example:</p>
android:id="@+id/dismiss_overlay"
android:layout_height="match_parent"
android:layout_width="match_parent"/>
&lt;FrameLayout>
&lt;/FrameLayout>
</pre>
<p>In your activity, obtain the <code>DismissOverlayView</code> element and set some introductory
@@ -100,8 +100,8 @@ public class WearActivity extends Activity {
// Capture long presses
&#64;Override
public boolean onTouchEvent(MotionEvent ev) {
return mDetector.onTouchEvent(ev) || super.onTouchEvent(ev);
public boolean dispatchTouchEvent(MotionEvent e) {
return mDetector.onTouchEvent(e) || super.dispatchTouchEvent(e);
}
}
</pre>