Skip to content

Commit

Permalink
拖拽轻微跳动bug没解决
Browse files Browse the repository at this point in the history
  • Loading branch information
gumingwei committed May 9, 2016
1 parent 2c776ba commit 2f17971
Show file tree
Hide file tree
Showing 13 changed files with 204 additions and 125 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ android {
applicationId "com.well.swipe"
minSdkVersion 14
targetSdkVersion 23
versionCode 6
versionName "1.0.6"
versionCode 7
versionName "1.0.8"

}
buildTypes {
Expand Down
15 changes: 5 additions & 10 deletions app/src/main/java/com/well/swipe/service/SwipeService.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.well.swipe.service;

import android.Manifest;
import android.app.ActivityManager;
import android.app.Notification;
import android.app.NotificationManager;
Expand All @@ -14,8 +13,6 @@
import android.content.IntentFilter;
import android.content.pm.PackageManager;
import android.database.ContentObserver;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Icon;
import android.media.AudioManager;
import android.net.wifi.WifiManager;
import android.os.Binder;
Expand All @@ -24,9 +21,6 @@
import android.os.IBinder;
import android.provider.Settings;
import android.support.annotation.Nullable;
import android.support.v4.app.ActivityCompat;
import android.support.v4.content.ContextCompat;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;

Expand All @@ -38,18 +32,14 @@
import com.well.swipe.SwipeApplication;
import com.well.swipe.ItemSwipeTools;
import com.well.swipe.activitys.SwipeSettingActivity;
import com.well.swipe.preference.PreferenceCategory;
import com.well.swipe.tools.SwipeBluetooth;
import com.well.swipe.tools.SwipeSetting;
import com.well.swipe.tools.ToolsStrategy;
import com.well.swipe.tools.WifiAndData;
import com.well.swipe.utils.SettingHelper;
import com.well.swipe.utils.Utils;
import com.well.swipe.view.AngleItemCommon;
import com.well.swipe.view.AngleItemStartUp;
import com.well.swipe.view.AngleLayout;
import com.well.swipe.view.AngleView;
import com.well.swipe.view.BubbleView;
import com.well.swipe.view.CatchView;
import com.well.swipe.view.OnDialogListener;
import com.well.swipe.view.PositionState;
Expand Down Expand Up @@ -687,6 +677,11 @@ public boolean swipeSwipeSetting() {
return false;
}

/**
* 是否是白名单
*
* @return
*/
private boolean isWhitelistPackage() {
ActivityManager mActivityManager = (ActivityManager) getSystemService(Context.ACTIVITY_SERVICE);
List<ActivityManager.RunningTaskInfo> infos = mActivityManager.getRunningTasks(1);
Expand Down
11 changes: 9 additions & 2 deletions app/src/main/java/com/well/swipe/view/AngleItemCommon.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import android.graphics.Bitmap;
import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;
Expand Down Expand Up @@ -31,6 +32,7 @@ public class AngleItemCommon extends RelativeLayout {
*/
private double mParentY;


public AngleItemCommon(Context context) {
this(context, null);
}
Expand All @@ -46,8 +48,13 @@ public AngleItemCommon(Context context, AttributeSet attrs, int defStyleAttr) {
@Override
protected void onFinishInflate() {
super.onFinishInflate();
mText = (TextView) findViewById(R.id.item_title);
mIcon = (ImageView) findViewById(R.id.item_icon);
mText = (TextView) findViewById(R.id.item_title);
}

@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
}

public void setTitle(String title) {
Expand All @@ -63,7 +70,7 @@ public void setItemIcon(Bitmap icon) {
}

public void setItemIconBackground(Drawable drawable) {
mIcon.setBackground(drawable);
mIcon.setBackgroundDrawable(drawable);
}

public void setIndex(int index) {
Expand Down
17 changes: 0 additions & 17 deletions app/src/main/java/com/well/swipe/view/AngleItemStartUp.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,23 +46,6 @@ protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
}

@Override
public boolean onTouchEvent(MotionEvent event) {

int action = event.getAction();
switch (action) {
case MotionEvent.ACTION_DOWN:

break;
case MotionEvent.ACTION_MOVE:

break;
case MotionEvent.ACTION_UP:
break;
}
return super.onTouchEvent(event);
}

public void showDelBtn() {
mDelIcon.setVisibility(View.VISIBLE);
}
Expand Down
Loading

0 comments on commit 2f17971

Please sign in to comment.