This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.ramadan_apps.rxjavawithrealmcache; | |
import java.util.List; | |
import io.reactivex.Flowable; | |
import io.reactivex.Observable; | |
import retrofit2.http.GET; | |
import retrofit2.http.Path; | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.ramadan_apps.rxjavawithrealmcache; | |
/** | |
* Created by Mahmoud Ramadan on 12/23/17. | |
*/ | |
public abstract class AppConst { | |
public static final String BASE_URL="https://api.github.com/"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.ramadan_apps.rxjavawithrealmcache; | |
import android.content.Context; | |
import android.support.v7.widget.RecyclerView; | |
import android.view.LayoutInflater; | |
import android.view.View; | |
import android.view.ViewGroup; | |
import android.widget.TextView; | |
import java.util.List; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.ramadan_apps.rxjavawithrealmcache; | |
import com.google.gson.annotations.SerializedName; | |
import io.realm.RealmObject; | |
import io.realm.annotations.PrimaryKey; | |
/** | |
* Created by Mahmoud Ramadan on 12/23/17. | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:padding="25dp" | |
android:orientation="horizontal"> | |
<TextView | |
android:id="@+id/repo_name" | |
android:layout_width="0dp" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:id="@+id/activity_main" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
tools:context=".MainActivity"> | |
<android.support.v7.widget.RecyclerView | |
android:id="@+id/recycler_view" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.ramadan_apps.rxjavawithrealmcache; | |
import android.app.Application; | |
import io.realm.Realm; | |
/** | |
* Created by Mahmoud Ramadan on 12/22/17. | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="com.ramadan_apps.rxjavawithrealmcache"> | |
<uses-permission android:name="android.permission.INTERNET"/> | |
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/> | |
<application | |
android:name=".MyApp" | |
android:allowBackup="true" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apply plugin: 'com.android.application' | |
apply plugin: 'realm-android' | |
apply plugin: 'me.tatarka.retrolambda' | |
android { | |
compileSdkVersion 26 | |
buildToolsVersion "25.0.3" | |
defaultConfig { | |
applicationId "com.ramadan_apps.rxjavawithrealmcache" | |
minSdkVersion 16 | |
targetSdkVersion 26 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Top-level build file where you can add configuration options common to all sub-projects/modules. | |
buildscript { | |
repositories { | |
jcenter() | |
} | |
dependencies { | |
classpath 'com.android.tools.build:gradle:2.3.3' | |
classpath "io.realm:realm-gradle-plugin:4.2.0" | |
classpath 'me.tatarka:gradle-retrolambda:3.7.0' |