Skip to content

Commit c26b5f5

Browse files
author
Kaushik Gopal
committed
feat: first commit
1 parent 2f75526 commit c26b5f5

File tree

26 files changed

+591
-0
lines changed

26 files changed

+591
-0
lines changed

.gitignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.gradle
2+
/local.properties
3+
/.idea/workspace.xml
4+
.DS_Store
5+
/build

Android-RxJava.iml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<module external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" external.system.module.group="" external.system.module.version="unspecified" type="JAVA_MODULE" version="4">
3+
<component name="FacetManager">
4+
<facet type="java-gradle" name="Java-Gradle">
5+
<configuration>
6+
<option name="BUILD_FOLDER_PATH" value="$MODULE_DIR$/build" />
7+
</configuration>
8+
</facet>
9+
</component>
10+
<component name="NewModuleRootManager" inherit-compiler-output="true">
11+
<exclude-output />
12+
<content url="file://$MODULE_DIR$">
13+
<excludeFolder url="file://$MODULE_DIR$/.gradle" />
14+
</content>
15+
<orderEntry type="inheritedJdk" />
16+
<orderEntry type="sourceFolder" forTests="false" />
17+
</component>
18+
</module>
19+

app/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build

app/app.iml

+78
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<module external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$/.." external.system.id="GRADLE" external.system.module.group="Android-RxJava" external.system.module.version="unspecified" type="JAVA_MODULE" version="4">
3+
<component name="FacetManager">
4+
<facet type="android-gradle" name="Android-Gradle">
5+
<configuration>
6+
<option name="GRADLE_PROJECT_PATH" value=":app" />
7+
</configuration>
8+
</facet>
9+
<facet type="android" name="Android">
10+
<configuration>
11+
<option name="SELECTED_BUILD_VARIANT" value="debug" />
12+
<option name="ASSEMBLE_TASK_NAME" value="assembleDebug" />
13+
<option name="COMPILE_JAVA_TASK_NAME" value="compileDebugJava" />
14+
<option name="ASSEMBLE_TEST_TASK_NAME" value="assembleDebugTest" />
15+
<option name="SOURCE_GEN_TASK_NAME" value="generateDebugSources" />
16+
<option name="ALLOW_USER_CONFIGURATION" value="false" />
17+
<option name="MANIFEST_FILE_RELATIVE_PATH" value="/src/main/AndroidManifest.xml" />
18+
<option name="RES_FOLDER_RELATIVE_PATH" value="/src/main/res" />
19+
<option name="RES_FOLDERS_RELATIVE_PATH" value="file://$MODULE_DIR$/src/main/res" />
20+
<option name="ASSETS_FOLDER_RELATIVE_PATH" value="/src/main/assets" />
21+
</configuration>
22+
</facet>
23+
</component>
24+
<component name="NewModuleRootManager" inherit-compiler-output="false">
25+
<output url="file://$MODULE_DIR$/build/intermediates/classes/debug" />
26+
<exclude-output />
27+
<content url="file://$MODULE_DIR$">
28+
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/debug" isTestSource="false" generated="true" />
29+
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/debug" isTestSource="false" generated="true" />
30+
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/debug" isTestSource="false" generated="true" />
31+
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/debug" isTestSource="false" generated="true" />
32+
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/debug" type="java-resource" />
33+
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/test/debug" isTestSource="true" generated="true" />
34+
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/test/debug" isTestSource="true" generated="true" />
35+
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/test/debug" isTestSource="true" generated="true" />
36+
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/test/debug" isTestSource="true" generated="true" />
37+
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/test/debug" type="java-test-resource" />
38+
<sourceFolder url="file://$MODULE_DIR$/src/debug/res" type="java-resource" />
39+
<sourceFolder url="file://$MODULE_DIR$/src/debug/resources" type="java-resource" />
40+
<sourceFolder url="file://$MODULE_DIR$/src/debug/aidl" isTestSource="false" />
41+
<sourceFolder url="file://$MODULE_DIR$/src/debug/assets" isTestSource="false" />
42+
<sourceFolder url="file://$MODULE_DIR$/src/debug/java" isTestSource="false" />
43+
<sourceFolder url="file://$MODULE_DIR$/src/debug/jni" isTestSource="false" />
44+
<sourceFolder url="file://$MODULE_DIR$/src/debug/rs" isTestSource="false" />
45+
<sourceFolder url="file://$MODULE_DIR$/src/main/res" type="java-resource" />
46+
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
47+
<sourceFolder url="file://$MODULE_DIR$/src/main/aidl" isTestSource="false" />
48+
<sourceFolder url="file://$MODULE_DIR$/src/main/assets" isTestSource="false" />
49+
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
50+
<sourceFolder url="file://$MODULE_DIR$/src/main/jni" isTestSource="false" />
51+
<sourceFolder url="file://$MODULE_DIR$/src/main/rs" isTestSource="false" />
52+
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/res" type="java-test-resource" />
53+
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/resources" type="java-test-resource" />
54+
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/aidl" isTestSource="true" />
55+
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/assets" isTestSource="true" />
56+
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" />
57+
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/jni" isTestSource="true" />
58+
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" />
59+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates" />
60+
<excludeFolder url="file://$MODULE_DIR$/build/outputs" />
61+
</content>
62+
<orderEntry type="jdk" jdkName="Android API 19 Platform" jdkType="Android SDK" />
63+
<orderEntry type="sourceFolder" forTests="false" />
64+
<orderEntry type="library" exported="" name="support-v13-20.0.0" level="project" />
65+
<orderEntry type="library" exported="" name="timber-2.2.2" level="project" />
66+
<orderEntry type="library" exported="" name="rxjava-core-0.17.6" level="project" />
67+
<orderEntry type="library" exported="" name="gson-2.2.4" level="project" />
68+
<orderEntry type="library" exported="" name="okhttp-1.6.0" level="project" />
69+
<orderEntry type="library" exported="" name="guava-17.0" level="project" />
70+
<orderEntry type="library" exported="" name="butterknife-5.1.1" level="project" />
71+
<orderEntry type="library" exported="" name="okhttp-urlconnection-1.6.0" level="project" />
72+
<orderEntry type="library" exported="" name="support-annotations-20.0.0" level="project" />
73+
<orderEntry type="library" exported="" name="support-v4-20.0.0" level="project" />
74+
<orderEntry type="library" exported="" name="retrofit-1.5.1" level="project" />
75+
<orderEntry type="library" exported="" name="rxjava-android-0.17.6" level="project" />
76+
</component>
77+
</module>
78+

app/build.gradle

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
apply plugin: 'com.android.application'
2+
3+
dependencies {
4+
compile 'com.android.support:support-v13:20.0.+'
5+
6+
compile 'com.google.guava:guava:17.+'
7+
8+
compile 'com.jakewharton:butterknife:5.1.1'
9+
compile 'com.jakewharton.timber:timber:2.2.2'
10+
compile 'com.netflix.rxjava:rxjava-android:0.17.+'
11+
compile 'com.squareup.okhttp:okhttp:1.6.+'
12+
compile 'com.squareup.okhttp:okhttp-urlconnection:1.6.+'
13+
compile 'com.squareup.retrofit:retrofit:1.5.+'
14+
15+
}
16+
17+
android {
18+
compileSdkVersion 19
19+
buildToolsVersion '19.1.0'
20+
21+
defaultConfig {
22+
applicationId "com.morihacky.android.rxjava"
23+
minSdkVersion 14
24+
targetSdkVersion 19
25+
versionCode 1
26+
versionName "1.0"
27+
}
28+
buildTypes {
29+
release {
30+
runProguard false
31+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
32+
}
33+
}
34+
}
35+
36+
dependencies {
37+
compile fileTree(dir: 'libs', include: ['*.jar'])
38+
}

app/proguard-rules.pro

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Add project specific ProGuard rules here.
2+
# By default, the flags in this file are appended to flags specified
3+
# in /Applications/Android Studio.app/sdk/tools/proguard/proguard-android.txt
4+
# You can edit the include path and order by changing the proguardFiles
5+
# directive in build.gradle.
6+
#
7+
# For more details, see
8+
# http://developer.android.com/guide/developing/tools/proguard.html
9+
10+
# Add any project specific keep options here:
11+
12+
# If your project uses WebView with JS, uncomment the following
13+
# and specify the fully qualified class name to the JavaScript interface
14+
# class:
15+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16+
# public *;
17+
#}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package com.morihacky.android.rxjava.app;
2+
3+
import android.app.Application;
4+
import android.test.ApplicationTestCase;
5+
6+
/**
7+
* <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a>
8+
*/
9+
public class ApplicationTest extends ApplicationTestCase<Application> {
10+
public ApplicationTest() {
11+
super(Application.class);
12+
}
13+
}

app/src/main/AndroidManifest.xml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
package="com.morihacky.android.rxjava.app" >
4+
5+
<application
6+
android:allowBackup="true"
7+
android:icon="@drawable/ic_launcher"
8+
android:label="@string/app_name"
9+
android:theme="@style/AppTheme" >
10+
<activity
11+
android:name="com.morihacky.android.rxjava.DemoActivity"
12+
android:label="@string/app_name" >
13+
<intent-filter>
14+
<action android:name="android.intent.action.MAIN" />
15+
16+
<category android:name="android.intent.category.LAUNCHER" />
17+
</intent-filter>
18+
</activity>
19+
</application>
20+
21+
</manifest>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
package com.morihacky.android.rxjava;
2+
3+
import android.app.Activity;
4+
import android.os.Bundle;
5+
import android.view.Menu;
6+
import android.view.MenuItem;
7+
8+
import com.morihacky.android.rxjava.app.R;
9+
10+
11+
public class DemoActivity extends Activity {
12+
13+
@Override
14+
protected void onCreate(Bundle savedInstanceState) {
15+
super.onCreate(savedInstanceState);
16+
setContentView(R.layout.activity_demo);
17+
}
18+
19+
20+
@Override
21+
public boolean onCreateOptionsMenu(Menu menu) {
22+
// Inflate the menu; this adds items to the action bar if it is present.
23+
getMenuInflater().inflate(R.menu.demo, menu);
24+
return true;
25+
}
26+
27+
@Override
28+
public boolean onOptionsItemSelected(MenuItem item) {
29+
// Handle action bar item clicks here. The action bar will
30+
// automatically handle clicks on the Home/Up button, so long
31+
// as you specify a parent activity in AndroidManifest.xml.
32+
int id = item.getItemId();
33+
if (id == R.id.action_settings) {
34+
return true;
35+
}
36+
return super.onOptionsItemSelected(item);
37+
}
38+
}
9.18 KB
Loading
5.11 KB
Loading
Loading
18.9 KB
Loading
+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<LinearLayout
2+
android:orientation="vertical"
3+
android:layout_height="match_parent"
4+
android:layout_width="match_parent"
5+
android:paddingTop="@dimen/activity_vertical_margin"
6+
android:paddingBottom="@dimen/activity_vertical_margin"
7+
android:paddingLeft="@dimen/activity_horizontal_margin"
8+
android:paddingRight="@dimen/activity_horizontal_margin"
9+
xmlns:android="http://schemas.android.com/apk/res/android"
10+
xmlns:tools="http://schemas.android.com/tools"
11+
tools:context=".DemoActivity">
12+
13+
<Button
14+
android:id="@+id/demo_long_bg"
15+
android:layout_height="wrap_content"
16+
android:layout_width="wrap_content"
17+
android:text="@string/demo_type_long_bg"/>
18+
19+
<Button
20+
android:id="@+id/demo_accumulate_event"
21+
android:layout_height="wrap_content"
22+
android:layout_width="wrap_content"
23+
android:text="@string/demo_type_accumulate"/>
24+
25+
</LinearLayout>

app/src/main/res/menu/demo.xml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<menu xmlns:android="http://schemas.android.com/apk/res/android"
2+
xmlns:tools="http://schemas.android.com/tools"
3+
tools:context=".DemoActivity" >
4+
<item android:id="@+id/action_settings"
5+
android:title="@string/action_settings"
6+
android:orderInCategory="100"
7+
android:showAsAction="never" />
8+
</menu>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<resources>
2+
<!-- Example customization of dimensions originally defined in res/values/dimens.xml
3+
(such as screen margins) for screens with more than 820dp of available width. This
4+
would include 7" and 10" devices in landscape (~960dp and ~1280dp respectively). -->
5+
<dimen name="activity_horizontal_margin">64dp</dimen>
6+
</resources>

app/src/main/res/values/dimens.xml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<resources>
2+
<!-- Default screen margins, per the Android Design guidelines. -->
3+
<dimen name="activity_horizontal_margin">16dp</dimen>
4+
<dimen name="activity_vertical_margin">16dp</dimen>
5+
</resources>

app/src/main/res/values/strings.xml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources>
3+
4+
<string name="app_name">Android-RxJava</string>
5+
<string name="hello_world">Hello world!</string>
6+
<string name="action_settings">Settings</string>
7+
<string name="demo_type_long_bg">long operation in bg (schedulers)</string>
8+
<string name="demo_type_accumulate">accumulate events (instant search)</string>
9+
10+
</resources>

app/src/main/res/values/styles.xml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<resources>
2+
3+
<!-- Base application theme. -->
4+
<style name="AppTheme" parent="android:Theme.Holo.Light.DarkActionBar">
5+
<!-- Customize your theme here. -->
6+
</style>
7+
8+
</resources>

build.gradle

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// Top-level build file where you can add configuration options common to all sub-projects/modules.
2+
3+
buildscript {
4+
repositories {
5+
jcenter()
6+
mavenCentral()
7+
}
8+
dependencies {
9+
classpath 'com.android.tools.build:gradle:0.12.+'
10+
11+
// NOTE: Do not place your application dependencies here; they belong
12+
// in the individual module build.gradle files
13+
}
14+
}
15+
16+
allprojects {
17+
repositories {
18+
jcenter()
19+
}
20+
}

gradle.properties

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Project-wide Gradle settings.
2+
3+
# IDE (e.g. Android Studio) users:
4+
# Settings specified in this file will override any Gradle settings
5+
# configured through the IDE.
6+
7+
# For more details on how to configure your build environment visit
8+
# http://www.gradle.org/docs/current/userguide/build_environment.html
9+
10+
# Specifies the JVM arguments used for the daemon process.
11+
# The setting is particularly useful for tweaking memory settings.
12+
# Default value: -Xmx10248m -XX:MaxPermSize=256m
13+
# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
14+
15+
# When configured, Gradle will run in incubating parallel mode.
16+
# This option should only be used with decoupled projects. More details, visit
17+
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18+
# org.gradle.parallel=true

gradle/wrapper/gradle-wrapper.jar

48.7 KB
Binary file not shown.
+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#Wed Apr 10 15:27:10 PDT 2013
2+
distributionBase=GRADLE_USER_HOME
3+
distributionPath=wrapper/dists
4+
zipStoreBase=GRADLE_USER_HOME
5+
zipStorePath=wrapper/dists
6+
distributionUrl=http\://services.gradle.org/distributions/gradle-1.12-all.zip

0 commit comments

Comments
 (0)