Skip to content

Instantly share code, notes, and snippets.

View mrabelwahed's full-sized avatar
🎯
Working Remotely

Mahmoud Ramadan mrabelwahed

🎯
Working Remotely
View GitHub Profile
# The Gradle daemon aims to improve the startup and execution time of Gradle.
# When set to true the Gradle daemon is to run the build.
org.gradle.daemon=true
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
# Default value: -Xmx10248m -XX:MaxPermSize=256m
org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
# When configured, Gradle will run in incubating parallel mode.
// 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'
@mrabelwahed
mrabelwahed / build.gradle
Created December 23, 2017 14:27
This is build.gradle file for app module
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
@mrabelwahed
mrabelwahed / AndroidManifest
Created December 23, 2017 14:30
this manifest file for Android project
<?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"
@mrabelwahed
mrabelwahed / MyApp
Created December 23, 2017 14:35
this is My App class for Android Application
package com.ramadan_apps.rxjavawithrealmcache;
import android.app.Application;
import io.realm.Realm;
/**
* Created by Mahmoud Ramadan on 12/22/17.
*/
@mrabelwahed
mrabelwahed / activity_main.xml
Created December 23, 2017 14:40
this is the layout for Main activity
<?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"
@mrabelwahed
mrabelwahed / repo_item.xml
Created December 23, 2017 14:44
This is recyclerview item
<?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"
@mrabelwahed
mrabelwahed / Repo.java
Created December 23, 2017 14:51
this is the repo table
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.
*/
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;
@mrabelwahed
mrabelwahed / AppConst.java
Created December 23, 2017 14:54
this is const class for Android app
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/";
}