Last active
August 3, 2018 07:45
-
-
Save sharmadhiraj/29aa3eaeb88e01a9e948e098908db1c7 to your computer and use it in GitHub Desktop.
Android Paging Library
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent"> | |
<ProgressBar | |
android:id="@+id/progress_bar" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:layout_centerInParent="true" /> | |
<TextView | |
android:id="@+id/txt_error" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:gravity="center" | |
android:text="ERROR !! Tap to retry." /> | |
<android.support.v7.widget.RecyclerView | |
android:id="@+id/recycler_view" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
tools:listitem="@layout/item_news" /> | |
</RelativeLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:card_view="http://schemas.android.com/apk/res-auto" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:id="@+id/card_view" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
card_view:cardBackgroundColor="#FFF" | |
card_view:cardCornerRadius="4dp" | |
card_view:cardElevation="2dp" | |
card_view:cardUseCompatPadding="true"> | |
<LinearLayout | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:orientation="vertical"> | |
<ImageView | |
android:id="@+id/img_news_banner" | |
android:layout_width="match_parent" | |
android:layout_height="200dp" | |
android:scaleType="fitXY" | |
tools:src="@mipmap/ic_launcher" /> | |
<TextView | |
android:id="@+id/txt_news_name" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:padding="12dp" | |
android:textColor="#333" | |
android:textSize="16sp" | |
tools:text="Sample news title" /> | |
</LinearLayout> | |
</android.support.v7.widget.CardView> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment