From 6bbb92fc002ec25dff74ccc2c9510af9b9c0b6ae Mon Sep 17 00:00:00 2001 From: Karim Abou Zeid Date: Sun, 7 Feb 2016 17:07:41 +0100 Subject: [PATCH] Updated libraries. --- app/build.gradle | 10 ++++----- .../gramophone/dialogs/SleepTimerDialog.java | 22 +++---------------- .../res/drawable/traditional_slider_thumb.xml | 8 ------- .../main/res/layout/dialog_sleep_timer.xml | 13 +++++------ app/src/main/res/values/styles.xml | 1 - 5 files changed, 14 insertions(+), 40 deletions(-) delete mode 100644 app/src/main/res/drawable/traditional_slider_thumb.xml diff --git a/app/build.gradle b/app/build.gradle index f63b834c..5c3fd252 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -96,8 +96,8 @@ android { dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) - compile('com.crashlytics.sdk.android:crashlytics:2.5.3@aar') { - transitive = true; + compile('com.crashlytics.sdk.android:crashlytics:2.5.5@aar') { + transitive = true } compile('com.h6ah4i.android.widget.advrecyclerview:advrecyclerview:0.8.5@aar') { @@ -111,7 +111,7 @@ dependencies { transitive = true } - compile('com.afollestad:material-cab:0.1.6@aar') { + compile('com.afollestad:material-cab:0.1.8@aar') { transitive = true } @@ -131,7 +131,7 @@ dependencies { compile 'com.android.support:percent:23.1.1' compile 'com.android.support:preference-v7:23.1.1' compile 'com.github.ksoichiro:android-observablescrollview:1.6.0' - compile 'com.github.semoncat.seekarc:library:0.1' + compile 'com.github.kabouzeid:SeekArc:80bdd8330e' compile 'com.github.kabouzeid:AndroidSlidingUpPanel:3.2.1' compile 'com.squareup.retrofit2:retrofit:2.0.0-beta4' compile 'com.squareup.retrofit2:converter-gson:2.0.0-beta4' @@ -143,5 +143,5 @@ dependencies { compile 'com.github.kabouzeid:AppIntro:3.3.0k' compile 'com.github.bumptech.glide:glide:3.7.0' compile 'com.github.bumptech.glide:okhttp3-integration:1.4.0@aar' - compile 'com.github.kabouzeid:RecyclerView-FastScroll:v1.4-kmod' + compile 'com.github.kabouzeid:RecyclerView-FastScroll:v1.6-kmod' } diff --git a/app/src/main/java/com/kabouzeid/gramophone/dialogs/SleepTimerDialog.java b/app/src/main/java/com/kabouzeid/gramophone/dialogs/SleepTimerDialog.java index 19712b1e..174cc74b 100644 --- a/app/src/main/java/com/kabouzeid/gramophone/dialogs/SleepTimerDialog.java +++ b/app/src/main/java/com/kabouzeid/gramophone/dialogs/SleepTimerDialog.java @@ -6,9 +6,6 @@ import android.app.PendingIntent; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; -import android.graphics.Paint; -import android.graphics.PorterDuff; -import android.graphics.drawable.Drawable; import android.os.Bundle; import android.os.CountDownTimer; import android.os.SystemClock; @@ -27,8 +24,6 @@ import com.kabouzeid.gramophone.util.MusicUtil; import com.kabouzeid.gramophone.util.PreferenceUtil; import com.triggertrap.seekarc.SeekArc; -import java.lang.reflect.Field; - import butterknife.Bind; import butterknife.ButterKnife; @@ -108,6 +103,9 @@ public class SleepTimerDialog extends DialogFragment { ButterKnife.bind(this, materialDialog.getCustomView()); + seekArc.setProgressColor(ThemeSingleton.get().positiveColor.getDefaultColor()); + seekArc.setThumbColor(ThemeSingleton.get().positiveColor.getDefaultColor()); + seekArc.post(new Runnable() { @Override public void run() { @@ -118,20 +116,6 @@ public class SleepTimerDialog extends DialogFragment { FrameLayout.LayoutParams layoutParams = new FrameLayout.LayoutParams(seekArc.getLayoutParams()); layoutParams.height = small; seekArc.setLayoutParams(layoutParams); - - try { - Field f1 = SeekArc.class.getDeclaredField("mThumb"); - f1.setAccessible(true); - Drawable thumb = (Drawable) f1.get(seekArc); - thumb.setColorFilter(ThemeSingleton.get().positiveColor.getDefaultColor(), PorterDuff.Mode.SRC_IN); - - Field f2 = SeekArc.class.getDeclaredField("mProgressPaint"); - f2.setAccessible(true); - Paint progressPaint = (Paint) f2.get(seekArc); - progressPaint.setColor(ThemeSingleton.get().positiveColor.getDefaultColor()); - } catch (Exception e) { - e.printStackTrace(); - } } }); diff --git a/app/src/main/res/drawable/traditional_slider_thumb.xml b/app/src/main/res/drawable/traditional_slider_thumb.xml deleted file mode 100644 index 594829ac..00000000 --- a/app/src/main/res/drawable/traditional_slider_thumb.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - \ No newline at end of file diff --git a/app/src/main/res/layout/dialog_sleep_timer.xml b/app/src/main/res/layout/dialog_sleep_timer.xml index 576c46e7..cf096858 100644 --- a/app/src/main/res/layout/dialog_sleep_timer.xml +++ b/app/src/main/res/layout/dialog_sleep_timer.xml @@ -10,13 +10,12 @@ android:layout_height="wrap_content" android:layout_gravity="center" android:padding="30dp" - seekarc:clockwise="false" - seekarc:max="120" - seekarc:progressColor="?colorAccent" - seekarc:rotation="180" - seekarc:startAngle="30" - seekarc:sweepAngle="300" - seekarc:thumb="@drawable/traditional_slider_thumb" /> + seekarc:SeekArc_clockwise="false" + seekarc:SeekArc_max="120" + seekarc:SeekArc_progressColor="?colorAccent" + seekarc:SeekArc_rotation="180" + seekarc:SeekArc_startAngle="30" + seekarc:SeekArc_sweepAngle="300" /> 0dp - @drawable/traditional_slider_thumb