mirror of
https://github.com/HackPlan/AndroidArcMenu.git
synced 2026-06-15 23:12:40 +08:00
clear unused code
This commit is contained in:
@@ -1,9 +1,7 @@
|
||||
package com.hackplan.androidarcmenu;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import android.support.annotation.DrawableRes;
|
||||
import android.text.TextUtils;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
|
||||
@@ -3,8 +3,6 @@ package com.hackplan.androidarcmenu;
|
||||
import android.animation.Animator;
|
||||
import android.content.Context;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.Paint;
|
||||
import android.graphics.Point;
|
||||
import android.graphics.Rect;
|
||||
import android.support.v4.view.MotionEventCompat;
|
||||
@@ -24,7 +22,6 @@ import com.hackplan.androidarcmenu.ArcMenu.OnClickBtnListener;
|
||||
*/
|
||||
|
||||
public class ArcMenuLayout extends ViewGroup implements Animator.AnimatorListener{
|
||||
private Paint paint;
|
||||
private Point touchPoint = new Point();
|
||||
private final Rect mScreenRect = new Rect();
|
||||
private Rect tempRect = new Rect();
|
||||
@@ -42,12 +39,6 @@ public class ArcMenuLayout extends ViewGroup implements Animator.AnimatorListene
|
||||
|
||||
public ArcMenuLayout(Context context, AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
init();
|
||||
}
|
||||
|
||||
private void init() {
|
||||
paint = new Paint(Paint.ANTI_ALIAS_FLAG);
|
||||
paint.setColor(Color.BLUE);
|
||||
}
|
||||
|
||||
public boolean isShow() {
|
||||
|
||||
@@ -1,64 +0,0 @@
|
||||
package com.hackplan.androidarcmenu.demo;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.widget.RelativeLayout;
|
||||
|
||||
import timber.log.Timber;
|
||||
|
||||
/**
|
||||
* Created by Dacer on 13/11/2016.
|
||||
*/
|
||||
|
||||
public class TestLatyout extends RelativeLayout {
|
||||
private boolean shouldIntercept = false;
|
||||
|
||||
public TestLatyout(Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
public TestLatyout(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
}
|
||||
|
||||
public TestLatyout(Context context, AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onAttachedToWindow() {
|
||||
super.onAttachedToWindow();
|
||||
Timber.e("getch %s", getChildAt(1).getMeasuredWidth());
|
||||
getChildAt(1).setOnLongClickListener(new OnLongClickListener() {
|
||||
@Override
|
||||
public boolean onLongClick(View v) {
|
||||
Timber.e("LLL");
|
||||
shouldIntercept = true;
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean dispatchTouchEvent(MotionEvent ev) {
|
||||
Timber.e("dispatchTouchEvent");
|
||||
return super.dispatchTouchEvent(ev);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onInterceptTouchEvent(MotionEvent ev) {
|
||||
Timber.e("onInterceptTouchEvent");
|
||||
if (shouldIntercept) {
|
||||
return true;
|
||||
}
|
||||
return super.onInterceptTouchEvent(ev);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onTouchEvent(MotionEvent event) {
|
||||
Timber.e("onTouchEvent");
|
||||
return super.onTouchEvent(event);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user