Skip to content

Commit 1e88b58

Browse files
author
Kaushik Gopal
committed
fix: update LeakCanary + use ContextCompat color
1 parent 29b081f commit 1e88b58

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

app/build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ dependencies {
5151

5252
// ----------------------------------
5353

54-
debugCompile 'com.squareup.leakcanary:leakcanary-android:1.3'
55-
releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.3'
54+
debugCompile 'com.squareup.leakcanary:leakcanary-android:1.5.1'
55+
releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.1'
5656
}
5757

5858
android {

app/src/main/java/com/morihacky/android/rxjava/fragments/FormValidationCombineLatestFragment.java

+5-2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
import android.os.Bundle;
77
import android.support.annotation.Nullable;
8+
import android.support.v4.content.ContextCompat;
89
import android.view.LayoutInflater;
910
import android.view.View;
1011
import android.view.ViewGroup;
@@ -72,9 +73,11 @@ private void _combineLatestEvents() {
7273
@Override
7374
public void onNext(Boolean formValid) {
7475
if (formValid) {
75-
_btnValidIndicator.setBackgroundColor(getResources().getColor(R.color.blue));
76+
_btnValidIndicator.setBackgroundColor(
77+
ContextCompat.getColor(getContext(), R.color.blue));
7678
} else {
77-
_btnValidIndicator.setBackgroundColor(getResources().getColor(R.color.gray));
79+
_btnValidIndicator.setBackgroundColor(
80+
ContextCompat.getColor(getContext(), R.color.gray));
7881
}
7982
}
8083

0 commit comments

Comments
 (0)