├── app ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ ├── values-v21 │ │ │ │ └── styles.xml │ │ │ ├── mipmap-hdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── drawable-nodpi │ │ │ │ ├── emoji_1f60a.png │ │ │ │ ├── emoji_1f60d.png │ │ │ │ └── emoji_1f61f.png │ │ │ ├── mipmap-xhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── drawable-hdpi │ │ │ │ ├── ic_delete_24dp.png │ │ │ │ ├── ic_add_white_24dp.png │ │ │ │ ├── ic_mode_edit_24dp.png │ │ │ │ ├── ic_send_white_24dp.png │ │ │ │ └── ic_mode_edit_white_24dp.png │ │ │ ├── drawable-mdpi │ │ │ │ ├── ic_delete_24dp.png │ │ │ │ ├── ic_add_white_24dp.png │ │ │ │ ├── ic_mode_edit_24dp.png │ │ │ │ ├── ic_send_white_24dp.png │ │ │ │ └── ic_mode_edit_white_24dp.png │ │ │ ├── drawable-xhdpi │ │ │ │ ├── ic_delete_24dp.png │ │ │ │ ├── ic_add_white_24dp.png │ │ │ │ ├── ic_mode_edit_24dp.png │ │ │ │ ├── ic_send_white_24dp.png │ │ │ │ └── ic_mode_edit_white_24dp.png │ │ │ ├── drawable-xxhdpi │ │ │ │ ├── ic_delete_24dp.png │ │ │ │ ├── ic_add_white_24dp.png │ │ │ │ ├── ic_mode_edit_24dp.png │ │ │ │ ├── ic_send_white_24dp.png │ │ │ │ └── ic_mode_edit_white_24dp.png │ │ │ ├── drawable-xxxhdpi │ │ │ │ ├── ic_delete_24dp.png │ │ │ │ ├── ic_add_white_24dp.png │ │ │ │ ├── ic_mode_edit_24dp.png │ │ │ │ ├── ic_send_white_24dp.png │ │ │ │ └── ic_mode_edit_white_24dp.png │ │ │ ├── values │ │ │ │ ├── int.xml │ │ │ │ ├── dimens.xml │ │ │ │ ├── colors.xml │ │ │ │ ├── styles.xml │ │ │ │ └── strings.xml │ │ │ ├── drawable │ │ │ │ ├── mode_background.xml │ │ │ │ └── button_ripple_effect_circle.xml │ │ │ ├── values-w820dp │ │ │ │ └── dimens.xml │ │ │ ├── drawable-v21 │ │ │ │ └── button_ripple_effect_circle.xml │ │ │ ├── menu │ │ │ │ ├── menu_send.xml │ │ │ │ ├── menu_edit.xml │ │ │ │ └── menu_default.xml │ │ │ └── layout │ │ │ │ ├── activity_edit_user_profile.xml │ │ │ │ ├── activity_sign_up.xml │ │ │ │ ├── activity_sign_in.xml │ │ │ │ ├── activity_create_or_edit_tweet.xml │ │ │ │ ├── tweet_row.xml │ │ │ │ └── activity_main.xml │ │ ├── java │ │ │ └── com │ │ │ │ └── atahani │ │ │ │ └── retrofit_sample │ │ │ │ ├── models │ │ │ │ ├── ErrorModel.java │ │ │ │ ├── AuthenticationResponseModel.java │ │ │ │ ├── UserModel.java │ │ │ │ ├── TokenModel.java │ │ │ │ ├── TweetModel.java │ │ │ │ ├── RefreshTokenRequestModel.java │ │ │ │ ├── SignInRequestModel.java │ │ │ │ └── SignUpRequestModel.java │ │ │ │ ├── adapter │ │ │ │ ├── OperationResultModel.java │ │ │ │ └── TweetAdapter.java │ │ │ │ ├── TApplication.java │ │ │ │ ├── utility │ │ │ │ ├── ClientConfigs.java │ │ │ │ ├── Constants.java │ │ │ │ ├── ErrorUtils.java │ │ │ │ ├── CropCircleTransformation.java │ │ │ │ ├── AppPreferenceTools.java │ │ │ │ └── AndroidUtilities.java │ │ │ │ ├── network │ │ │ │ ├── UTCDateTypeAdapter.java │ │ │ │ ├── FakeTwitterService.java │ │ │ │ └── FakeTwitterProvider.java │ │ │ │ └── ui │ │ │ │ ├── EditUserProfile.java │ │ │ │ ├── SignUpActivity.java │ │ │ │ ├── SignInActivity.java │ │ │ │ ├── CreateOrEditTweet.java │ │ │ │ └── MainActivity.java │ │ └── AndroidManifest.xml │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── atahani │ │ │ └── retrofit_sample │ │ │ └── ExampleUnitTest.java │ └── androidTest │ │ └── java │ │ └── com │ │ └── atahani │ │ └── retrofit_sample │ │ └── ApplicationTest.java ├── proguard-rules.pro └── build.gradle ├── settings.gradle ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradle.properties ├── LICENSE ├── README.md ├── .gitignore ├── gradlew.bat └── gradlew /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | -------------------------------------------------------------------------------- /app/src/main/res/values-v21/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/atahani/retrofit-sample/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/atahani/retrofit-sample/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/atahani/retrofit-sample/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-nodpi/emoji_1f60a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/atahani/retrofit-sample/HEAD/app/src/main/res/drawable-nodpi/emoji_1f60a.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-nodpi/emoji_1f60d.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/atahani/retrofit-sample/HEAD/app/src/main/res/drawable-nodpi/emoji_1f60d.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-nodpi/emoji_1f61f.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/atahani/retrofit-sample/HEAD/app/src/main/res/drawable-nodpi/emoji_1f61f.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/atahani/retrofit-sample/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/atahani/retrofit-sample/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/atahani/retrofit-sample/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_delete_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/atahani/retrofit-sample/HEAD/app/src/main/res/drawable-hdpi/ic_delete_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_delete_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/atahani/retrofit-sample/HEAD/app/src/main/res/drawable-mdpi/ic_delete_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_add_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/atahani/retrofit-sample/HEAD/app/src/main/res/drawable-hdpi/ic_add_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_mode_edit_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/atahani/retrofit-sample/HEAD/app/src/main/res/drawable-hdpi/ic_mode_edit_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_add_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/atahani/retrofit-sample/HEAD/app/src/main/res/drawable-mdpi/ic_add_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_mode_edit_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/atahani/retrofit-sample/HEAD/app/src/main/res/drawable-mdpi/ic_mode_edit_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_delete_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/atahani/retrofit-sample/HEAD/app/src/main/res/drawable-xhdpi/ic_delete_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_delete_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/atahani/retrofit-sample/HEAD/app/src/main/res/drawable-xxhdpi/ic_delete_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_delete_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/atahani/retrofit-sample/HEAD/app/src/main/res/drawable-xxxhdpi/ic_delete_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_send_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/atahani/retrofit-sample/HEAD/app/src/main/res/drawable-hdpi/ic_send_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_send_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/atahani/retrofit-sample/HEAD/app/src/main/res/drawable-mdpi/ic_send_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_add_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/atahani/retrofit-sample/HEAD/app/src/main/res/drawable-xhdpi/ic_add_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_mode_edit_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/atahani/retrofit-sample/HEAD/app/src/main/res/drawable-xhdpi/ic_mode_edit_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_send_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/atahani/retrofit-sample/HEAD/app/src/main/res/drawable-xhdpi/ic_send_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_add_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/atahani/retrofit-sample/HEAD/app/src/main/res/drawable-xxhdpi/ic_add_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_mode_edit_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/atahani/retrofit-sample/HEAD/app/src/main/res/drawable-xxhdpi/ic_mode_edit_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_send_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/atahani/retrofit-sample/HEAD/app/src/main/res/drawable-xxhdpi/ic_send_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_add_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/atahani/retrofit-sample/HEAD/app/src/main/res/drawable-xxxhdpi/ic_add_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_mode_edit_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/atahani/retrofit-sample/HEAD/app/src/main/res/drawable-xxxhdpi/ic_mode_edit_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_send_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/atahani/retrofit-sample/HEAD/app/src/main/res/drawable-xxxhdpi/ic_send_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_mode_edit_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/atahani/retrofit-sample/HEAD/app/src/main/res/drawable-hdpi/ic_mode_edit_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_mode_edit_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/atahani/retrofit-sample/HEAD/app/src/main/res/drawable-mdpi/ic_mode_edit_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_mode_edit_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/atahani/retrofit-sample/HEAD/app/src/main/res/drawable-xhdpi/ic_mode_edit_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_mode_edit_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/atahani/retrofit-sample/HEAD/app/src/main/res/drawable-xxhdpi/ic_mode_edit_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_mode_edit_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/atahani/retrofit-sample/HEAD/app/src/main/res/drawable-xxxhdpi/ic_mode_edit_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/values/int.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 0x1F60A 4 | 0x1F60D 5 | 0x1F61F 6 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Mon Dec 28 10:00:20 PST 2015 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-2.10-all.zip 7 | -------------------------------------------------------------------------------- /app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 16dp 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/java/com/atahani/retrofit_sample/models/ErrorModel.java: -------------------------------------------------------------------------------- 1 | package com.atahani.retrofit_sample.models; 2 | 3 | /** 4 | * Error Model when error happened in http like 404 5 | */ 6 | public class ErrorModel { 7 | 8 | public String type; 9 | public String description; 10 | 11 | } 12 | -------------------------------------------------------------------------------- /app/src/main/java/com/atahani/retrofit_sample/adapter/OperationResultModel.java: -------------------------------------------------------------------------------- 1 | package com.atahani.retrofit_sample.adapter; 2 | 3 | /** 4 | * operation result model like delete something 5 | */ 6 | public class OperationResultModel { 7 | public String type; 8 | public String description; 9 | } 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/mode_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/java/com/atahani/retrofit_sample/models/AuthenticationResponseModel.java: -------------------------------------------------------------------------------- 1 | package com.atahani.retrofit_sample.models; 2 | 3 | /** 4 | * Authentication response Model used as response model in sign in and sign up request 5 | */ 6 | public class AuthenticationResponseModel { 7 | public TokenModel token; 8 | public UserModel user_profile; 9 | } 10 | -------------------------------------------------------------------------------- /app/src/main/java/com/atahani/retrofit_sample/models/UserModel.java: -------------------------------------------------------------------------------- 1 | package com.atahani.retrofit_sample.models; 2 | 3 | import com.google.gson.annotations.SerializedName; 4 | 5 | /** 6 | * User Model 7 | */ 8 | public class UserModel { 9 | public String id; 10 | public String email; 11 | public String name; 12 | @SerializedName("image") 13 | public String imageUrl; 14 | } 15 | -------------------------------------------------------------------------------- /app/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 64dp 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-v21/button_ripple_effect_circle.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/menu/menu_send.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 10 | -------------------------------------------------------------------------------- /app/src/test/java/com/atahani/retrofit_sample/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.atahani.retrofit_sample; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * To work on unit tests, switch the Test Artifact in the Build Variants view. 9 | */ 10 | public class ExampleUnitTest { 11 | @Test 12 | public void addition_isCorrect() throws Exception { 13 | assertEquals(4, 2 + 2); 14 | } 15 | } -------------------------------------------------------------------------------- /app/src/main/java/com/atahani/retrofit_sample/models/TokenModel.java: -------------------------------------------------------------------------------- 1 | package com.atahani.retrofit_sample.models; 2 | 3 | import java.util.Date; 4 | 5 | /** 6 | * Token Model used in sign in, sign up and refresh token response 7 | */ 8 | public class TokenModel { 9 | public String access_token; 10 | public Long expire_in_sec; 11 | public Date expire_at; 12 | public String refresh_token; 13 | public String app_id; 14 | } 15 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | #9FA8DA 7 | #E8EAF6 8 | #F2717171 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/menu/menu_edit.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 10 | -------------------------------------------------------------------------------- /app/src/androidTest/java/com/atahani/retrofit_sample/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package com.atahani.retrofit_sample; 2 | 3 | import android.app.Application; 4 | import android.test.ApplicationTestCase; 5 | 6 | /** 7 | * Testing Fundamentals 8 | */ 9 | public class ApplicationTest extends ApplicationTestCase { 10 | public ApplicationTest() { 11 | super(Application.class); 12 | } 13 | } -------------------------------------------------------------------------------- /app/src/main/java/com/atahani/retrofit_sample/TApplication.java: -------------------------------------------------------------------------------- 1 | package com.atahani.retrofit_sample; 2 | 3 | import android.app.Application; 4 | import android.content.Context; 5 | 6 | /** 7 | * extend application class 8 | */ 9 | public class TApplication extends Application { 10 | 11 | public static volatile Context applicationContext; 12 | 13 | @Override 14 | public void onCreate() { 15 | super.onCreate(); 16 | applicationContext = getApplicationContext(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_ripple_effect_circle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /app/src/main/java/com/atahani/retrofit_sample/models/TweetModel.java: -------------------------------------------------------------------------------- 1 | package com.atahani.retrofit_sample.models; 2 | 3 | import java.util.Date; 4 | 5 | /** 6 | * Tweet Model to send new tweet for request body and get in in response 7 | * NOTE: all of the attr should define as public and also the name should match in REST API 8 | */ 9 | public class TweetModel { 10 | public String id; 11 | public String feel; 12 | public String body; 13 | public Date created_at; 14 | public Date updated_at; 15 | public UserModel user; 16 | } 17 | -------------------------------------------------------------------------------- /app/src/main/java/com/atahani/retrofit_sample/models/RefreshTokenRequestModel.java: -------------------------------------------------------------------------------- 1 | package com.atahani.retrofit_sample.models; 2 | 3 | import com.atahani.retrofit_sample.utility.ClientConfigs; 4 | 5 | /** 6 | * used in refresh token request 7 | */ 8 | public class RefreshTokenRequestModel { 9 | public String client_id; 10 | public String client_key; 11 | public String refresh_token; 12 | 13 | public RefreshTokenRequestModel() { 14 | this.client_id = ClientConfigs.CLIENT_ID; 15 | this.client_key = ClientConfigs.CLIENT_KEY; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /app/src/main/java/com/atahani/retrofit_sample/models/SignInRequestModel.java: -------------------------------------------------------------------------------- 1 | package com.atahani.retrofit_sample.models; 2 | 3 | import com.atahani.retrofit_sample.utility.ClientConfigs; 4 | 5 | /** 6 | * Sgin in Requst model used in sign in request 7 | */ 8 | public class SignInRequestModel { 9 | public String client_id; 10 | public String client_key; 11 | public String email; 12 | public String password; 13 | 14 | public SignInRequestModel() { 15 | this.client_id = ClientConfigs.CLIENT_ID; 16 | this.client_key = ClientConfigs.CLIENT_KEY; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /app/src/main/java/com/atahani/retrofit_sample/models/SignUpRequestModel.java: -------------------------------------------------------------------------------- 1 | package com.atahani.retrofit_sample.models; 2 | 3 | import com.atahani.retrofit_sample.utility.ClientConfigs; 4 | 5 | /** 6 | * Sign up Request model used in sign up Request 7 | */ 8 | public class SignUpRequestModel { 9 | public String client_id; 10 | public String client_key; 11 | public String name; 12 | public String email; 13 | public String password; 14 | 15 | public SignUpRequestModel() { 16 | this.client_id = ClientConfigs.CLIENT_ID; 17 | this.client_key = ClientConfigs.CLIENT_KEY; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /app/src/main/java/com/atahani/retrofit_sample/utility/ClientConfigs.java: -------------------------------------------------------------------------------- 1 | package com.atahani.retrofit_sample.utility; 2 | 3 | /** 4 | * contain client information such as BASE_URL || client information 5 | */ 6 | public class ClientConfigs { 7 | //TODO: should get network ip address like 192.168.1.2 and replace inside REST_API_BASE_URL 8 | public static final String REST_API_BASE_URL = "http://IP_ADDRESS:8081/api/v1/"; 9 | //TODO: create new Client with postman in http://localshot:/api/v1/client with body {"name":"android client app"} and set these values with client_id and client_key 10 | public static final String CLIENT_ID = ""; 11 | public static final String CLIENT_KEY = ""; 12 | } 13 | -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /Applications/android-sdk-macosx/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 | #} 18 | -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 14 | 15 |