Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ apply plugin: 'com.android.application'

android {
compileSdkVersion 27

defaultConfig {
applicationId "com.an.paginglibrary.sample"
minSdkVersion 14
Expand Down Expand Up @@ -52,6 +53,7 @@ dependencies {
implementation 'com.squareup.retrofit2:converter-gson:2.4.0'
implementation 'com.squareup.retrofit2:adapter-rxjava2:2.4.0'
implementation 'com.squareup.okhttp3:logging-interceptor:3.9.1'
implementation 'de.hdodenhof:circleimageview:2.2.0'

implementation 'com.squareup.picasso:picasso:2.71828'
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
import android.view.ViewGroup;

import com.an.paginglibrary.sample.R;
import com.an.paginglibrary.sample.databinding.FeedItemBinding;
import com.an.paginglibrary.sample.databinding.NetworkItemBinding;
import com.an.paginglibrary.sample.databinding.ItemNetworkStateBinding;
import com.an.paginglibrary.sample.databinding.ItemFeedBinding;
import com.an.paginglibrary.sample.model.Article;
import com.an.paginglibrary.sample.utils.AppUtils;
import com.an.paginglibrary.sample.utils.NetworkState;
Expand All @@ -37,12 +37,12 @@ public FeedListAdapter(Context context) {
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
LayoutInflater layoutInflater = LayoutInflater.from(parent.getContext());
if(viewType == TYPE_PROGRESS) {
NetworkItemBinding headerBinding = NetworkItemBinding.inflate(layoutInflater, parent, false);
ItemNetworkStateBinding headerBinding = ItemNetworkStateBinding.inflate(layoutInflater, parent, false);
NetworkStateItemViewHolder viewHolder = new NetworkStateItemViewHolder(headerBinding);
return viewHolder;

} else {
FeedItemBinding itemBinding = FeedItemBinding.inflate(layoutInflater, parent, false);
ItemFeedBinding itemBinding = ItemFeedBinding.inflate(layoutInflater, parent, false);
ArticleItemViewHolder viewHolder = new ArticleItemViewHolder(itemBinding);
return viewHolder;
}
Expand Down Expand Up @@ -94,8 +94,8 @@ public void setNetworkState(NetworkState newNetworkState) {

public class ArticleItemViewHolder extends RecyclerView.ViewHolder {

private FeedItemBinding binding;
public ArticleItemViewHolder(FeedItemBinding binding) {
private ItemFeedBinding binding;
public ArticleItemViewHolder(ItemFeedBinding binding) {
super(binding.getRoot());
this.binding = binding;
}
Expand All @@ -119,8 +119,8 @@ public void bindTo(Article article) {

public class NetworkStateItemViewHolder extends RecyclerView.ViewHolder {

private NetworkItemBinding binding;
public NetworkStateItemViewHolder(NetworkItemBinding binding) {
private ItemNetworkStateBinding binding;
public NetworkStateItemViewHolder(ItemNetworkStateBinding binding) {
super(binding.getRoot());
this.binding = binding;
}
Expand Down
Binary file removed app/src/main/res/drawable-v24/ic_placeholder.png
Binary file not shown.
Binary file removed app/src/main/res/drawable-v24/ic_reaction.png
Binary file not shown.
7 changes: 3 additions & 4 deletions app/src/main/res/layout/item_feed.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">

<data class="FeedItemBinding" />

<LinearLayout
android:id="@+id/root_view"
android:layout_width="match_parent"
Expand All @@ -24,7 +22,7 @@
android:layout_width="@dimen/item_feed_profile_size"
android:layout_height="@dimen/item_feed_profile_size"
android:layout_alignParentLeft="true"
android:src="@drawable/ic_placeholder" />
android:src="@mipmap/ic_placeholder" />


<RelativeLayout
Expand Down Expand Up @@ -99,7 +97,8 @@
android:layout_height="@dimen/image_like_height"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:src="@drawable/ic_reaction" />
android:scaleType="fitXY"
android:src="@mipmap/ic_reaction" />


<com.an.customfontview.CustomTextView
Expand Down
2 changes: 0 additions & 2 deletions app/src/main/res/layout/item_network_state.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">

<data class="NetworkItemBinding" />

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
Expand Down
Binary file added app/src/main/res/mipmap-hdpi/ic_placeholder.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/mipmap-hdpi/ic_reaction.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/mipmap-mdpi/ic_placeholder.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/mipmap-mdpi/ic_reaction.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/mipmap-xhdpi/ic_placeholder.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/mipmap-xhdpi/ic_reaction.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/mipmap-xxhdpi/ic_placeholder.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/mipmap-xxhdpi/ic_reaction.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/mipmap-xxxhdpi/ic_reaction.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.0-alpha07'
classpath 'com.android.tools.build:gradle:3.2.0'


// NOTE: Do not place your application dependencies here; they belong
Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Fri Jun 29 08:07:19 IST 2018
#Tue Oct 02 13:31:55 ICT 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip