// Path: app/src/main/java/com/sdwfqin/sample/view/bottomzoom/BottomZoomActivity.java
// public class BottomZoomActivity extends AppCompatActivity {
// 
//     @BindView(R.id.animator1_btn)
//     Button animator1Btn;
// 
//     @Override
//     protected void onCreate(Bundle savedInstanceState) {
//         super.onCreate(savedInstanceState);
//         setContentView(R.layout.activity_animator1);
//         ButterKnife.bind(this);
// 
//         animator1Btn.setOnClickListener(v -> setButtonSize(300, 300));
//     }
// 
//     private void setButtonSize(int x, int y) {
// 
//         ViewWrapper viewWrapper = new ViewWrapper(animator1Btn);
// 
//         // 动画集合，同时执行下面的动画效果
//         AnimatorSet set = new AnimatorSet();
//         set.playTogether(
//                 ObjectAnimator.ofInt(viewWrapper, "width",
//                         ConvertUtils.dp2px(x)),
//                 ObjectAnimator.ofInt(viewWrapper, "height",
//                         ConvertUtils.dp2px(y))
//         );
// 
//         set.setDuration(5000).start();
//     }
// 
//     /**
//      * 用一个类来包装原始对象，间接为其提供get和set方法
//      * 对象的大小要在xml定死，不然与预想的效果不一样
//      */
//     private class ViewWrapper {
//         private View mTarget;
// 
//         public ViewWrapper(View target) {
//             mTarget = target;
//         }
// 
//         public int getWidth() {
//             return mTarget.getLayoutParams().width;
//         }
// 
//         public void setWidth(int width) {
//             mTarget.getLayoutParams().width = width;
//             mTarget.requestLayout();
//         }
// 
//         public int getHeight() {
//             return mTarget.getLayoutParams().height;
//         }
// 
//         public void setHeight(int height) {
//             mTarget.getLayoutParams().height = height;
//             mTarget.requestLayout();
//         }
//     }
// }
// 
// Path: app/src/main/java/com/sdwfqin/sample/view/motionslop/MeTsActivity.java
// public class MeTsActivity extends AppCompatActivity {
// 
//     @Override
//     protected void onCreate(Bundle savedInstanceState) {
//         super.onCreate(savedInstanceState);
//         setContentView(R.layout.activity_me_ts);
//     }
// }
// 
// Path: app/src/main/java/com/sdwfqin/sample/view/rippleanimation/RippleAnimationActivity.java
// public class RippleAnimationActivity extends AppCompatActivity {
// 
//     @BindView(R.id.ImageView)
//     android.widget.ImageView mImageView;
//     @BindView(R.id.layout_RippleAnimation)
//     RippleAnimationView mLayoutRippleAnimation;
// 
//     @Override
//     protected void onCreate(Bundle savedInstanceState) {
//         super.onCreate(savedInstanceState);
//         setContentView(R.layout.activity_ripple_animation);
//         ButterKnife.bind(this);
// 
//         mImageView = findViewById(R.id.ImageView);
//         mLayoutRippleAnimation = findViewById(R.id.layout_RippleAnimation);
// 
//         mImageView.setOnClickListener(view -> {
//             if (mLayoutRippleAnimation.isRippleRunning()) {
//                 mLayoutRippleAnimation.stopRippleAnimation();
//             } else {
//                 mLayoutRippleAnimation.startRippleAnimation();
//             }
//         });
//     }
// }


import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import com.sdwfqin.sample.R;
import com.sdwfqin.sample.view.bottomzoom.BottomZoomActivity;
import com.sdwfqin.sample.view.courtesycard.CourtesyCardActivity;
import com.sdwfqin.sample.view.delbtn.DeleteButtonActivity;
import com.sdwfqin.sample.view.descircle.DesCircleActivity;
import com.sdwfqin.sample.view.gesturedetector.GestureDetectorActivity;
import com.sdwfqin.sample.view.motionslop.MeTsActivity;
import com.sdwfqin.sample.view.paypwdinput.PayPwdInputActivity;
import com.sdwfqin.sample.view.rippleanimation.RippleAnimationActivity;
import com.sdwfqin.sample.view.scroller.ScrollerActivity;
import com.sdwfqin.sample.view.surface.SurfaceActivity;
import com.sdwfqin.sample.view.surfacepalette.SurfacePaletteActivity;
import com.sdwfqin.sample.view.viewevent.ViewEventActivity;
import com.sdwfqin.sample.view.viewposition.ViewPositionActivity;
import butterknife.BindView;
import butterknife.ButterKnife;
package com.sdwfqin.sample.view;




/**
 * 描述：View相关
 *
 * @author zhangqin
 */
public class ViewActivity extends AppCompatActivity {

    @BindView(R.id.list)
    ListView mViewList;
    private Context mContext;

    private String[] mStrings = new String[]{"View的位置参数", "MotionEvent与TouchSlop", "GestureDetector", "Scroller",
            "View触摸事件分发", "按钮放大（属性动画）", "自定义View1圆", "自定义View2凹凸边缘", "SurfaceView",
            "SurfaceView画板", "自定义输入密码", "网易云听歌识曲", "长按删除按钮"};
    private Class[] mClasses = new Class[]{ViewPositionActivity.class, MeTsActivity.class,
            GestureDetectorActivity.class, ScrollerActivity.class, ViewEventActivity.class,
            BottomZoomActivity.class, DesCircleActivity.class, CourtesyCardActivity.class, SurfaceActivity.class,
            SurfacePaletteActivity.class, PayPwdInputActivity.class,
// Path: app/src/main/java/com/sdwfqin/sample/view/bottomzoom/BottomZoomActivity.java
// public class BottomZoomActivity extends AppCompatActivity {
// 
//     @BindView(R.id.animator1_btn)
//     Button animator1Btn;
// 
//     @Override
//     protected void onCreate(Bundle savedInstanceState) {
//         super.onCreate(savedInstanceState);
//         setContentView(R.layout.activity_animator1);
//         ButterKnife.bind(this);
// 
//         animator1Btn.setOnClickListener(v -> setButtonSize(300, 300));
//     }
// 
//     private void setButtonSize(int x, int y) {
// 
//         ViewWrapper viewWrapper = new ViewWrapper(animator1Btn);
// 
//         // 动画集合，同时执行下面的动画效果
//         AnimatorSet set = new AnimatorSet();
//         set.playTogether(
//                 ObjectAnimator.ofInt(viewWrapper, "width",
//                         ConvertUtils.dp2px(x)),
//                 ObjectAnimator.ofInt(viewWrapper, "height",
//                         ConvertUtils.dp2px(y))
//         );
// 
//         set.setDuration(5000).start();
//     }
// 
//     /**
//      * 用一个类来包装原始对象，间接为其提供get和set方法
//      * 对象的大小要在xml定死，不然与预想的效果不一样
//      */
//     private class ViewWrapper {
//         private View mTarget;
// 
//         public ViewWrapper(View target) {
//             mTarget = target;
//         }
// 
//         public int getWidth() {
//             return mTarget.getLayoutParams().width;
//         }
// 
//         public void setWidth(int width) {
//             mTarget.getLayoutParams().width = width;
//             mTarget.requestLayout();
//         }
// 
//         public int getHeight() {
//             return mTarget.getLayoutParams().height;
//         }
// 
//         public void setHeight(int height) {
//             mTarget.getLayoutParams().height = height;
//             mTarget.requestLayout();
//         }
//     }
// }
// 
// Path: app/src/main/java/com/sdwfqin/sample/view/motionslop/MeTsActivity.java
// public class MeTsActivity extends AppCompatActivity {
// 
//     @Override
//     protected void onCreate(Bundle savedInstanceState) {
//         super.onCreate(savedInstanceState);
//         setContentView(R.layout.activity_me_ts);
//     }
// }
// 
// Path: app/src/main/java/com/sdwfqin/sample/view/rippleanimation/RippleAnimationActivity.java
// public class RippleAnimationActivity extends AppCompatActivity {
// 
//     @BindView(R.id.ImageView)
//     android.widget.ImageView mImageView;
//     @BindView(R.id.layout_RippleAnimation)
//     RippleAnimationView mLayoutRippleAnimation;
// 
//     @Override
//     protected void onCreate(Bundle savedInstanceState) {
//         super.onCreate(savedInstanceState);
//         setContentView(R.layout.activity_ripple_animation);
//         ButterKnife.bind(this);
// 
//         mImageView = findViewById(R.id.ImageView);
//         mLayoutRippleAnimation = findViewById(R.id.layout_RippleAnimation);
// 
//         mImageView.setOnClickListener(view -> {
//             if (mLayoutRippleAnimation.isRippleRunning()) {
//                 mLayoutRippleAnimation.stopRippleAnimation();
//             } else {
//                 mLayoutRippleAnimation.startRippleAnimation();
//             }
//         });
//     }
// }


// Path: app/src/main/java/com/sdwfqin/sample/view/ViewActivity.java
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import com.sdwfqin.sample.R;
import com.sdwfqin.sample.view.bottomzoom.BottomZoomActivity;
import com.sdwfqin.sample.view.courtesycard.CourtesyCardActivity;
import com.sdwfqin.sample.view.delbtn.DeleteButtonActivity;
import com.sdwfqin.sample.view.descircle.DesCircleActivity;
import com.sdwfqin.sample.view.gesturedetector.GestureDetectorActivity;
import com.sdwfqin.sample.view.motionslop.MeTsActivity;
import com.sdwfqin.sample.view.paypwdinput.PayPwdInputActivity;
import com.sdwfqin.sample.view.rippleanimation.RippleAnimationActivity;
import com.sdwfqin.sample.view.scroller.ScrollerActivity;
import com.sdwfqin.sample.view.surface.SurfaceActivity;
import com.sdwfqin.sample.view.surfacepalette.SurfacePaletteActivity;
import com.sdwfqin.sample.view.viewevent.ViewEventActivity;
import com.sdwfqin.sample.view.viewposition.ViewPositionActivity;
import butterknife.BindView;
import butterknife.ButterKnife;

package com.sdwfqin.sample.view;




/**
 * 描述：View相关
 *
 * @author zhangqin
 */
public class ViewActivity extends AppCompatActivity {

    @BindView(R.id.list)
    ListView mViewList;
    private Context mContext;

    private String[] mStrings = new String[]{"View的位置参数", "MotionEvent与TouchSlop", "GestureDetector", "Scroller",
            "View触摸事件分发", "按钮放大（属性动画）", "自定义View1圆", "自定义View2凹凸边缘", "SurfaceView",
            "SurfaceView画板", "自定义输入密码", "网易云听歌识曲", "长按删除按钮"};
    private Class[] mClasses = new Class[]{ViewPositionActivity.class, MeTsActivity.class,
            GestureDetectorActivity.class, ScrollerActivity.class, ViewEventActivity.class,
            BottomZoomActivity.class, DesCircleActivity.class, CourtesyCardActivity.class, SurfaceActivity.class,
            SurfacePaletteActivity.class, PayPwdInputActivity.class,
            RippleAnimationActivity.class, DeleteButtonActivity.class};