Skip to content

Commit

Permalink
2.0: compat 7.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
woxingxiao committed Mar 11, 2017
1 parent 29929e8 commit b7983f9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions bubbleseekbar/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ android {
defaultConfig {
minSdkVersion 14
targetSdkVersion 25
versionCode 9
versionName "1.9"
versionCode 10
versionName "2.0"
}

buildTypes {
Expand All @@ -22,5 +22,5 @@ android {

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
provided 'com.android.support:appcompat-v7:25.1.0'
provided 'com.android.support:appcompat-v7:25.2.0'
}
4 changes: 3 additions & 1 deletion bubbleseekbar/src/main/java/com/xw/repo/BubbleSeekBar.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import android.graphics.PixelFormat;
import android.graphics.Rect;
import android.graphics.RectF;
import android.os.Build;
import android.os.Bundle;
import android.os.Parcelable;
import android.support.annotation.ColorInt;
Expand Down Expand Up @@ -566,7 +567,8 @@ private void showBubble() {
mLayoutParams.flags = WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL
| WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE
| WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED;
if (BuildUtils.isMIUI()) { // MIUI禁止了开发者使用TYPE_TOAST
// MIUI禁止了开发者使用TYPE_TOAST,Android 7.1.1 对TYPE_TOAST的使用更严格
if (BuildUtils.isMIUI() || Build.VERSION.SDK_INT >= Build.VERSION_CODES.N_MR1) {
mLayoutParams.type = WindowManager.LayoutParams.TYPE_APPLICATION;
} else {
mLayoutParams.type = WindowManager.LayoutParams.TYPE_TOAST;
Expand Down

0 comments on commit b7983f9

Please sign in to comment.