Skip to content
This repository was archived by the owner on Aug 9, 2020. It is now read-only.

Commit 229c125

Browse files
Merge pull request #22 from miguelbcr/master
Added interface in order to pre process data before finishing onActivityResult
2 parents db268ff + 43cb51c commit 229c125

File tree

23 files changed

+208
-192
lines changed

23 files changed

+208
-192
lines changed

.gitignore

Lines changed: 37 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,37 @@
1-
*.iml
2-
.gradle
3-
/local.properties
4-
/.idea/workspace.xml
5-
/.idea/libraries
6-
.DS_Store
7-
/build
8-
/captures
1+
# Built application files
2+
*.apk
3+
*.ap_
4+
5+
# Files for the Dalvik VM
6+
*.dex
7+
8+
# Java class files
9+
*.class
10+
11+
# Generated files
12+
bin/
13+
gen/
14+
15+
# Gradle files
16+
.gradle/
17+
**/build/
18+
19+
# Local configuration file (sdk path, etc)
20+
local.properties
21+
22+
# Proguard folder generated by Eclipse
23+
proguard/
24+
25+
# Log Files
26+
*.log
27+
28+
# Android Studio
29+
.navigation/
30+
.idea/
31+
**/*.iml
32+
33+
# Android Studio captures folder
34+
captures/
35+
36+
# .DS_Store files
37+
**/.DS_Store

.idea/.name

Lines changed: 0 additions & 1 deletion
This file was deleted.

.idea/compiler.xml

Lines changed: 0 additions & 21 deletions
This file was deleted.

.idea/gradle.xml

Lines changed: 0 additions & 26 deletions
This file was deleted.

.idea/misc.xml

Lines changed: 0 additions & 98 deletions
This file was deleted.

.idea/modules.xml

Lines changed: 0 additions & 10 deletions
This file was deleted.

.idea/vcs.xml

Lines changed: 0 additions & 6 deletions
This file was deleted.

app/build.gradle

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ buildscript {
1313
}
1414

1515
android {
16-
compileSdkVersion 23
17-
buildToolsVersion "23.0.3"
16+
compileSdkVersion 24
17+
buildToolsVersion "24.0.1"
1818

1919
defaultConfig {
2020
applicationId "io.victoralbertos.app"
21-
minSdkVersion 18
22-
targetSdkVersion 23
21+
minSdkVersion 16
22+
targetSdkVersion 24
2323
versionCode 1
2424
versionName "1.0"
2525
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
@@ -43,9 +43,9 @@ dependencies {
4343
compile fileTree(dir: 'libs', include: ['*.jar'])
4444
compile project(":rx_activity_result")
4545

46-
compile 'com.android.support:appcompat-v7:23.4.0'
47-
compile 'com.android.support:design:23.4.0'
48-
compile 'io.reactivex:rxjava:1.1.0'
46+
compile 'com.android.support:appcompat-v7:24.2.1'
47+
compile 'com.android.support:design:24.2.1'
48+
compile 'io.reactivex:rxjava:1.1.10'
4949

5050
testCompile 'junit:junit:4.12'
5151
androidTestCompile ("com.android.support.test:runner:0.4.1") {
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest
3+
package="${applicationId}.test"
4+
xmlns:tools="http://schemas.android.com/tools">
5+
6+
<uses-sdk tools:overrideLibrary="android.support.test.uiautomator.v18"/>
7+
</manifest>
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
package app;
2+
3+
import android.support.test.rule.ActivityTestRule;
4+
import android.support.test.runner.AndroidJUnit4;
5+
6+
import org.junit.Rule;
7+
import org.junit.Test;
8+
import org.junit.runner.RunWith;
9+
10+
import io.victoralbertos.app.R;
11+
12+
import static android.support.test.espresso.Espresso.onView;
13+
import static android.support.test.espresso.action.ViewActions.click;
14+
import static android.support.test.espresso.assertion.ViewAssertions.matches;
15+
import static android.support.test.espresso.matcher.ViewMatchers.withId;
16+
import static android.support.test.espresso.matcher.ViewMatchers.withText;
17+
18+
@RunWith(AndroidJUnit4.class)
19+
public class OnPreResultTest {
20+
@Rule public ActivityTestRule<OnPreResultActivity> activityRule = new ActivityTestRule<>(OnPreResultActivity.class);
21+
22+
@Test public void CheckHasBothResults() {
23+
onView(withId(R.id.start_pre_for_result)).perform(click());
24+
onView(withId(R.id.pre_result)).check(matches(withText("Do whatever you want with the data, but not with the UI")));
25+
onView(withId(R.id.result)).check(matches(withText("Well done first")));
26+
}
27+
28+
}

0 commit comments

Comments
 (0)