{"id":995,"date":"2015-09-08T16:42:40","date_gmt":"2015-09-08T08:42:40","guid":{"rendered":"https:\/\/ai.zhousir.top\/?p=995"},"modified":"2026-08-18T12:58:44","modified_gmt":"2026-08-18T04:58:44","slug":"android%e4%ba%8b%e4%bb%b6%e5%a4%84%e7%90%86%e6%9c%ba%e5%88%b6","status":"publish","type":"post","link":"https:\/\/ai.zhousir.top\/?p=995","title":{"rendered":"Android\u4e8b\u4ef6\u5904\u7406\u673a\u5236"},"content":{"rendered":"<section id=\"wenyan\" style=\"font-family: system-ui, 'Apple Color Emoji', 'Segoe UI', 'Segoe UI Symbol', 'Noto Sans', Roboto, sans-serif; line-height: 1.75; font-size: 16px; color: #000000; caret-color: #000000;\" data-provider=\"WenYan\">\n<blockquote style=\"margin: 20px 0px; display: block; font-size: 0.9em; overflow: auto; border-left: 3px solid #ef7060; color: #6a737d; padding: 10px 10px 10px 20px; background: #fff9f9;\">\n<p style=\"margin: 1em 0px;\">Android \u4e8b\u4ef6\u5904\u7406\u66f4\u51c6\u786e\u7684\u8bf4\u6cd5\u662f\u300c\u5206\u53d1\u3001\u62e6\u622a\u3001\u5904\u7406\u300d\u3002\u6838\u5fc3\u662f\u4e09\u4e2a\u65b9\u6cd5\uff1a<code style=\"font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; font-size: 0.9em; overflow-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0px 2px; color: #ef7060; background-color: rgba(27, 31, 35, 0.05); word-break: break-all;\">dispatchTouchEvent<\/code>\u3001<code style=\"font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; font-size: 0.9em; overflow-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0px 2px; color: #ef7060; background-color: rgba(27, 31, 35, 0.05); word-break: break-all;\">onInterceptTouchEvent<\/code>\u3001<code style=\"font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; font-size: 0.9em; overflow-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0px 2px; color: #ef7060; background-color: rgba(27, 31, 35, 0.05); word-break: break-all;\">onTouchEvent<\/code>\u3002<\/p>\n<\/blockquote>\n<p><!--more--><\/p>\n<hr>\n<h2 style=\"margin: 1.2em 0px 1em; padding: 0px; font-weight: bold; font-size: 1.3em; border-bottom: 2px solid #ef7060; display: flex;\"><span style=\"display: inline-block; font-weight: bold; background: #ef7060; color: #ffffff; padding: 3px 10px 1px; border-top-right-radius: 3px; border-top-left-radius: 3px; margin-right: 3px;\">\u4e00\u3001\u4e09\u4e2a\u65b9\u6cd5\u5404\u7ba1\u4ec0\u4e48<\/span><\/h2>\n<p style=\"margin: 1em 0px;\"><code style=\"font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; font-size: 0.9em; overflow-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0px 2px; color: #ef7060; background-color: rgba(27, 31, 35, 0.05); word-break: break-all;\">dispatchTouchEvent<\/code> \u51b3\u5b9a\u4e8b\u4ef6\u662f\u5426\u5206\u53d1\u3002TouchEvent \u53d1\u751f\u65f6\u5148\u5230\u9876\u5c42 Activity \u7684 dispatchTouchEvent\uff1a\u8fd4\u56de true \u6216 false \u8868\u793a\u88ab\u81ea\u8eab\u6d88\u8d39\uff1b\u8fd4\u56de <code style=\"font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; font-size: 0.9em; overflow-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0px 2px; color: #ef7060; background-color: rgba(27, 31, 35, 0.05); word-break: break-all;\">super.dispatchTouchEvent(ev)<\/code> \u624d\u4ea4\u7ed9\u4e0b\u4e00\u5c42\u7ee7\u7eed\u5206\u53d1\u3002<\/p>\n<p style=\"margin: 1em 0px;\"><code style=\"font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; font-size: 0.9em; overflow-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0px 2px; color: #ef7060; background-color: rgba(27, 31, 35, 0.05); word-break: break-all;\">onInterceptTouchEvent<\/code> \u51b3\u5b9a\u662f\u5426\u7ee7\u7eed\u5411\u4e0b\u4f20\u3002\u8fd4\u56de false \u6216 super \u65f6\u4f20\u7ed9\u5b50 View\uff1b\u8fd4\u56de true \u5219\u62e6\u622a\uff0c\u4ea4\u7ed9\u5f53\u524d ViewGroup \u7684 <code style=\"font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; font-size: 0.9em; overflow-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0px 2px; color: #ef7060; background-color: rgba(27, 31, 35, 0.05); word-break: break-all;\">onTouchEvent()<\/code>\uff0c\u8fd9\u5c31\u662f Intercept\u3002<\/p>\n<p style=\"margin: 1em 0px;\"><code style=\"font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; font-size: 0.9em; overflow-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0px 2px; color: #ef7060; background-color: rgba(27, 31, 35, 0.05); word-break: break-all;\">onTouchEvent<\/code> \u5904\u7406\u4e8b\u4ef6\uff08\u65b9\u5411\u662f\u5b50 View \u2192 \u7236 View\uff09\u3002\u8fd4\u56de true \u8868\u793a\u6d88\u8d39\uff0c\u7236 View \u7684 onTouchEvent \u4e0d\u518d\u6267\u884c\uff1b\u8fd4\u56de false \u6216 super \u8868\u793a\u4e0d\u5904\u7406\uff0c\u4ea4\u7ed9\u7236 View\u3002<\/p>\n<p style=\"margin: 1em 0px;\">\u4e00\u6b21\u70b9\u51fb\u901a\u5e38\u5305\u542b Down\u3001Move\u3001Up\u3002\u5bf9 <code style=\"font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; font-size: 0.9em; overflow-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0px 2px; color: #ef7060; background-color: rgba(27, 31, 35, 0.05); word-break: break-all;\">ACTION_DOWN<\/code> \u8fd4\u56de true\uff0c\u8868\u793a\u540e\u7eed\u4e8b\u4ef6\u6211\u4e5f\u8981\uff1b\u8fd4\u56de false \u8868\u793a\u4e0d\u5173\u5fc3\uff0c\u4ea4\u7236\u7c7b\u3002\u7279\u522b\u6ce8\u610f\uff1a<code style=\"font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; font-size: 0.9em; overflow-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0px 2px; color: #ef7060; background-color: rgba(27, 31, 35, 0.05); word-break: break-all;\">ACTION_MOVE<\/code> \/ <code style=\"font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; font-size: 0.9em; overflow-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0px 2px; color: #ef7060; background-color: rgba(27, 31, 35, 0.05); word-break: break-all;\">ACTION_UP<\/code> \u7684\u524d\u63d0\u662f\u66fe\u7ecf\u53d1\u751f\u8fc7 <code style=\"font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; font-size: 0.9em; overflow-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0px 2px; color: #ef7060; background-color: rgba(27, 31, 35, 0.05); word-break: break-all;\">ACTION_DOWN<\/code>\u3002\u6ca1\u6d88\u8d39 DOWN\uff0c\u7cfb\u7edf\u4f1a\u5f53 DOWN \u6ca1\u53d1\u751f\u8fc7\uff0c\u540e\u7eed MOVE\/UP \u4e5f\u6293\u4e0d\u5230\u3002<\/p>\n<table style=\"border-collapse: collapse; margin: 1.4em auto; max-width: 100%; table-layout: fixed; text-align: left; overflow: auto; display: table; overflow-wrap: break-word; word-break: break-all;\" width=\"817\">\n<thead>\n<tr>\n<th style=\"font-size: 0.75em; padding: 9px 12px; line-height: 22px; border: 1px solid #ef7060; vertical-align: top; font-weight: bold; background-color: #fff9f9; color: #ef7060;\">\u65b9\u6cd5<\/th>\n<th style=\"font-size: 0.75em; padding: 9px 12px; line-height: 22px; border: 1px solid #ef7060; vertical-align: top; font-weight: bold; background-color: #fff9f9; color: #ef7060;\">\u6240\u5728\u5c42\u7ea7<\/th>\n<th style=\"font-size: 0.75em; padding: 9px 12px; line-height: 22px; border: 1px solid #ef7060; vertical-align: top; font-weight: bold; background-color: #fff9f9; color: #ef7060;\">\u8fd4\u56de true<\/th>\n<th style=\"font-size: 0.75em; padding: 9px 12px; line-height: 22px; border: 1px solid #ef7060; vertical-align: top; font-weight: bold; background-color: #fff9f9; color: #ef7060;\">\u8fd4\u56de false \/ super<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"font-size: 0.75em; padding: 9px 12px; line-height: 22px; border: 1px solid #ef7060; vertical-align: top;\">dispatchTouchEvent<\/td>\n<td style=\"font-size: 0.75em; padding: 9px 12px; line-height: 22px; border: 1px solid #ef7060; vertical-align: top;\">Activity \/ ViewGroup \/ View<\/td>\n<td style=\"font-size: 0.75em; padding: 9px 12px; line-height: 22px; border: 1px solid #ef7060; vertical-align: top;\">\u81ea\u8eab\u6d88\u8d39<\/td>\n<td style=\"font-size: 0.75em; padding: 9px 12px; line-height: 22px; border: 1px solid #ef7060; vertical-align: top;\">super\uff1a\u7ee7\u7eed\u5f80\u4e0b\u5206\u53d1<\/td>\n<\/tr>\n<tr>\n<td style=\"font-size: 0.75em; padding: 9px 12px; line-height: 22px; border: 1px solid #ef7060; vertical-align: top;\">onInterceptTouchEvent<\/td>\n<td style=\"font-size: 0.75em; padding: 9px 12px; line-height: 22px; border: 1px solid #ef7060; vertical-align: top;\">\u4ec5 ViewGroup<\/td>\n<td style=\"font-size: 0.75em; padding: 9px 12px; line-height: 22px; border: 1px solid #ef7060; vertical-align: top;\">\u62e6\u622a\uff0c\u4ea4\u7ed9\u81ea\u5df1\u7684 onTouchEvent<\/td>\n<td style=\"font-size: 0.75em; padding: 9px 12px; line-height: 22px; border: 1px solid #ef7060; vertical-align: top;\">\u4e0d\u62e6\u622a\uff0c\u4f20\u7ed9\u5b50 View<\/td>\n<\/tr>\n<tr>\n<td style=\"font-size: 0.75em; padding: 9px 12px; line-height: 22px; border: 1px solid #ef7060; vertical-align: top;\">onTouchEvent<\/td>\n<td style=\"font-size: 0.75em; padding: 9px 12px; line-height: 22px; border: 1px solid #ef7060; vertical-align: top;\">View \/ ViewGroup<\/td>\n<td style=\"font-size: 0.75em; padding: 9px 12px; line-height: 22px; border: 1px solid #ef7060; vertical-align: top;\">\u6d88\u8d39\uff0c\u7236\u7ea7\u4e0d\u518d\u5904\u7406<\/td>\n<td style=\"font-size: 0.75em; padding: 9px 12px; line-height: 22px; border: 1px solid #ef7060; vertical-align: top;\">\u4e0d\u6d88\u8d39\uff0c\u56de\u4f20\u7236\u7ea7<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr>\n<h2 style=\"margin: 1.2em 0px 1em; padding: 0px; font-weight: bold; font-size: 1.3em; border-bottom: 2px solid #ef7060; display: flex;\"><span style=\"display: inline-block; font-weight: bold; background: #ef7060; color: #ffffff; padding: 3px 10px 1px; border-top-right-radius: 3px; border-top-left-radius: 3px; margin-right: 3px;\">\u4e8c\u3001\u793a\u4f8b\u5e03\u5c40<\/span><\/h2>\n<p style=\"margin: 1em 0px;\">\u4e09\u5c42\u81ea\u5b9a\u4e49\u63a7\u4ef6\uff1aRootLayout \u2192 TwotLayout \u2192 ChildTextView\u3002<\/p>\n<p style=\"margin: 1em 0px;\"><a href=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2015\/09\/QQ\u255c\u256a\u2550\u255d20150908162106.png\" rel=\"fancybox\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-996\" src=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2015\/09\/QQ\u255c\u256a\u2550\u255d20150908162106.png\" alt=\"QQ\u255c\u256a\u2550\u255d20150908162106\" width=\"455\" height=\"385\" \/><\/a><\/p>\n<pre style=\"overflow: auto hidden; word-break: normal; white-space: pre; tab-size: 2; border-radius: 5px; line-height: 2; margin: 1em 0.5em; padding: 0.5em; box-shadow: rgba(0, 0, 0, 0.55) 0px 1px 5px; font-size: 10px; background: #002b36; max-width: 100%; overflow-wrap: normal;\"><code class=\"hljs\" style=\"word-break: normal; white-space: nowrap; tab-size: 2; font-size: 10px; font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; display: block; margin: 0.5em; padding: 3px 5px; overflow-x: auto; color: #93a1a1; background: #002b36; overflow-wrap: normal;\">&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;\n&lt;com.scxh.android1502.event.RootLayout xmlns:android=&quot;http:\/\/schemas.android.com\/apk\/res\/android&quot;\n    android:layout_width=&quot;match_parent&quot;\n    android:layout_height=&quot;match_parent&quot;\n    android:orientation=&quot;vertical&quot; &gt;\n\n    &lt;com.scxh.android1502.event.TwotLayout\n        android:layout_width=&quot;match_parent&quot;\n        android:layout_height=&quot;match_parent&quot;\n        android:orientation=&quot;vertical&quot; &gt;\n\n        &lt;com.scxh.android1502.event.ChildTextView\n            android:id=&quot;@+id\/event_text&quot;\n            android:layout_width=&quot;match_parent&quot;\n            android:layout_height=&quot;wrap_content&quot;\n            android:text=&quot;android\u4e8b\u4ef6\u5904\u7406\u673a\u5236&quot; \/&gt;\n\n    &lt;\/com.scxh.android1502.event.TwotLayout&gt;\n\n&lt;\/com.scxh.android1502.event.RootLayout&gt;<\/code><\/pre>\n<hr>\n<h2 style=\"margin: 1.2em 0px 1em; padding: 0px; font-weight: bold; font-size: 1.3em; border-bottom: 2px solid #ef7060; display: flex;\"><span style=\"display: inline-block; font-weight: bold; background: #ef7060; color: #ffffff; padding: 3px 10px 1px; border-top-right-radius: 3px; border-top-left-radius: 3px; margin-right: 3px;\">\u4e09\u3001\u6d4b\u8bd5\u4ee3\u7801<\/span><\/h2>\n<pre style=\"overflow: auto hidden; word-break: normal; white-space: pre; tab-size: 2; border-radius: 5px; line-height: 2; margin: 1em 0.5em; padding: 0.5em; box-shadow: rgba(0, 0, 0, 0.55) 0px 1px 5px; font-size: 10px; background: #002b36; max-width: 100%; overflow-wrap: normal;\"><code class=\"hljs\" style=\"word-break: normal; white-space: nowrap; tab-size: 2; font-size: 10px; font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; display: block; margin: 0.5em; padding: 3px 5px; overflow-x: auto; color: #93a1a1; background: #002b36; overflow-wrap: normal;\">public class RootLayout extends LinearLayout {\n\n    public RootLayout(Context context, AttributeSet attrs) {\n        super(context, attrs);\n    }\n\n    @Override\n    public boolean onInterceptTouchEvent(MotionEvent ev) {\n        Logs.d(&quot;RootLayout   onInterceptTouchEvent &gt;&gt;&gt;&gt;&gt;&gt;&gt;&quot;);\n        return false;\n    }\n\n    @Override\n    public boolean onTouchEvent(MotionEvent event) {\n        switch (event.getAction()) {\n        case MotionEvent.ACTION_UP:\n            Logs.i(&quot;RootLayout onTouchEvent \u4e8b\u4ef6 ACTION_UP&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&quot;);\n            break;\n        case MotionEvent.ACTION_MOVE:\n            Logs.v(&quot;RootLayout onTouchEvent \u4e8b\u4ef6   ACTION_MOVE&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&quot;);\n            break;\n        case MotionEvent.ACTION_DOWN:\n            Logs.d(&quot;RootLayout onTouchEvent \u4e8b\u4ef6  ACTION_DOWN&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&quot;);\n            break;\n        }\n        return true;\n    }\n}<\/code><\/pre>\n<pre style=\"overflow: auto hidden; word-break: normal; white-space: pre; tab-size: 2; border-radius: 5px; line-height: 2; margin: 1em 0.5em; padding: 0.5em; box-shadow: rgba(0, 0, 0, 0.55) 0px 1px 5px; font-size: 10px; background: #002b36; max-width: 100%; overflow-wrap: normal;\"><code class=\"hljs\" style=\"word-break: normal; white-space: nowrap; tab-size: 2; font-size: 10px; font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; display: block; margin: 0.5em; padding: 3px 5px; overflow-x: auto; color: #93a1a1; background: #002b36; overflow-wrap: normal;\">public class TwotLayout extends LinearLayout {\n\n    public TwotLayout(Context context, AttributeSet attrs) {\n        super(context, attrs);\n    }\n\n    @Override\n    public boolean onInterceptTouchEvent(MotionEvent ev) {\n        Logs.i(&quot;TwotLayout   onInterceptTouchEvent &gt;&gt;&gt;&gt;&gt;&gt;&gt;&quot;);\n        return false;\n    }\n\n    @Override\n    public boolean onTouchEvent(MotionEvent event) {\n        switch (event.getAction()) {\n        case MotionEvent.ACTION_UP:\n            Logs.i(&quot;TwotLayout onTouchEvent \u4e8b\u4ef6 ACTION_UP&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&quot;);\n            break;\n        case MotionEvent.ACTION_MOVE:\n            Logs.v(&quot;TwotLayout onTouchEvent \u4e8b\u4ef6   ACTION_MOVE&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&quot;);\n            break;\n        case MotionEvent.ACTION_DOWN:\n            Logs.d(&quot;TwotLayout onTouchEvent \u4e8b\u4ef6  ACTION_DOWN&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&quot;);\n            break;\n        }\n        return false;\n    }\n}<\/code><\/pre>\n<pre style=\"overflow: auto hidden; word-break: normal; white-space: pre; tab-size: 2; border-radius: 5px; line-height: 2; margin: 1em 0.5em; padding: 0.5em; box-shadow: rgba(0, 0, 0, 0.55) 0px 1px 5px; font-size: 10px; background: #002b36; max-width: 100%; overflow-wrap: normal;\"><code class=\"hljs\" style=\"word-break: normal; white-space: nowrap; tab-size: 2; font-size: 10px; font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; display: block; margin: 0.5em; padding: 3px 5px; overflow-x: auto; color: #93a1a1; background: #002b36; overflow-wrap: normal;\">public class ChildTextView extends TextView {\n\n    public ChildTextView(Context context, AttributeSet attrs) {\n        super(context, attrs);\n    }\n\n    @Override\n    public boolean onTouchEvent(MotionEvent event) {\n        switch (event.getAction()) {\n        case MotionEvent.ACTION_UP:\n            Logs.i(&quot;ChildTextView onTouchEvent \u4e8b\u4ef6 ACTION_UP&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&quot;);\n            break;\n        case MotionEvent.ACTION_MOVE:\n            Logs.v(&quot;ChildTextView onTouchEvent \u4e8b\u4ef6   ACTION_MOVE&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&quot;);\n            break;\n        case MotionEvent.ACTION_DOWN:\n            Logs.d(&quot;ChildTextView onTouchEvent \u4e8b\u4ef6  ACTION_DOWN&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&quot;);\n            break;\n        }\n        return true;\n    }\n}<\/code><\/pre>\n<hr>\n<h2 style=\"margin: 1.2em 0px 1em; padding: 0px; font-weight: bold; font-size: 1.3em; border-bottom: 2px solid #ef7060; display: flex;\"><span style=\"display: inline-block; font-weight: bold; background: #ef7060; color: #ffffff; padding: 3px 10px 1px; border-top-right-radius: 3px; border-top-left-radius: 3px; margin-right: 3px;\">\u56db\u3001\u573a\u666f\u4e00\uff1a\u5b50 View \u6d88\u8d39 DOWN<\/span><\/h2>\n<p style=\"margin: 1em 0px;\">RootLayout\u3001TwotLayout \u7684 onInterceptTouchEvent \u90fd\u8fd4\u56de false\uff08\u4e0d\u62e6\u622a\uff09\uff0cChildTextView \u7684 onTouchEvent \u8fd4\u56de true\uff0c\u6d88\u8d39\u7b2c\u4e00\u4e2a ACTION_DOWN\uff1a<\/p>\n<p style=\"margin: 1em 0px;\"><a href=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2015\/09\/QQ\u255c\u256a\u2550\u255d20150908162721.png\" rel=\"fancybox\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-997\" src=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2015\/09\/QQ\u255c\u256a\u2550\u255d20150908162721.png\" alt=\"QQ\u255c\u256a\u2550\u255d20150908162721\" width=\"405\" height=\"142\" \/><\/a><\/p>\n<p style=\"margin: 1em 0px;\"><a href=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2015\/09\/QQ\u255c\u256a\u2550\u255d20150908163419.png\" rel=\"fancybox\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone  wp-image-998\" src=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2015\/09\/QQ\u255c\u256a\u2550\u255d20150908163419.png\" alt=\"QQ\u255c\u256a\u2550\u255d20150908163419\" width=\"347\" height=\"257\" \/><\/a><\/p>\n<p style=\"margin: 1em 0px;\"><a href=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2015\/09\/QQ\u255c\u256a\u2550\u255d20150908163514.png\" rel=\"fancybox\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone  wp-image-999\" src=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2015\/09\/QQ\u255c\u256a\u2550\u255d20150908163514.png\" alt=\"QQ\u255c\u256a\u2550\u255d20150908163514\" width=\"339\" height=\"255\" \/><\/a><\/p>\n<hr>\n<h2 style=\"margin: 1.2em 0px 1em; padding: 0px; font-weight: bold; font-size: 1.3em; border-bottom: 2px solid #ef7060; display: flex;\"><span style=\"display: inline-block; font-weight: bold; background: #ef7060; color: #ffffff; padding: 3px 10px 1px; border-top-right-radius: 3px; border-top-left-radius: 3px; margin-right: 3px;\">\u4e94\u3001\u573a\u666f\u4e8c\uff1a\u5b50 View \u4e0d\u6d88\u8d39 DOWN<\/span><\/h2>\n<p style=\"margin: 1em 0px;\">\u540c\u6837\u4e0d\u62e6\u622a\uff0c\u4f46 ChildTextView \u7684 onTouchEvent \u8fd4\u56de false\uff0c\u4e0d\u6d88\u8d39 ACTION_DOWN\uff1a<\/p>\n<p style=\"margin: 1em 0px;\"><a href=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2015\/09\/QQ\u255c\u256a\u2550\u255d20150908163649.png\" rel=\"fancybox\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-1000\" src=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2015\/09\/QQ\u255c\u256a\u2550\u255d20150908163649.png\" alt=\"QQ\u255c\u256a\u2550\u255d20150908163649\" width=\"377\" height=\"128\" \/><\/a><\/p>\n<p style=\"margin: 1em 0px;\"><a href=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2015\/09\/QQ\u255c\u256a\u2550\u255d20150908163832.png\" rel=\"fancybox\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone  wp-image-1001\" src=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2015\/09\/QQ\u255c\u256a\u2550\u255d20150908163832.png\" alt=\"QQ\u255c\u256a\u2550\u255d20150908163832\" width=\"355\" height=\"267\" \/><\/a><\/p>\n<p style=\"margin: 1em 0px;\"><a href=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2015\/09\/QQ\u255c\u256a\u2550\u255d20150908164027.png\" rel=\"fancybox\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone  wp-image-1002\" src=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2015\/09\/QQ\u255c\u256a\u2550\u255d20150908164027.png\" alt=\"QQ\u255c\u256a\u2550\u255d20150908164027\" width=\"347\" height=\"263\" \/><\/a><\/p>\n<hr>\n<h2 style=\"margin: 1.2em 0px 1em; padding: 0px; font-weight: bold; font-size: 1.3em; border-bottom: 2px solid #ef7060; display: flex;\"><span style=\"display: inline-block; font-weight: bold; background: #ef7060; color: #ffffff; padding: 3px 10px 1px; border-top-right-radius: 3px; border-top-left-radius: 3px; margin-right: 3px;\">\u516d\u3001\u603b\u89c8\u56fe\u4e0e\u53c2\u8003<\/span><\/h2>\n<p style=\"margin: 1em 0px;\">\u4e8b\u4ef6\u4f20\u8f93\u66f4\u7ec6\u7684\u8bb2\u89e3\u63a8\u8350 kelin \u8fd9\u7bc7\u6587\u7ae0\uff1a<a href=\"http:\/\/www.jianshu.com\/p\/e99b5e8bd67b\">http:\/\/www.jianshu.com\/p\/e99b5e8bd67b<\/a>\u3002<\/p>\n<p style=\"margin: 1em 0px;\"><a href=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2015\/09\/966283-b9cb65aceea9219b.png\" rel=\"fancybox\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone  wp-image-1681\" src=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2015\/09\/966283-b9cb65aceea9219b.png\" alt=\"966283-b9cb65aceea9219b\" width=\"735\" height=\"525\" srcset=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2015\/09\/966283-b9cb65aceea9219b.png 885w, https:\/\/ai.zhousir.top\/wp-content\/uploads\/2015\/09\/966283-b9cb65aceea9219b-140x100.png 140w\" sizes=\"(max-width: 735px) 100vw, 735px\" \/><\/a><\/p>\n<p style=\"margin: 1em 0px;\">\u53c2\u8003\uff1a<\/p>\n<ul style=\"padding-left: 1rem; margin-left: 1rem; font-size: 0.9rem; list-style-type: disc;\">\n<li>\n<section><a href=\"http:\/\/blog.csdn.net\/yanzi1225627\/article\/details\/22592831\">\u7ec6\u8bf4Android\u4e8b\u4ef6\u4f20\u9012\u673a\u5236(dispatchTouchEvent\u3001onInterceptTouchEvent\u3001onTouchEvent)<\/a><\/section>\n<\/li>\n<li>\n<section><a href=\"http:\/\/blog.csdn.net\/lvxiangan\/article\/details\/9309927\">Android-onInterceptTouchEvent()\u548conTouchEvent()\u603b\u7ed3<\/a><\/section>\n<\/li>\n<li>\n<section><a href=\"http:\/\/blog.csdn.net\/guitk\/article\/details\/7057155\">Android\u4e2ddispatchTouchEvent, onInterceptTouchEvent, onTouchEvent\u7684\u7406\u89e3<\/a><\/section>\n<\/li>\n<\/ul>\n<blockquote style=\"margin: 20px 0px; display: block; font-size: 0.9em; overflow: auto; border-left: 3px solid #ef7060; color: #6a737d; padding: 10px 10px 10px 20px; background: #fff9f9;\">\n<p style=\"margin: 1em 0px;\"><strong>\u4e00\u53e5\u8bdd\u603b\u7ed3\uff1a\u5206\u53d1\u5411\u4e0b\u3001\u62e6\u622a\u5728 ViewGroup\u3001\u5904\u7406\u4ece\u5b50\u5230\u7236\uff1b\u6ca1\u6d88\u8d39 ACTION_DOWN\uff0c\u540e\u7eed MOVE\/UP \u90fd\u4e0d\u4f1a\u6765\u3002<\/strong><\/p>\n<\/blockquote>\n<\/section>\n","protected":false},"excerpt":{"rendered":"<p>Android \u4e8b\u4ef6\u5904\u7406\u66f4\u51c6\u786e\u7684\u8bf4\u6cd5\u662f\u300c\u5206\u53d1\u3001\u62e6\u622a\u3001\u5904\u7406\u300d\u3002\u6838\u5fc3\u662f\u4e09\u4e2a\u65b9\u6cd5\uff1adispatchTouchEven [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[45],"tags":[196],"_links":{"self":[{"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=\/wp\/v2\/posts\/995"}],"collection":[{"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=995"}],"version-history":[{"count":3,"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=\/wp\/v2\/posts\/995\/revisions"}],"predecessor-version":[{"id":1683,"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=\/wp\/v2\/posts\/995\/revisions\/1683"}],"wp:attachment":[{"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=995"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=995"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=995"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}