Skip to content

Commit

Permalink
[Upgrading Google Support to v26] Fixing crash on Android 26
Browse files Browse the repository at this point in the history
  • Loading branch information
BijoySingh committed Nov 1, 2017
1 parent b838efc commit fdfb49c
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 14 deletions.
4 changes: 3 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
classpath 'com.android.tools.build:gradle:3.0.0'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.4'

Expand All @@ -17,6 +18,7 @@ buildscript {
allprojects {
repositories {
jcenter()
google()
}
}

Expand Down
14 changes: 7 additions & 7 deletions floating-bubble/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'

android {
compileSdkVersion 25
buildToolsVersion "25.0.0"
compileSdkVersion 26
buildToolsVersion "26.0.2"

defaultConfig {
minSdkVersion 17
targetSdkVersion 25
targetSdkVersion 26
versionCode 1
versionName "1.0"
}
Expand All @@ -21,9 +21,9 @@ android {

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile "com.android.support:support-core-utils:25.2.0"
compile "com.android.support:support-v4:25.2.0"
compile 'com.android.support:cardview-v7:25.2.0'
compile "com.android.support:support-core-utils:26.1.0"
compile "com.android.support:support-v4:26.1.0"
compile 'com.android.support:cardview-v7:26.1.0'
}

ext {
Expand All @@ -39,7 +39,7 @@ ext {
siteUrl = 'https://github.com/BijoySingh/FloatingBubbleLib'
gitUrl = 'https://github.com/BijoySingh/FloatingBubbleLib.git'

libraryVersion = '1.0.6'
libraryVersion = '1.2.0'

developerId = 'bijoysingh693'
developerName = 'Bijoy Singh Kochar'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import android.content.res.Resources;
import android.graphics.PixelFormat;
import android.graphics.Point;
import android.os.Build;
import android.os.IBinder;
import android.support.annotation.NonNull;
import android.support.v7.widget.CardView;
Expand Down Expand Up @@ -280,7 +281,9 @@ protected WindowManager.LayoutParams getDefaultWindowParams(int width, int heigh
return new WindowManager.LayoutParams(
width,
height,
WindowManager.LayoutParams.TYPE_PHONE,
Build.VERSION.SDK_INT >= 26
? WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY
: WindowManager.LayoutParams.TYPE_PHONE,
WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE
| WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH
| WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS,
Expand Down
10 changes: 5 additions & 5 deletions sampleapp/build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 25
buildToolsVersion "25.0.0"
compileSdkVersion 26
buildToolsVersion "26.0.2"

defaultConfig {
applicationId "com.bsk.sampleapp"
minSdkVersion 17
targetSdkVersion 25
targetSdkVersion 26
versionCode 1
versionName "1.0"

Expand All @@ -27,8 +27,8 @@ dependencies {
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.2.0'
compile "com.android.support:support-core-utils:25.2.0"
compile 'com.android.support:appcompat-v7:26.1.0'
compile "com.android.support:support-core-utils:26.1.0"
compile project(':floating-bubble')
testCompile 'junit:junit:4.12'
}

0 comments on commit fdfb49c

Please sign in to comment.