Skip to content

Commit 5606364

Browse files
committed
Refactor code,more example added.
1 parent faf1c1a commit 5606364

69 files changed

Lines changed: 1669 additions & 2804 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎app/build.gradle‎

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
apply plugin: 'com.android.application'
22

33
android {
4-
compileSdkVersion 24
5-
buildToolsVersion "24.0.1"
4+
compileSdkVersion 25
5+
buildToolsVersion "25.0.2"
66

77
defaultConfig {
88
applicationId "com.rxjava2.android.samples"
9-
minSdkVersion 15
10-
targetSdkVersion 24
9+
minSdkVersion 16
10+
targetSdkVersion 25
1111
versionCode 1
1212
versionName "1.0"
1313
}
@@ -19,10 +19,25 @@ android {
1919
}
2020
}
2121

22+
//compileOptions {
23+
// sourceCompatibility JavaVersion.VERSION_1_8
24+
// targetCompatibility JavaVersion.VERSION_1_8
25+
//}
26+
27+
//packagingOptions {
28+
// exclude 'LICENSE'
29+
// exclude 'LICENSE.txt'
30+
//}
31+
2232
dependencies {
2333
compile fileTree(dir: 'libs', include: ['*.jar'])
2434
testCompile 'junit:junit:4.12'
25-
compile 'com.android.support:appcompat-v7:24.1.1'
26-
compile 'io.reactivex.rxjava2:rxjava:2.0.2'
27-
compile 'io.reactivex.rxjava2:rxandroid:2.0.1'
35+
compile 'com.android.support:appcompat-v7:25.1.0'
36+
37+
// https://mvnrepository.com/artifact/io.reactivex.rxjava2/rxjava
38+
compile group: 'io.reactivex.rxjava2', name: 'rxjava', version: '2.0.4'
39+
// https://mvnrepository.com/artifact/io.reactivex.rxjava2/rxandroid
40+
compile('io.reactivex.rxjava2:rxandroid:2.0.1'){
41+
exclude group: 'io.reactivex.rxjava2', module: 'rxjava'
42+
}
2843
}

‎app/src/main/AndroidManifest.xml‎

Lines changed: 62 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,102 +1,106 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3-
package="com.rxjava2.android.samples">
3+
package="com.rxjava2.android.samples">
44

55
<application
6+
android:name=".MyApplication"
67
android:allowBackup="true"
78
android:icon="@mipmap/ic_launcher"
89
android:label="@string/app_name"
910
android:supportsRtl="true"
1011
android:theme="@style/AppTheme">
1112
<activity android:name=".MainActivity">
1213
<intent-filter>
13-
<action android:name="android.intent.action.MAIN" />
14+
<action android:name="android.intent.action.MAIN"/>
1415

15-
<category android:name="android.intent.category.LAUNCHER" />
16+
<category android:name="android.intent.category.LAUNCHER"/>
1617
</intent-filter>
1718
</activity>
18-
1919
<activity
20-
android:name=".SimpleExampleActivity"
21-
android:label="@string/simple" />
20+
android:name=".operators.SimpleExampleActivity"
21+
android:label="@string/simple"/>
2222
<activity
23-
android:name=".MapExampleActivity"
24-
android:label="@string/map" />
23+
android:name=".operators.MapExampleActivity"
24+
android:label="@string/map"/>
2525
<activity
26-
android:name=".ZipExampleActivity"
27-
android:label="@string/zip" />
26+
android:name=".operators.ZipExampleActivity"
27+
android:label="@string/zip"/>
2828
<activity
29-
android:name=".DisposableExampleActivity"
30-
android:label="@string/disposable" />
29+
android:name=".operators.DisposableExampleActivity"
30+
android:label="@string/disposable"/>
3131
<activity
32-
android:name=".TakeExampleActivity"
33-
android:label="@string/take" />
32+
android:name=".operators.TakeExampleActivity"
33+
android:label="@string/take"/>
3434
<activity
35-
android:name=".TimerExample"
36-
android:label="@string/timer" />
35+
android:name=".operators.TimerExampleActivity"
36+
android:label="@string/timer"/>
3737
<activity
38-
android:name=".IntervalExampleActivity"
39-
android:label="@string/interval" />
38+
android:name=".operators.IntervalExampleActivity"
39+
android:label="@string/interval"/>
4040
<activity
41-
android:name=".SingleObserverExampleActivity"
42-
android:label="@string/SingleObserver" />
41+
android:name=".operators.SingleObserverExampleActivity"
42+
android:label="@string/SingleObserver"/>
4343
<activity
44-
android:name=".CompletableObserverActivity"
45-
android:label="@string/CompletableObserver" />
44+
android:name=".operators.CompletableObserverExampleActivity"
45+
android:label="@string/CompletableObserver"/>
4646
<activity
47-
android:name=".FlowableExampleActivity"
48-
android:label="@string/Flowable" />
47+
android:name=".operators.FlowableExampleActivity"
48+
android:label="@string/Flowable"/>
4949
<activity
50-
android:name=".ReduceExampleActivity"
51-
android:label="@string/reduce" />
50+
android:name=".operators.ReduceExampleActivity"
51+
android:label="@string/reduce"/>
5252
<activity
53-
android:name=".BufferExampleActivity"
54-
android:label="@string/buffer" />
53+
android:name=".operators.BufferExampleActivity"
54+
android:label="@string/buffer"/>
5555
<activity
56-
android:name=".FilterExampleActivity"
57-
android:label="@string/filter" />
56+
android:name=".operators.FilterExampleActivity"
57+
android:label="@string/filter"/>
5858
<activity
59-
android:name=".SkipExampleActivity"
60-
android:label="@string/skip" />
59+
android:name=".operators.SkipExampleActivity"
60+
android:label="@string/skip"/>
6161
<activity
62-
android:name=".ScanExampleActivity"
63-
android:label="@string/scan" />
62+
android:name=".operators.ScanExampleActivity"
63+
android:label="@string/scan"/>
6464
<activity
65-
android:name=".ReplayExampleActivity"
66-
android:label="@string/replay" />
65+
android:name=".operators.ReplayExampleActivity"
66+
android:label="@string/replay"/>
6767
<activity
68-
android:name=".ConcatExampleActivity"
69-
android:label="@string/concat" />
68+
android:name=".operators.ConcatExampleActivity"
69+
android:label="@string/concat"/>
7070
<activity
71-
android:name=".MergeExampleActivity"
72-
android:label="@string/merge" />
71+
android:name=".operators.MergeExampleActivity"
72+
android:label="@string/merge"/>
7373
<activity
74-
android:name=".DeferExampleActivity"
75-
android:label="@string/defer" />
74+
android:name=".operators.DeferExampleActivity"
75+
android:label="@string/defer"/>
7676
<activity
77-
android:name=".DistinctExampleActivity"
78-
android:label="@string/distinct" />
77+
android:name=".operators.DistinctExampleActivity"
78+
android:label="@string/distinct"/>
7979
<activity
80-
android:name=".LastOperatorExampleActivity"
81-
android:label="@string/distinct" />
80+
android:name=".operators.LastOperatorExampleActivity"
81+
android:label="@string/distinct"/>
8282
<activity
83-
android:name=".ReplaySubjectExample"
84-
android:label="@string/replay_subject" />
83+
android:name=".operators.ReplaySubjectExampleActivity"
84+
android:label="@string/replay_subject"/>
8585
<activity
86-
android:name=".PublishSubjectExample"
87-
android:label="@string/publish_subject" />
86+
android:name=".operators.PublishSubjectExampleActivity"
87+
android:label="@string/publish_subject"/>
8888
<activity
89-
android:name=".BehaviorSubjectExample"
90-
android:label="@string/behavior_subject" />
89+
android:name=".operators.BehaviorSubjectExampleActivity"
90+
android:label="@string/behavior_subject"/>
9191
<activity
92-
android:name=".AsyncSubjectExample"
93-
android:label="@string/async_subject" />
92+
android:name=".operators.AsyncSubjectExampleActivity"
93+
android:label="@string/async_subject"/>
9494
<activity
95-
android:name=".ThrottleLastExampleActivity"
96-
android:label="@string/throttle_last" />
95+
android:name=".operators.ThrottleLastExampleActivity"
96+
android:label="@string/throttle_last"/>
9797
<activity
98-
android:name=".DebounceExampleActivity"
99-
android:label="@string/debounce" />
98+
android:name=".operators.DebounceExampleActivity"
99+
android:label="@string/debounce"/>
100+
<activity android:name=".operators.WindowExampleActivity"
101+
android:label="@string/window"/>
102+
<activity android:name=".operators.ThrottleFirstExampleActivity"
103+
android:label="@string/throttle_first"/>
100104
</application>
101105

102106
</manifest>

0 commit comments

Comments
 (0)