[AppleScript] 纯文本查看 复制代码
package com.itheima.touchdemo;
import android.graphics.Color;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.Gravity;
import android.view.View;
import android.widget.FrameLayout;
import android.widget.LinearLayout;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
View view = init_view();
setContentView(view);
}
private View init_view() {
MyFrameLayout myFrameLayout = new MyFrameLayout(this);
myFrameLayout.setBackgroundColor(Color.RED);
MyLinearLayout myLinearLayout = new MyLinearLayout(this);
myLinearLayout.setBackgroundColor(Color.GREEN);
FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(200, 200);
params.gravity = Gravity.CENTER;
myFrameLayout.addView(myLinearLayout, params);
MyView myView = new MyView(this);
myView.setBackgroundColor(Color.GRAY);
FrameLayout.LayoutParams params2 = new FrameLayout.LayoutParams(100,
100);
params2.gravity = Gravity.CENTER;
myFrameLayout.addView(myView, params2);
return myFrameLayout;
}
}
[AppleScript] 纯文本查看 复制代码
05-29 07:00:21.859 2367-2367/com.itheima.touchdemo I/System.out: FrameLayout---->dispatchTouchEvent---start
05-29 07:00:21.859 2367-2367/com.itheima.touchdemo I/System.out: FrameLayout---->onInterceptTouchEvent---start
05-29 07:00:21.859 2367-2367/com.itheima.touchdemo I/System.out: FrameLayout---->onInterceptTouchEvent---end---false
05-29 07:00:21.859 2367-2367/com.itheima.touchdemo I/System.out: View---->dispatchTouchEvent---start
05-29 07:00:21.859 2367-2367/com.itheima.touchdemo I/System.out: View---->onTouchEvent---start
05-29 07:00:21.859 2367-2367/com.itheima.touchdemo I/System.out: View---->onTouchEvent---end---false
05-29 07:00:21.859 2367-2367/com.itheima.touchdemo I/System.out: View---->dispatchTouchEvent---end--->false
05-29 07:00:21.859 2367-2367/com.itheima.touchdemo I/System.out: LinearLayout---->dispatchTouchEvent---start
05-29 07:00:21.859 2367-2367/com.itheima.touchdemo I/System.out: LinearLayout---->onInterceptTouchEvent---start
05-29 07:00:21.860 2367-2367/com.itheima.touchdemo I/System.out: LinearLayout---->onInterceptTouchEvent---end---false
05-29 07:00:21.860 2367-2367/com.itheima.touchdemo I/System.out: LinearLayout---->onTouchEvent---start
05-29 07:00:21.860 2367-2367/com.itheima.touchdemo I/System.out: LinearLayout---->onTouchEvent---end---false
05-29 07:00:21.860 2367-2367/com.itheima.touchdemo I/System.out: LinearLayout---->dispatchTouchEvent---end--->false
05-29 07:00:21.860 2367-2367/com.itheima.touchdemo I/System.out: FrameLayout---->onTouchEvent---start
05-29 07:00:21.860 2367-2367/com.itheima.touchdemo I/System.out: FrameLayout---->onTouchEvent---end---true
05-29 07:00:21.860 2367-2367/com.itheima.touchdemo I/System.out: FrameLayout---->dispatchTouchEvent---end--->true
[AppleScript] 纯文本查看 复制代码
05-29 07:02:13.393 3154-3154/com.itheima.touchdemo I/System.out: FrameLayout---->dispatchTouchEvent---start
05-29 07:02:13.393 3154-3154/com.itheima.touchdemo I/System.out: FrameLayout---->onInterceptTouchEvent---start
05-29 07:02:13.393 3154-3154/com.itheima.touchdemo I/System.out: FrameLayout---->onInterceptTouchEvent---end---false
05-29 07:02:13.393 3154-3154/com.itheima.touchdemo I/System.out: LinearLayout---->dispatchTouchEvent---start
05-29 07:02:13.394 3154-3154/com.itheima.touchdemo I/System.out: LinearLayout---->onInterceptTouchEvent---start
05-29 07:02:13.394 3154-3154/com.itheima.touchdemo I/System.out: LinearLayout---->onInterceptTouchEvent---end---false
05-29 07:02:13.394 3154-3154/com.itheima.touchdemo I/System.out: View---->dispatchTouchEvent---start
05-29 07:02:13.394 3154-3154/com.itheima.touchdemo I/System.out: View---->onTouchEvent---start
05-29 07:02:13.394 3154-3154/com.itheima.touchdemo I/System.out: View---->onTouchEvent---end---false
05-29 07:02:13.394 3154-3154/com.itheima.touchdemo I/System.out: View---->dispatchTouchEvent---end--->false
05-29 07:02:13.394 3154-3154/com.itheima.touchdemo I/System.out: LinearLayout---->onTouchEvent---start
05-29 07:02:13.395 3154-3154/com.itheima.touchdemo I/System.out: LinearLayout---->onTouchEvent---end---false
05-29 07:02:13.395 3154-3154/com.itheima.touchdemo I/System.out: LinearLayout---->dispatchTouchEvent---end--->false
05-29 07:02:13.395 3154-3154/com.itheima.touchdemo I/System.out: FrameLayout---->onTouchEvent---start
05-29 07:02:13.395 3154-3154/com.itheima.touchdemo I/System.out: FrameLayout---->onTouchEvent---end---true
05-29 07:02:13.395 3154-3154/com.itheima.touchdemo I/System.out: FrameLayout---->dispatchTouchEvent---end--->true