Skip to content

Commit

Permalink
Merge pull request #3 from Divyang067/staging
Browse files Browse the repository at this point in the history
Staging
  • Loading branch information
Divyang067 authored Jan 31, 2023
2 parents 7fd9317 + d4e9b11 commit 1e4ca17
Show file tree
Hide file tree
Showing 42 changed files with 467 additions and 424 deletions.
79 changes: 71 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,77 @@
# Retrofit-And-Filter-Data
Android project includes following
1. Web api calling through retrofit library
2. Image loading using glide library
3. Filter data using guava library

## User List Screen
<img
src="https://user-images.githubusercontent.com/15336519/215684423-02e9e1d3-1763-448d-a15e-c837af16957b.png"
align="left"
width="170" hspace="10" vspace="10">

![device-2019-08-29-133541](https://user-images.githubusercontent.com/15336519/63922790-fc4cad00-ca62-11e9-8d97-3bcc1fc3c68d.png)
Android project includes with following topics

- Web api calling through retrofit library
- Image loading using glide library
- Filter data using guava library
- Action bar with menu option
<br/>

## Filter User Data

![device-2019-08-29-133603](https://user-images.githubusercontent.com/15336519/63922825-0d95b980-ca63-11e9-8f14-f8b49fcd320c.png)
**Retrofit And Filter Data** application is available on the Google Play Store

<p align="left">
<a href="https://play.google.com/store/apps/details?id=com.divyang067.retrofitandfilterdata">
<img alt="Get it on Google Play"
height="110" hspace="30"
src="https://play.google.com/intl/en_us/badges/static/images/badges/en_badge_web_generic.png" />
</a>
<a href="https://play.google.com/store/apps/details?id=com.divyang067.retrofitandfilterdata">
<img alt="Get it on Google Play By Scan QR Code" src="https://user-images.githubusercontent.com/15336519/215570464-b40736f7-c3ab-4f9a-b259-c82eeebdb5ce.png" height="110" hspace="30" />
</a>
</p>

## Screenshots

<table align="center">
<thead>
<tr>
<th>User List Screen</th>
<th>Filter User Data</th>
<th>Pull To Refresh Data</th>
<th>About Screen</th>
</tr>
</thead>
<tbody>
<tr>
<td align="center"><img src="https://user-images.githubusercontent.com/15336519/215837515-a90a2907-d38c-4063-8752-ccf1f03c1969.png" width="170" /></td>
<td align="center"><img src="https://user-images.githubusercontent.com/15336519/215837867-98853c19-3159-4b41-88ab-6229f4aa221b.png" width="170" /> </td>
<td align="center"><img src="https://user-images.githubusercontent.com/15336519/215838076-bc783807-a963-4e8a-bad7-868d18149ef7.png" width="170" /></td>
<td align="center"><img src="https://user-images.githubusercontent.com/15336519/215838172-584e50a7-1e1e-44ad-a63d-d4e14abe6043.png" width="170" /></td>
</tr>
</tbody>
</table>

## Github Link

Android project source code available on github. Click link to redirect page of source code.<br/>
link : https://github.com/Divyang067/Retrofit-And-Filter-Data

Also you can scan QR code to redirect source code link<br/>
<img src="https://user-images.githubusercontent.com/15336519/215565138-6f160acd-9159-49a1-870a-2d5f10d15e14.png" width="200" height="200"/>

## Download App

You can direct scan below QR code to download application from google play store or click on google
play store icon image.


<p align="center">
<a href="https://play.google.com/store/apps/details?id=com.divyang067.retrofitandfilterdata">
<img src="https://user-images.githubusercontent.com/15336519/215570464-b40736f7-c3ab-4f9a-b259-c82eeebdb5ce.png" width="200" height="200" align="left" hspace="10" vspace="10"/>
</a>
<a href="https://play.google.com/store/apps/details?id=com.divyang067.retrofitandfilterdata">
<img alt="Get it on Google Play"
height="200"
src="https://play.google.com/intl/en_us/badges/static/images/badges/en_badge_web_generic.png" />
</a>
</p>
<br/>

**Thanks**
46 changes: 27 additions & 19 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 31
compileSdkVersion 33
defaultConfig {
applicationId "com.divyang067.retrofitandfilterdata"
minSdkVersion 15
targetSdkVersion 31
versionCode 1
versionName "1.0"
minSdkVersion 19
targetSdkVersion 33
flavorDimensions "default"
multiDexEnabled true
}
buildTypes {
release {
Expand All @@ -22,49 +20,59 @@ android {

productFlavors {
Develop {
applicationId "com.divyang067.retrofitandfilterdata"
versionCode 1
versionName "1.0"
applicationId "com.divyang067.retrofitandfilterdata.dev"
versionCode 2
versionName "2.0"

buildConfigField "String", "SERVER_URL", '"http://demo7756364.mockable.io"'
}
Staging {
applicationId "com.divyang067.retrofitandfilterdata1"
versionCode 1
versionName "1.0"
applicationId "com.divyang067.retrofitandfilterdata.beta"
versionCode 2
versionName "2.0"

buildConfigField "String", "SERVER_URL", '"http://demo7756364.mockable.io"'
}
Production {
applicationId "com.divyang067.retrofitandfilterdata"
versionCode 2
versionName "2.0"

buildConfigField "String", "SERVER_URL", '"http://demo7756364.mockable.io"'
}
}
namespace 'com.divyang067.retrofitandfilterdata'

}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])

//appcompat ui component
implementation 'androidx.appcompat:appcompat:1.4.1'
implementation 'androidx.appcompat:appcompat:1.6.0'
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'


//recycleview for display data
//recyclerview for display data
implementation 'androidx.recyclerview:recyclerview:1.2.1'

//material design for access design component
implementation 'com.google.android.material:material:1.5.0'
implementation 'com.google.android.material:material:1.8.0'

//gson for data parsing
implementation 'com.google.code.gson:gson:2.8.7'
implementation 'com.google.code.gson:gson:2.10.1'

//retrofit for web api calling
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'

//glide for image loading
implementation 'com.github.bumptech.glide:glide:4.12.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.12.0'
implementation 'com.github.bumptech.glide:glide:4.14.2'
annotationProcessor 'com.github.bumptech.glide:compiler:4.14.2'

//guava for filter pojo
implementation 'com.google.guava:guava:31.1-android'

//multidex
implementation 'com.android.support:multidex:1.0.3'

}
11 changes: 7 additions & 4 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.divyang067.retrofitandfilterdata">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<!-- internet -->
<uses-permission android:name="android.permission.INTERNET" />
Expand All @@ -18,14 +17,18 @@
android:usesCleartextTraffic="true">
<activity
android:name=".ui.activity.MainActivity"
android:windowSoftInputMode="stateAlwaysHidden"
android:exported="true">
android:exported="true"
android:windowSoftInputMode="stateAlwaysHidden">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>

<activity
android:name=".ui.activity.AboutActivity"
android:exported="false" />
</application>

</manifest>
Binary file added app/src/main/ic_launcher-playstore.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 7 additions & 6 deletions app/src/main/java/com/divyang067/retrofitandfilterdata/App.java
Original file line number Diff line number Diff line change
@@ -1,32 +1,33 @@
package com.divyang067.retrofitandfilterdata;

import android.app.Application;
import android.content.Context;

import androidx.multidex.MultiDexApplication;

/**
* Created by divyang067 on 2019/08/29.
*
* @author Divyang Patel
* <p>
* application class
*/
public class App extends Application {
public class App extends MultiDexApplication {

//context
private static Context context;
private static App appInstance;

@Override
public void onCreate() {
super.onCreate();
context = this;
appInstance = this;
}

/**
* get application context
*
* @return
* @return application context
*/
public static Context getAppContext() {
return context;
return appInstance.getApplicationContext();
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

package com.divyang067.retrofitandfilterdata.model;

import com.google.gson.annotations.Expose;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

package com.divyang067.retrofitandfilterdata.model;

import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

package com.divyang067.retrofitandfilterdata.model;

import android.text.TextUtils;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class RetroClient {
/**
* make one static instance to access any time from any class
*
* @return
* @return retrofit client instance
*/
public static RetroClient getInstance() {
if (retroClient == null) {
Expand All @@ -33,7 +33,7 @@ public static RetroClient getInstance() {
/**
* Get Retrofit Instance
*
* @return
* @return get retrofit instance
*/
private Retrofit getRetrofitInstance() {
return new Retrofit.Builder()
Expand All @@ -45,7 +45,7 @@ private Retrofit getRetrofitInstance() {
/**
* Get API Service
*
* @return
* @return get api service
*/
public ApiService getApiService() {
return getRetrofitInstance().create(ApiService.class);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
package com.divyang067.retrofitandfilterdata.ui.activity;

import android.os.Bundle;

import androidx.databinding.DataBindingUtil;

import com.divyang067.retrofitandfilterdata.R;
import com.divyang067.retrofitandfilterdata.databinding.ActivityAboutBinding;

/**
* Created by divyang067 on 2019/08/29.
*
* @author Divyang Patel
* <p>
* About Activity Class for about screen
*/
public class AboutActivity extends BaseActivity {

//binding
private ActivityAboutBinding binding;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
binding = DataBindingUtil.setContentView(this, R.layout.activity_about);

initListener();
setData();
}

/**
* initialization listener
*/
private void initListener() {

}

/**
* set data
*/
private void setData() {
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().setDisplayShowHomeEnabled(true);
}

@Override
public boolean onSupportNavigateUp() {
finish();
return true;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public void hideProgress() {
/**
* show error
*
* @param message
* @param message error message
*/
public void showError(String message) {
DialogUtils.getInstance().createGenericErrorDialog(this, message).show();
Expand Down
Loading

0 comments on commit 1e4ca17

Please sign in to comment.