Skip to content

Commit d215a8d

Browse files
committed
init commit
0 parents  commit d215a8d

Some content is hidden

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

51 files changed

+2314
-0
lines changed

Diff for: .gitignore

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
### Android template
2+
# Built application files
3+
*.apk
4+
*.ap_
5+
6+
# Files for the ART/Dalvik VM
7+
*.dex
8+
9+
# Java class files
10+
*.class
11+
12+
# Generated files
13+
bin/
14+
gen/
15+
out/
16+
17+
# Gradle files
18+
.gradle/
19+
build/
20+
21+
# Local configuration file (sdk path, etc)
22+
local.properties
23+
24+
# Proguard folder generated by Eclipse
25+
proguard/
26+
27+
# Log Files
28+
*.log
29+
30+
# Android Studio Navigation editor temp files
31+
.navigation/
32+
33+
# Android Studio captures folder
34+
captures/
35+
36+
# IntelliJ
37+
.idea/workspace.xml
38+
.idea/tasks.xml
39+
.idea/gradle.xml
40+
.idea/assetWizardSettings.xml
41+
.idea/dictionaries
42+
.idea/libraries
43+
.idea/caches
44+
45+
# Keystore files
46+
# Uncomment the following line if you do not want to check your keystore files in.
47+
#*.jks
48+
49+
# External native build folder generated in Android Studio 2.2 and later
50+
51+
# Google Services (e.g. APIs or Firebase)
52+
google-services.json
53+
54+
# Freeline
55+
freeline.py
56+
freeline/
57+
freeline_project_description.json
58+
59+
# fastlane
60+
fastlane/report.xml
61+
fastlane/Preview.html
62+
fastlane/screenshots
63+
fastlane/test_output
64+
fastlane/readme.md

Diff for: app/.gitignore

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

Diff for: app/build.gradle

+75
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
apply plugin: 'com.android.application'
2+
3+
android {
4+
compileSdkVersion 27
5+
6+
defaultConfig {
7+
applicationId "io.github.mohamedisoliman.androiddev"
8+
minSdkVersion 19
9+
targetSdkVersion 27
10+
versionCode 1
11+
versionName "1.0"
12+
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
13+
}
14+
buildTypes {
15+
release {
16+
minifyEnabled false
17+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
18+
}
19+
}
20+
21+
compileOptions {
22+
sourceCompatibility JavaVersion.VERSION_1_8
23+
targetCompatibility JavaVersion.VERSION_1_8
24+
}
25+
}
26+
27+
dependencies {
28+
def lifecycle_version = "1.1.1"
29+
def rxjava_version = "2.1.17"
30+
def rxandroid_version = "2.0.2"
31+
def room_version = "1.1.1"
32+
def picasso_version = "2.71828"
33+
def retrofit_version = "2.3.0"
34+
def okhttp_version = "3.10.0"
35+
def gson_version = "2.8.2"
36+
def support_library_version = "27.1.1"
37+
38+
39+
implementation fileTree(dir: 'libs', include: ['*.jar'])
40+
testImplementation 'junit:junit:4.12'
41+
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
42+
androidTestImplementation "com.android.support.test.espresso:espresso-core:3.0.2"
43+
androidTestImplementation "com.android.support.test:runner:1.0.0"
44+
implementation "com.android.support:appcompat-v7:$support_library_version"
45+
implementation "com.android.support:design:$support_library_version"
46+
implementation "com.android.support:recyclerview-v7:$support_library_version"
47+
48+
49+
implementation "com.squareup.retrofit2:retrofit:$retrofit_version"
50+
implementation "com.squareup.retrofit2:converter-gson:$retrofit_version"
51+
implementation "com.squareup.retrofit2:adapter-rxjava2:$retrofit_version"
52+
implementation "com.squareup.okhttp3:okhttp:$okhttp_version"
53+
implementation "com.squareup.okhttp3:logging-interceptor:$okhttp_version"
54+
implementation "com.google.code.gson:gson:$gson_version"
55+
56+
57+
implementation "io.reactivex.rxjava2:rxjava:$rxjava_version"
58+
implementation "io.reactivex.rxjava2:rxandroid:$rxandroid_version"
59+
60+
implementation "android.arch.lifecycle:extensions:$lifecycle_version"
61+
implementation "android.arch.lifecycle:runtime:$lifecycle_version"
62+
implementation "android.arch.lifecycle:common-java8:$lifecycle_version"
63+
implementation "android.arch.lifecycle:reactivestreams:$lifecycle_version"
64+
testImplementation "android.arch.core:core-testing:$lifecycle_version"
65+
66+
implementation "android.arch.persistence.room:runtime:$room_version"
67+
annotationProcessor "android.arch.persistence.room:compiler:$room_version"
68+
implementation "android.arch.persistence.room:rxjava2:$room_version"
69+
testImplementation "android.arch.persistence.room:testing:$room_version"
70+
71+
72+
implementation "com.squareup.picasso:picasso:$picasso_version"
73+
74+
75+
}

Diff for: app/proguard-rules.pro

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Add project specific ProGuard rules here.
2+
# You can control the set of applied configuration files using the
3+
# proguardFiles setting in build.gradle.
4+
#
5+
# For more details, see
6+
# http://developer.android.com/guide/developing/tools/proguard.html
7+
8+
# If your project uses WebView with JS, uncomment the following
9+
# and specify the fully qualified class name to the JavaScript interface
10+
# class:
11+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12+
# public *;
13+
#}
14+
15+
# Uncomment this to preserve the line number information for
16+
# debugging stack traces.
17+
#-keepattributes SourceFile,LineNumberTable
18+
19+
# If you keep the line number information, uncomment this to
20+
# hide the original source file name.
21+
#-renamesourcefileattribute SourceFile
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
package io.github.mohamedisoliman.androiddev;
2+
3+
import android.content.Context;
4+
import android.support.test.InstrumentationRegistry;
5+
import android.support.test.runner.AndroidJUnit4;
6+
7+
import org.junit.Test;
8+
import org.junit.runner.RunWith;
9+
10+
import static org.junit.Assert.*;
11+
12+
/**
13+
* Instrumented test, which will execute on an Android device.
14+
*
15+
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
16+
*/
17+
@RunWith(AndroidJUnit4.class)
18+
public class ExampleInstrumentedTest {
19+
@Test
20+
public void useAppContext() {
21+
// Context of the app under test.
22+
Context appContext = InstrumentationRegistry.getTargetContext();
23+
24+
assertEquals("io.github.mohamedisoliman.androiddev", appContext.getPackageName());
25+
}
26+
}

Diff for: app/src/main/AndroidManifest.xml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
package="io.github.mohamedisoliman.androiddev">
4+
5+
<uses-permission android:name="android.permission.INTERNET" />
6+
7+
<application
8+
android:allowBackup="true"
9+
android:icon="@mipmap/ic_launcher"
10+
android:label="@string/app_name"
11+
android:roundIcon="@mipmap/ic_launcher_round"
12+
android:supportsRtl="true"
13+
android:theme="@style/AppTheme">
14+
<activity android:name=".ui.MainActivity">
15+
<intent-filter>
16+
<action android:name="android.intent.action.MAIN" />
17+
18+
<category android:name="android.intent.category.LAUNCHER" />
19+
</intent-filter>
20+
</activity>
21+
</application>
22+
23+
</manifest>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package io.github.mohamedisoliman.androiddev;
2+
3+
import android.app.Application;
4+
5+
/**
6+
* Created by Mohamed Ibrahim on 8/1/18.
7+
*/
8+
public class AndroiddevApp extends Application {
9+
10+
11+
@Override
12+
public void onCreate() {
13+
super.onCreate();
14+
15+
}
16+
17+
18+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
package io.github.mohamedisoliman.androiddev.data;
2+
3+
import java.util.List;
4+
5+
import io.github.mohamedisoliman.androiddev.data.model.RedditPost;
6+
import io.github.mohamedisoliman.androiddev.data.remote.RedditRemoteStore;
7+
import io.reactivex.Observable;
8+
9+
/**
10+
* Created by Mohamed Ibrahim on 8/1/18.
11+
*/
12+
public class Repository {
13+
14+
private RedditRemoteStore remoteStore;
15+
16+
public Repository(RedditRemoteStore remoteStore) {
17+
this.remoteStore = remoteStore;
18+
}
19+
20+
public Observable<List<RedditPost>> getAndroidDev() {
21+
return remoteStore.getSubreddit();
22+
}
23+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
2+
package io.github.mohamedisoliman.androiddev.data.model;
3+
4+
import com.google.gson.annotations.Expose;
5+
6+
public class Child {
7+
8+
@Expose
9+
private Data data;
10+
@Expose
11+
private String kind;
12+
13+
public Data getData() {
14+
return data;
15+
}
16+
17+
public void setData(Data data) {
18+
this.data = data;
19+
}
20+
21+
public String getKind() {
22+
return kind;
23+
}
24+
25+
public void setKind(String kind) {
26+
this.kind = kind;
27+
}
28+
29+
}

0 commit comments

Comments
 (0)