Skip to content

Commit

Permalink
Added support for Android 5.x
Browse files Browse the repository at this point in the history
  • Loading branch information
rgocal committed Mar 9, 2019
1 parent 6905e08 commit 19ec0db
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.0'
classpath 'com.android.tools.build:gradle:3.3.1'


// NOTE: Do not place your application dependencies here; they belong
Expand Down
2 changes: 1 addition & 1 deletion example/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ android {
compileSdkVersion 28
defaultConfig {
applicationId "com.gsd.mpm.materialpopupexample"
minSdkVersion 23
minSdkVersion 21
targetSdkVersion 28
versionCode 1
versionName "1.0"
Expand Down
6 changes: 3 additions & 3 deletions library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ apply plugin: 'com.android.library'
android {
compileSdkVersion 28
defaultConfig {
minSdkVersion 23
minSdkVersion 21
targetSdkVersion 28
versionCode 4
versionName "1.10"
versionCode 5
versionName "1.15"
}
buildTypes {
release {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import android.graphics.PorterDuff;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.util.DisplayMetrics;
import android.view.Gravity;
import android.view.LayoutInflater;
Expand Down Expand Up @@ -156,9 +157,11 @@ public float getInterpolation(float t) {
mTrack = mRootView.findViewById(R.id.tracks);

//Set the pop colors by strings if desired
mScrollColor = mContext.getColor(R.color.popup_scroll_color);
mTrackColor = mContext.getColor(R.color.popup_track_color);
mBodyColor = mContext.getColor(R.color.popup_body_color);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
mScrollColor = mContext.getColor(R.color.popup_scroll_color);
mTrackColor = mContext.getColor(R.color.popup_track_color);
mBodyColor = mContext.getColor(R.color.popup_body_color);
}

//Initialize the IDs
mArrowDown = mRootView.findViewById(R.id.arrow_down);
Expand Down

0 comments on commit 19ec0db

Please sign in to comment.