Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit bd65c69

Browse files
committedJan 20, 2016
updated dependencies
1 parent ad4bed7 commit bd65c69

File tree

4 files changed

+28
-15
lines changed

4 files changed

+28
-15
lines changed
 

‎app/build.gradle

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apply plugin: 'com.neenbedankt.android-apt'
33

44
android {
55
compileSdkVersion 23
6-
buildToolsVersion "23.0.1"
6+
buildToolsVersion "23.0.2"
77
useLibrary 'org.apache.http.legacy'
88

99
defaultConfig {
@@ -25,16 +25,18 @@ android {
2525

2626
dependencies {
2727
compile fileTree(dir: 'libs', include: ['*.jar'])
28-
compile 'com.android.support:appcompat-v7:23.0.1'
28+
compile 'com.android.support:appcompat-v7:23.1.1'
2929

3030
//Dagger 2
31-
compile 'com.google.dagger:dagger:2.0.1'
32-
apt 'com.google.dagger:dagger-compiler:2.0.1'
31+
compile 'com.google.dagger:dagger:2.0.2'
32+
apt 'com.google.dagger:dagger-compiler:2.0.2'
3333
provided 'org.glassfish:javax.annotation:10.0-b28'
3434

3535
compile 'com.jakewharton:butterknife:7.0.1'
36-
compile 'com.jakewharton.timber:timber:3.1.0'
37-
compile 'io.reactivex:rxandroid:0.24.0'
36+
compile 'com.jakewharton.timber:timber:4.1.0'
37+
compile 'io.reactivex:rxandroid:1.1.0'
38+
compile 'io.reactivex:rxjava:1.1.0'
39+
compile 'com.jakewharton.rxbinding:rxbinding:0.3.0'
3840
compile 'com.squareup.retrofit:retrofit:1.9.0'
3941
compile 'com.squareup.okhttp:okhttp:2.4.0'
4042
compile 'com.squareup.okhttp:okhttp-urlconnection:2.4.0'
@@ -43,6 +45,7 @@ dependencies {
4345
testCompile "org.robolectric:robolectric:3.0"
4446
testCompile "org.mockito:mockito-core:1.10.19"
4547

48+
androidTestCompile 'com.android.support:support-annotations:23.1.1'
4649
androidTestCompile 'junit:junit:4.12'
4750
androidTestCompile 'com.android.support.test:runner:0.4'
4851
androidTestCompile 'com.android.support.test:rules:0.4'

‎app/src/main/java/frogermcs/io/githubclient/ui/activity/SplashActivity.java

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
import android.widget.EditText;
99
import android.widget.ProgressBar;
1010

11+
import com.jakewharton.rxbinding.widget.RxTextView;
12+
import com.jakewharton.rxbinding.widget.TextViewTextChangeEvent;
13+
1114
import javax.inject.Inject;
1215

1316
import butterknife.Bind;
@@ -19,9 +22,8 @@
1922
import frogermcs.io.githubclient.ui.activity.module.SplashActivityModule;
2023
import frogermcs.io.githubclient.ui.activity.presenter.SplashActivityPresenter;
2124
import frogermcs.io.githubclient.utils.AnalyticsManager;
22-
import frogermcs.io.githubclient.utils.SimpleObserver;
23-
import rx.android.widget.OnTextChangeEvent;
24-
import rx.android.widget.WidgetObservable;
25+
import rx.Subscription;
26+
import rx.functions.Action1;
2527

2628

2729
public class SplashActivity extends BaseActivity {
@@ -39,6 +41,8 @@ public class SplashActivity extends BaseActivity {
3941
@Inject
4042
AnalyticsManager analyticsManager;
4143

44+
private Subscription textChangeSubscription;
45+
4246
@Override
4347
protected void onCreate(Bundle savedInstanceState) {
4448
super.onCreate(savedInstanceState);
@@ -47,15 +51,21 @@ protected void onCreate(Bundle savedInstanceState) {
4751

4852
analyticsManager.logScreenView(getClass().getName());
4953

50-
WidgetObservable.text(etUsername, true).subscribe(new SimpleObserver<OnTextChangeEvent>() {
54+
textChangeSubscription = RxTextView.textChangeEvents(etUsername).subscribe(new Action1<TextViewTextChangeEvent>() {
5155
@Override
52-
public void onNext(OnTextChangeEvent onTextChangeEvent) {
53-
presenter.username = onTextChangeEvent.text().toString();
56+
public void call(TextViewTextChangeEvent textViewTextChangeEvent) {
57+
presenter.username = textViewTextChangeEvent.text().toString();
5458
etUsername.setError(null);
5559
}
5660
});
5761
}
5862

63+
@Override
64+
protected void onDestroy() {
65+
super.onDestroy();
66+
textChangeSubscription.unsubscribe();
67+
}
68+
5969
//Local dependencies graph is constructed here
6070
@Override
6171
protected void setupActivityComponent() {

‎build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ buildscript {
33
jcenter()
44
}
55
dependencies {
6-
classpath 'com.android.tools.build:gradle:1.3.1'
7-
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.7'
6+
classpath 'com.android.tools.build:gradle:2.0.0-alpha6'
7+
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
88
}
99
}
1010

‎gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https://services.gradle.org/distributions/gradle-2.5-all.zip
6+
distributionUrl=https://services.gradle.org/distributions/gradle-2.10-all.zip

0 commit comments

Comments
 (0)
Please sign in to comment.