├── .gradle
├── buildOutputCleanup
│ ├── built.bin
│ ├── cache.properties.lock
│ └── cache.properties
└── 4.1
│ ├── fileChanges
│ └── last-build.bin
│ ├── fileHashes
│ ├── fileHashes.bin
│ ├── fileHashes.lock
│ └── resourceHashesCache.bin
│ ├── javaCompile
│ ├── taskJars.bin
│ ├── jarAnalysis.bin
│ ├── javaCompile.lock
│ ├── taskHistory.bin
│ └── classAnalysis.bin
│ ├── fileContent
│ └── fileContent.lock
│ └── taskHistory
│ ├── taskHistory.bin
│ ├── taskHistory.lock
│ └── fileSnapshots.bin
├── settings.gradle
├── app
├── src
│ └── main
│ │ ├── res
│ │ ├── values
│ │ │ ├── dimens.xml
│ │ │ ├── strings.xml
│ │ │ ├── colors.xml
│ │ │ └── styles.xml
│ │ ├── mipmap-hdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ ├── mipmap-mdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ ├── mipmap-xhdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxhdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxxhdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ ├── mipmap-anydpi-v26
│ │ │ ├── ic_launcher.xml
│ │ │ └── ic_launcher_round.xml
│ │ ├── menu
│ │ │ └── menu_main.xml
│ │ ├── layout
│ │ │ ├── content_main.xml
│ │ │ ├── activity_main.xml
│ │ │ └── single_view_row.xml
│ │ ├── drawable-v24
│ │ │ └── ic_launcher_foreground.xml
│ │ └── drawable
│ │ │ └── ic_launcher_background.xml
│ │ ├── java
│ │ └── com
│ │ │ └── mobotechnology
│ │ │ └── bipinpandey
│ │ │ └── retrofit_handdirty
│ │ │ ├── model
│ │ │ ├── NoticeList.java
│ │ │ └── Notice.java
│ │ │ ├── network
│ │ │ └── RetrofitInstance.java
│ │ │ ├── JsonDemo
│ │ │ ├── adapter
│ │ │ └── NoticeAdapter.java
│ │ │ ├── activity
│ │ │ └── MainActivity.java
│ │ │ └── my_interface
│ │ │ └── GetNoticeDataService.java
│ │ └── AndroidManifest.xml
├── proguard-rules.pro
├── .gitignore
├── build.gradle
└── app.iml
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── .idea
├── vcs.xml
├── modules.xml
├── libraries
│ ├── com_android_support_constraint_constraint_layout_solver_1_0_2_jar.xml
│ ├── com_android_support_constraint_constraint_layout_1_0_2.xml
│ ├── com_google_code_gson_gson_2_7_jar.xml
│ ├── com_squareup_okio_okio_1_13_0_jar.xml
│ ├── android_arch_core_common_1_0_0_jar.xml
│ ├── com_squareup_okhttp3_okhttp_3_8_0_jar.xml
│ ├── android_arch_lifecycle_common_1_0_0_jar.xml
│ ├── com_squareup_retrofit2_retrofit_2_3_0_jar.xml
│ ├── com_squareup_retrofit2_converter_gson_2_1_0_jar.xml
│ ├── com_android_support_support_annotations_26_1_0_jar.xml
│ ├── com_android_support_design_26_1_0.xml
│ ├── android_arch_lifecycle_runtime_1_0_0.xml
│ ├── com_android_support_support_v4_26_1_0.xml
│ ├── com_android_support_transition_26_1_0.xml
│ ├── com_android_support_cardview_v7_26_1_0.xml
│ ├── com_android_support_appcompat_v7_26_1_0.xml
│ ├── com_android_support_support_compat_26_1_0.xml
│ ├── com_android_support_recyclerview_v7_26_1_0.xml
│ ├── com_android_support_support_core_ui_26_1_0.xml
│ ├── com_android_support_support_fragment_26_1_0.xml
│ ├── com_android_support_support_core_utils_26_1_0.xml
│ ├── com_android_support_support_media_compat_26_1_0.xml
│ ├── com_android_support_support_vector_drawable_26_1_0.xml
│ └── com_android_support_animated_vector_drawable_26_1_0.xml
├── runConfigurations.xml
├── gradle.xml
└── misc.xml
├── local.properties
├── gradle.properties
├── RetrofitHandDirty.iml
├── .gitignore
├── gradlew.bat
└── gradlew
/.gradle/buildOutputCleanup/built.bin:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------
/.gradle/4.1/fileChanges/last-build.bin:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.gradle/buildOutputCleanup/cache.properties.lock:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.gradle/buildOutputCleanup/cache.properties:
--------------------------------------------------------------------------------
1 | #Tue Nov 21 09:40:19 NPT 2017
2 | gradle.version=4.1
3 |
--------------------------------------------------------------------------------
/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 | 16dp
3 |
4 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jazzbpn/Retrofit-Hand_dirty/HEAD/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/.gradle/4.1/fileHashes/fileHashes.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jazzbpn/Retrofit-Hand_dirty/HEAD/.gradle/4.1/fileHashes/fileHashes.bin
--------------------------------------------------------------------------------
/.gradle/4.1/javaCompile/taskJars.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jazzbpn/Retrofit-Hand_dirty/HEAD/.gradle/4.1/javaCompile/taskJars.bin
--------------------------------------------------------------------------------
/.gradle/4.1/fileContent/fileContent.lock:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jazzbpn/Retrofit-Hand_dirty/HEAD/.gradle/4.1/fileContent/fileContent.lock
--------------------------------------------------------------------------------
/.gradle/4.1/fileHashes/fileHashes.lock:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jazzbpn/Retrofit-Hand_dirty/HEAD/.gradle/4.1/fileHashes/fileHashes.lock
--------------------------------------------------------------------------------
/.gradle/4.1/javaCompile/jarAnalysis.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jazzbpn/Retrofit-Hand_dirty/HEAD/.gradle/4.1/javaCompile/jarAnalysis.bin
--------------------------------------------------------------------------------
/.gradle/4.1/javaCompile/javaCompile.lock:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jazzbpn/Retrofit-Hand_dirty/HEAD/.gradle/4.1/javaCompile/javaCompile.lock
--------------------------------------------------------------------------------
/.gradle/4.1/javaCompile/taskHistory.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jazzbpn/Retrofit-Hand_dirty/HEAD/.gradle/4.1/javaCompile/taskHistory.bin
--------------------------------------------------------------------------------
/.gradle/4.1/taskHistory/taskHistory.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jazzbpn/Retrofit-Hand_dirty/HEAD/.gradle/4.1/taskHistory/taskHistory.bin
--------------------------------------------------------------------------------
/.gradle/4.1/taskHistory/taskHistory.lock:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jazzbpn/Retrofit-Hand_dirty/HEAD/.gradle/4.1/taskHistory/taskHistory.lock
--------------------------------------------------------------------------------
/.gradle/4.1/javaCompile/classAnalysis.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jazzbpn/Retrofit-Hand_dirty/HEAD/.gradle/4.1/javaCompile/classAnalysis.bin
--------------------------------------------------------------------------------
/.gradle/4.1/taskHistory/fileSnapshots.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jazzbpn/Retrofit-Hand_dirty/HEAD/.gradle/4.1/taskHistory/fileSnapshots.bin
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jazzbpn/Retrofit-Hand_dirty/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jazzbpn/Retrofit-Hand_dirty/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jazzbpn/Retrofit-Hand_dirty/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/.gradle/4.1/fileHashes/resourceHashesCache.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jazzbpn/Retrofit-Hand_dirty/HEAD/.gradle/4.1/fileHashes/resourceHashesCache.bin
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jazzbpn/Retrofit-Hand_dirty/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jazzbpn/Retrofit-Hand_dirty/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jazzbpn/Retrofit-Hand_dirty/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jazzbpn/Retrofit-Hand_dirty/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jazzbpn/Retrofit-Hand_dirty/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jazzbpn/Retrofit-Hand_dirty/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jazzbpn/Retrofit-Hand_dirty/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | Retrofit-HandDirty
3 | Settings
4 |
5 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #303F9F
5 | #FF4081
6 |
7 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Tue Nov 21 09:40:05 NPT 2017
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
7 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/.idea/libraries/com_android_support_constraint_constraint_layout_solver_1_0_2_jar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/local.properties:
--------------------------------------------------------------------------------
1 | ## This file is automatically generated by Android Studio.
2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED!
3 | #
4 | # This file should *NOT* be checked into Version Control Systems,
5 | # as it contains information specific to your local configuration.
6 | #
7 | # Location of the SDK. This is only used by Gradle.
8 | # For customization when using a Version Control System, please read the
9 | # header note.
10 | sdk.dir=/Users/bpn/Library/Android/sdk
--------------------------------------------------------------------------------
/app/src/main/res/menu/menu_main.xml:
--------------------------------------------------------------------------------
1 |
11 |
--------------------------------------------------------------------------------
/.idea/libraries/com_android_support_constraint_constraint_layout_1_0_2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/.idea/libraries/com_google_code_gson_gson_2_7_jar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/.idea/libraries/com_squareup_okio_okio_1_13_0_jar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/.idea/libraries/android_arch_core_common_1_0_0_jar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/.idea/libraries/com_squareup_okhttp3_okhttp_3_8_0_jar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/java/com/mobotechnology/bipinpandey/retrofit_handdirty/model/NoticeList.java:
--------------------------------------------------------------------------------
1 | package com.mobotechnology.bipinpandey.retrofit_handdirty.model;
2 |
3 | import com.google.gson.annotations.SerializedName;
4 |
5 | import java.util.ArrayList;
6 |
7 | public class NoticeList {
8 |
9 | @SerializedName("notice_list")
10 | private ArrayList noticeList;
11 |
12 | public ArrayList getNoticeArrayList() {
13 | return noticeList;
14 | }
15 |
16 | public void setNoticeArrayList(ArrayList noticeArrayList) {
17 | this.noticeList = noticeArrayList;
18 | }
19 | }
--------------------------------------------------------------------------------
/.idea/libraries/android_arch_lifecycle_common_1_0_0_jar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/.idea/runConfigurations.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/com_squareup_retrofit2_retrofit_2_3_0_jar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/.idea/libraries/com_squareup_retrofit2_converter_gson_2_1_0_jar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/.idea/libraries/com_android_support_support_annotations_26_1_0_jar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/.idea/libraries/com_android_support_design_26_1_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/android_arch_lifecycle_runtime_1_0_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/com_android_support_support_v4_26_1_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/com_android_support_transition_26_1_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/com_android_support_cardview_v7_26_1_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/com_android_support_appcompat_v7_26_1_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/com_android_support_support_compat_26_1_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/com_android_support_recyclerview_v7_26_1_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/com_android_support_support_core_ui_26_1_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/com_android_support_support_fragment_26_1_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/com_android_support_support_core_utils_26_1_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
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 | org.gradle.jvmargs=-Xmx1536m
13 |
14 | # When configured, Gradle will run in incubating parallel mode.
15 | # This option should only be used with decoupled projects. More details, visit
16 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
17 | # org.gradle.parallel=true
18 |
--------------------------------------------------------------------------------
/.idea/libraries/com_android_support_support_media_compat_26_1_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/.idea/libraries/com_android_support_support_vector_drawable_26_1_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/com_android_support_animated_vector_drawable_26_1_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/app/proguard-rules.pro:
--------------------------------------------------------------------------------
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 id 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 id.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/app/src/main/java/com/mobotechnology/bipinpandey/retrofit_handdirty/network/RetrofitInstance.java:
--------------------------------------------------------------------------------
1 | package com.mobotechnology.bipinpandey.retrofit_handdirty.network;
2 |
3 | import retrofit2.Retrofit;
4 | import retrofit2.converter.gson.GsonConverterFactory;
5 |
6 | public class RetrofitInstance {
7 |
8 | private static Retrofit retrofit;
9 | private static final String BASE_URL = "https://api.myjson.com/";
10 |
11 | /**
12 | * Create an instance of Retrofit object
13 | * */
14 | public static Retrofit getRetrofitInstance() {
15 | if (retrofit == null) {
16 | retrofit = new retrofit2.Retrofit.Builder()
17 | .baseUrl(BASE_URL)
18 | .addConverterFactory(GsonConverterFactory.create())
19 | .build();
20 | }
21 | return retrofit;
22 | }
23 | }
--------------------------------------------------------------------------------
/app/src/main/res/layout/content_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/RetrofitHandDirty.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
14 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/app/src/main/java/com/mobotechnology/bipinpandey/retrofit_handdirty/JsonDemo:
--------------------------------------------------------------------------------
1 | {
2 | "success": true,
3 | "notice_list": [
4 | {
5 | "id": "1",
6 | "title": "Notice 1",
7 | "brief": "Notice1 is the legal concept describing a requirement that a party be aware of legal process affecting their rights, obligations or duties.",
8 | "filesource": "http://mobotechnology.com/uploads/appnotice/est.pdf"
9 | },
10 | {
11 | "id": "2",
12 | "title": "Notice 2",
13 | "brief": "Notice2 is the legal concept describing a requirement that a party be aware of legal process affecting their rights, obligations or duties.",
14 | "filesource": "http://mobotechnology.com/uploads/appnotice/est.pdf"
15 | },
16 | {
17 | "id": "3",
18 | "title": "Notice 3",
19 | "brief": "Notice3 is the legal concept describing a requirement that a party be aware of legal process affecting their rights, obligations or duties.",
20 | "filesource": "http://mobotechnology.com/uploads/appnotice/est.pdf"
21 | }
22 | ]
23 | }
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Built application files
2 | *.apk
3 | *.ap_
4 |
5 | # Files for the ART/Dalvik VM
6 | *.dex
7 |
8 | # Java class files
9 | *.class
10 |
11 | # Generated files
12 | bin/
13 | gen/
14 | out/
15 |
16 | # Gradle files
17 | .gradle/
18 | build/
19 |
20 | # Local configuration file (sdk path, etc)
21 | local.properties
22 |
23 | # Proguard folder generated by Eclipse
24 | proguard/
25 |
26 | # Log Files
27 | *.log
28 |
29 | # Android Studio Navigation editor temp files
30 | .navigation/
31 |
32 | # Android Studio captures folder
33 | captures/
34 |
35 | # IntelliJ
36 | *.iml
37 | .idea/workspace.xml
38 | .idea/tasks.xml
39 | .idea/gradle.xml
40 | .idea/dictionaries
41 | .idea/libraries
42 |
43 | # Keystore files
44 | # Uncomment the following line if you do not want to check your keystore files in.
45 | #*.jks
46 |
47 | # External native build folder generated in Android Studio 2.2 and later
48 | .externalNativeBuild
49 |
50 | # Google Services (e.g. APIs or Firebase)
51 | google-services.json
52 |
53 | # Freeline
54 | freeline.py
55 | freeline/
56 | freeline_project_description.json
--------------------------------------------------------------------------------
/app/.gitignore:
--------------------------------------------------------------------------------
1 | # Built application files
2 | *.apk
3 | *.ap_
4 |
5 | # Files for the ART/Dalvik VM
6 | *.dex
7 |
8 | # Java class files
9 | *.class
10 |
11 | # Generated files
12 | bin/
13 | gen/
14 | out/
15 |
16 | # Gradle files
17 | .gradle/
18 | build/
19 |
20 | # Local configuration file (sdk path, etc)
21 | local.properties
22 |
23 | # Proguard folder generated by Eclipse
24 | proguard/
25 |
26 | # Log Files
27 | *.log
28 |
29 | # Android Studio Navigation editor temp files
30 | .navigation/
31 |
32 | # Android Studio captures folder
33 | captures/
34 |
35 | # IntelliJ
36 | *.iml
37 | .idea/workspace.xml
38 | .idea/tasks.xml
39 | .idea/gradle.xml
40 | .idea/dictionaries
41 | .idea/libraries
42 |
43 | # Keystore files
44 | # Uncomment the following line if you do not want to check your keystore files in.
45 | #*.jks
46 |
47 | # External native build folder generated in Android Studio 2.2 and later
48 | .externalNativeBuild
49 |
50 | # Google Services (e.g. APIs or Firebase)
51 | google-services.json
52 |
53 | # Freeline
54 | freeline.py
55 | freeline/
56 | freeline_project_description.json
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 26
5 | defaultConfig {
6 | applicationId "com.mobotechnology.bipinpandey.retrofit_handdirty"
7 | minSdkVersion 15
8 | targetSdkVersion 26
9 | versionCode 1
10 | versionName "1.0"
11 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
12 | }
13 | buildTypes {
14 | release {
15 | minifyEnabled false
16 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
17 | }
18 | }
19 | }
20 |
21 | dependencies {
22 | implementation fileTree(dir: 'libs', include: ['*.jar'])
23 | implementation 'com.android.support:appcompat-v7:26.1.0'
24 | implementation 'com.android.support.constraint:constraint-layout:1.0.2'
25 |
26 | implementation 'com.android.support:design:26.1.0'
27 | compile "com.android.support:recyclerview-v7:26.1.0"
28 | compile "com.android.support:cardview-v7:26.1.0"
29 |
30 | compile 'com.squareup.retrofit2:retrofit:2.3.0'
31 | compile 'com.squareup.retrofit2:converter-gson:2.1.0'
32 |
33 | }
34 |
35 |
36 |
--------------------------------------------------------------------------------
/app/src/main/java/com/mobotechnology/bipinpandey/retrofit_handdirty/model/Notice.java:
--------------------------------------------------------------------------------
1 | package com.mobotechnology.bipinpandey.retrofit_handdirty.model;
2 |
3 | import com.google.gson.annotations.SerializedName;
4 |
5 | public class Notice {
6 |
7 | @SerializedName("id")
8 | private String id;
9 | @SerializedName("title")
10 | private String title;
11 | @SerializedName("brief")
12 | private String brief;
13 | @SerializedName("filesource")
14 | private String fileSource;
15 |
16 | public Notice(String id, String title, String brief, String fileSource) {
17 | this.id = id;
18 | this.title = title;
19 | this.brief = brief;
20 | this.fileSource = fileSource;
21 | }
22 |
23 | public String getId() {
24 | return id;
25 | }
26 |
27 | public void setId(String id) {
28 | this.id = id;
29 | }
30 |
31 | public String getTitle() {
32 | return title;
33 | }
34 |
35 | public void setTitle(String title) {
36 | this.title = title;
37 | }
38 |
39 | public String getBrief() {
40 | return brief;
41 | }
42 |
43 | public void setBrief(String brief) {
44 | this.brief = brief;
45 | }
46 |
47 | public String getFileSource() {
48 | return fileSource;
49 | }
50 |
51 | public void setFileSource(String fileSource) {
52 | this.fileSource = fileSource;
53 | }
54 | }
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
13 |
14 |
20 |
21 |
22 |
23 |
24 |
25 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/single_view_row.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
16 |
17 |
18 |
24 |
25 |
26 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-v24/ic_launcher_foreground.xml:
--------------------------------------------------------------------------------
1 |
7 |
12 |
13 |
19 |
22 |
25 |
26 |
27 |
28 |
34 |
35 |
--------------------------------------------------------------------------------
/app/src/main/java/com/mobotechnology/bipinpandey/retrofit_handdirty/adapter/NoticeAdapter.java:
--------------------------------------------------------------------------------
1 | package com.mobotechnology.bipinpandey.retrofit_handdirty.adapter;
2 |
3 | import android.support.v7.widget.RecyclerView;
4 | import android.view.LayoutInflater;
5 | import android.view.View;
6 | import android.view.ViewGroup;
7 | import android.widget.TextView;
8 |
9 | import com.mobotechnology.bipinpandey.retrofit_handdirty.R;
10 | import com.mobotechnology.bipinpandey.retrofit_handdirty.model.Notice;
11 |
12 | import java.util.ArrayList;
13 |
14 | public class NoticeAdapter extends RecyclerView.Adapter {
15 |
16 | private ArrayList dataList;
17 |
18 | public NoticeAdapter(ArrayList dataList) {
19 | this.dataList = dataList;
20 | }
21 |
22 | @Override
23 | public NoticeViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
24 | LayoutInflater layoutInflater = LayoutInflater.from(parent.getContext());
25 | View view = layoutInflater.inflate(R.layout.single_view_row, parent, false);
26 | return new NoticeViewHolder(view);
27 | }
28 |
29 | @Override
30 | public void onBindViewHolder(NoticeViewHolder holder, int position) {
31 | holder.txtNoticeTitle.setText(dataList.get(position).getTitle());
32 | holder.txtNoticeBrief.setText(dataList.get(position).getBrief());
33 | holder.txtNoticeFilePath.setText(dataList.get(position).getFileSource());
34 | }
35 |
36 | @Override
37 | public int getItemCount() {
38 | return dataList.size();
39 | }
40 |
41 | class NoticeViewHolder extends RecyclerView.ViewHolder {
42 |
43 | TextView txtNoticeTitle, txtNoticeBrief, txtNoticeFilePath;
44 |
45 | NoticeViewHolder(View itemView) {
46 | super(itemView);
47 | txtNoticeTitle = itemView.findViewById(R.id.txt_notice_title);
48 | txtNoticeBrief = itemView.findViewById(R.id.txt_notice_brief);
49 | txtNoticeFilePath = itemView.findViewById(R.id.txt_notice_file_path);
50 | }
51 | }
52 | }
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/app/src/main/java/com/mobotechnology/bipinpandey/retrofit_handdirty/activity/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.mobotechnology.bipinpandey.retrofit_handdirty.activity;
2 |
3 | import android.os.Bundle;
4 | import android.support.v7.app.AppCompatActivity;
5 | import android.support.v7.widget.LinearLayoutManager;
6 | import android.support.v7.widget.RecyclerView;
7 | import android.support.v7.widget.Toolbar;
8 | import android.util.Log;
9 | import android.widget.Toast;
10 |
11 | import com.mobotechnology.bipinpandey.retrofit_handdirty.R;
12 | import com.mobotechnology.bipinpandey.retrofit_handdirty.adapter.NoticeAdapter;
13 | import com.mobotechnology.bipinpandey.retrofit_handdirty.model.Notice;
14 | import com.mobotechnology.bipinpandey.retrofit_handdirty.model.NoticeList;
15 | import com.mobotechnology.bipinpandey.retrofit_handdirty.my_interface.GetNoticeDataService;
16 | import com.mobotechnology.bipinpandey.retrofit_handdirty.network.RetrofitInstance;
17 |
18 | import java.util.ArrayList;
19 |
20 | import retrofit2.Call;
21 | import retrofit2.Callback;
22 | import retrofit2.Response;
23 |
24 | public class MainActivity extends AppCompatActivity {
25 |
26 | private NoticeAdapter adapter;
27 | private RecyclerView recyclerView;
28 |
29 | @Override
30 | protected void onCreate(Bundle savedInstanceState) {
31 | super.onCreate(savedInstanceState);
32 | setContentView(R.layout.activity_main);
33 | Toolbar toolbar = findViewById(R.id.toolbar);
34 | setSupportActionBar(toolbar);
35 |
36 |
37 | /** Create handle for the RetrofitInstance interface*/
38 | GetNoticeDataService service = RetrofitInstance.getRetrofitInstance().create(GetNoticeDataService.class);
39 |
40 | /** Call the method with parameter in the interface to get the notice data*/
41 | Call call = service.getNoticeData();
42 |
43 | /**Log the URL called*/
44 | Log.wtf("URL Called", call.request().url() + "");
45 |
46 | call.enqueue(new Callback() {
47 | @Override
48 | public void onResponse(Call call, Response response) {
49 | generateNoticeList(response.body().getNoticeArrayList());
50 | }
51 |
52 | @Override
53 | public void onFailure(Call call, Throwable t) {
54 | Toast.makeText(MainActivity.this, "Something went wrong...Error message: " + t.getMessage(), Toast.LENGTH_SHORT).show();
55 | }
56 | });
57 | }
58 |
59 | /** Method to generate List of notice using RecyclerView with custom adapter*/
60 | private void generateNoticeList(ArrayList noticeArrayList) {
61 | recyclerView = findViewById(R.id.recycler_view_notice_list);
62 | adapter = new NoticeAdapter(noticeArrayList);
63 | RecyclerView.LayoutManager layoutManager = new LinearLayoutManager(MainActivity.this);
64 | recyclerView.setLayoutManager(layoutManager);
65 | recyclerView.setAdapter(adapter);
66 | }
67 |
68 | }
69 |
--------------------------------------------------------------------------------
/app/src/main/java/com/mobotechnology/bipinpandey/retrofit_handdirty/my_interface/GetNoticeDataService.java:
--------------------------------------------------------------------------------
1 | package com.mobotechnology.bipinpandey.retrofit_handdirty.my_interface;
2 |
3 | import com.mobotechnology.bipinpandey.retrofit_handdirty.model.Notice;
4 | import com.mobotechnology.bipinpandey.retrofit_handdirty.model.NoticeList;
5 |
6 | import java.util.List;
7 | import java.util.Map;
8 |
9 | import okhttp3.RequestBody;
10 | import retrofit2.Call;
11 | import retrofit2.http.Body;
12 | import retrofit2.http.Field;
13 | import retrofit2.http.FormUrlEncoded;
14 | import retrofit2.http.GET;
15 | import retrofit2.http.Header;
16 | import retrofit2.http.Headers;
17 | import retrofit2.http.Multipart;
18 | import retrofit2.http.POST;
19 | import retrofit2.http.PUT;
20 | import retrofit2.http.Part;
21 | import retrofit2.http.Path;
22 | import retrofit2.http.Query;
23 | import retrofit2.http.QueryMap;
24 |
25 | public interface GetNoticeDataService {
26 |
27 | @GET("bins/1bsqcn/")
28 | Call getNoticeData();
29 |
30 |
31 |
32 | /**
33 | * URL MANIPULATION
34 | * @since Not used, Just to know how to use @query to get JSONObject
35 | * */
36 | @GET("bins/path/")
37 | Call getNoticeDataData(@Query("company_no") int companyNo);
38 |
39 |
40 |
41 | /**
42 | * URL MANIPULATION
43 | * A request URL can be updated dynamically using replacement blocks and parameters on the method.
44 | * A replacement block is an alphanumeric string surrounded by { and }
45 | * A corresponding parameter must be annotated with @Path using the same string.
46 | * */
47 | @GET("group/{id}/users")
48 | Call> groupList(@Path("id") int groupId);
49 |
50 |
51 |
52 | /**
53 | * URL MANIPULATION
54 | * Using Query parameters.
55 | * */
56 | @GET("group/{id}/users")
57 | Call> groupList(@Path("id") int groupId, @Query("sort") String sort);
58 |
59 |
60 |
61 |
62 | /**
63 | * URL MANIPULATION
64 | * complex query parameter combinations a Map can be used
65 | * */
66 | @GET("group/{id}/noticelist")
67 | Call> groupList(@Path("id") int groupId, @QueryMap Map options);
68 |
69 |
70 |
71 |
72 | /**
73 | * URL MANIPULATION
74 | * HTTP request body with the @Body annotation
75 | */
76 | @POST("notice/new")
77 | Call createNotice(@Body Notice notice);
78 |
79 |
80 |
81 |
82 | /**
83 | * FORM ENCODED AND MULTIPART
84 | * Form-encoded data is sent when @FormUrlEncoded is present on the method.
85 | * Each key-value pair is annotated with @Field containing the name and the object providing the value
86 | * */
87 | @FormUrlEncoded
88 | @POST("notice/edit")
89 | Call updateNotice(@Field("id") String id, @Field("title") String title);
90 |
91 |
92 |
93 |
94 | /**
95 | * FORM ENCODED AND MULTIPART
96 | * Multipart requests are used when @Multipart is present on the method.
97 | * Parts are declared using the @Part annotation.
98 | * */
99 | @Multipart
100 | @PUT("notice/photo")
101 | Call updateNotice(@Part("photo") RequestBody photo, @Part("description") RequestBody description);
102 |
103 |
104 |
105 |
106 | /**
107 | * HEADER MANIPULATION
108 | * Set static headers for a method using the @Headers annotation.
109 | * */
110 | @Headers("Cache-Control: max-age=640000")
111 | @GET("notice/list")
112 | Call> NoticeList();
113 |
114 |
115 |
116 | /**
117 | * HEADER MANIPULATION
118 | * */
119 | @Headers({
120 | "Accept: application/vnd.github.v3.full+json",
121 | "User-Agent: Retrofit-Sample-App"
122 | })
123 | @GET("noticelist/{title}")
124 | Call getNotice(@Path("title") String title);
125 |
126 |
127 |
128 |
129 | /**
130 | * HEADER MANIPULATION
131 | * A request Header can be updated dynamically using the @Header annotation.
132 | * A corresponding parameter must be provided to the @Header.
133 | * If the value is null, the header will be omitted. Otherwise, toString will be called on the value, and the result used.
134 | * */
135 | @GET("notice")
136 | Call getNoticeUsingHeader(@Header("Authorization") String authorization);
137 |
138 | }
--------------------------------------------------------------------------------
/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10 | DEFAULT_JVM_OPTS=""
11 |
12 | APP_NAME="Gradle"
13 | APP_BASE_NAME=`basename "$0"`
14 |
15 | # Use the maximum available, or set MAX_FD != -1 to use that value.
16 | MAX_FD="maximum"
17 |
18 | warn ( ) {
19 | echo "$*"
20 | }
21 |
22 | die ( ) {
23 | echo
24 | echo "$*"
25 | echo
26 | exit 1
27 | }
28 |
29 | # OS specific support (must be 'true' or 'false').
30 | cygwin=false
31 | msys=false
32 | darwin=false
33 | case "`uname`" in
34 | CYGWIN* )
35 | cygwin=true
36 | ;;
37 | Darwin* )
38 | darwin=true
39 | ;;
40 | MINGW* )
41 | msys=true
42 | ;;
43 | esac
44 |
45 | # Attempt to set APP_HOME
46 | # Resolve links: $0 may be a link
47 | PRG="$0"
48 | # Need this for relative symlinks.
49 | while [ -h "$PRG" ] ; do
50 | ls=`ls -ld "$PRG"`
51 | link=`expr "$ls" : '.*-> \(.*\)$'`
52 | if expr "$link" : '/.*' > /dev/null; then
53 | PRG="$link"
54 | else
55 | PRG=`dirname "$PRG"`"/$link"
56 | fi
57 | done
58 | SAVED="`pwd`"
59 | cd "`dirname \"$PRG\"`/" >/dev/null
60 | APP_HOME="`pwd -P`"
61 | cd "$SAVED" >/dev/null
62 |
63 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
64 |
65 | # Determine the Java command to use to start the JVM.
66 | if [ -n "$JAVA_HOME" ] ; then
67 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
68 | # IBM's JDK on AIX uses strange locations for the executables
69 | JAVACMD="$JAVA_HOME/jre/sh/java"
70 | else
71 | JAVACMD="$JAVA_HOME/bin/java"
72 | fi
73 | if [ ! -x "$JAVACMD" ] ; then
74 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
75 |
76 | Please set the JAVA_HOME variable in your environment to match the
77 | location of your Java installation."
78 | fi
79 | else
80 | JAVACMD="java"
81 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
82 |
83 | Please set the JAVA_HOME variable in your environment to match the
84 | location of your Java installation."
85 | fi
86 |
87 | # Increase the maximum file descriptors if we can.
88 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
89 | MAX_FD_LIMIT=`ulimit -H -n`
90 | if [ $? -eq 0 ] ; then
91 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
92 | MAX_FD="$MAX_FD_LIMIT"
93 | fi
94 | ulimit -n $MAX_FD
95 | if [ $? -ne 0 ] ; then
96 | warn "Could not set maximum file descriptor limit: $MAX_FD"
97 | fi
98 | else
99 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
100 | fi
101 | fi
102 |
103 | # For Darwin, add options to specify how the application appears in the dock
104 | if $darwin; then
105 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:id=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
106 | fi
107 |
108 | # For Cygwin, switch paths to Windows format before running java
109 | if $cygwin ; then
110 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
111 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
112 | JAVACMD=`cygpath --unix "$JAVACMD"`
113 |
114 | # We build the pattern for arguments to be converted via cygpath
115 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
116 | SEP=""
117 | for dir in $ROOTDIRSRAW ; do
118 | ROOTDIRS="$ROOTDIRS$SEP$dir"
119 | SEP="|"
120 | done
121 | OURCYGPATTERN="(^($ROOTDIRS))"
122 | # Add a user-defined pattern to the cygpath arguments
123 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
124 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
125 | fi
126 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
127 | i=0
128 | for arg in "$@" ; do
129 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
130 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
131 |
132 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
133 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
134 | else
135 | eval `echo args$i`="\"$arg\""
136 | fi
137 | i=$((i+1))
138 | done
139 | case $i in
140 | (0) set -- ;;
141 | (1) set -- "$args0" ;;
142 | (2) set -- "$args0" "$args1" ;;
143 | (3) set -- "$args0" "$args1" "$args2" ;;
144 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
145 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
146 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
147 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
148 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
149 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
150 | esac
151 | fi
152 |
153 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
154 | function splitJvmOpts() {
155 | JVM_OPTS=("$@")
156 | }
157 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
158 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
159 |
160 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
161 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_launcher_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
10 |
15 |
20 |
25 |
30 |
35 |
40 |
45 |
50 |
55 |
60 |
65 |
70 |
75 |
80 |
85 |
90 |
95 |
100 |
105 |
110 |
115 |
120 |
125 |
130 |
135 |
140 |
145 |
150 |
155 |
160 |
165 |
170 |
171 |
--------------------------------------------------------------------------------
/app/app.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 | generateDebugSources
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
--------------------------------------------------------------------------------