Awesome UI Design using CradView Android Studio
Awesome UI Design using CradView Android Studio
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"?> | |
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:background="@color/color_back" | |
tools:context=".MainActivity"> | |
<RelativeLayout | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content"> | |
<androidx.cardview.widget.CardView | |
android:id="@+id/txt_head" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:layout_margin="8dp" | |
app:cardCornerRadius="16dp"> | |
<LinearLayout | |
android:layout_width="match_parent" | |
android:layout_height="200dp" | |
android:background="@drawable/placeholder" | |
android:orientation="vertical"> | |
<TextView | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:padding="16dp" | |
android:text="@string/head" | |
android:textColor="#fff" /> | |
</LinearLayout> | |
</androidx.cardview.widget.CardView> | |
<androidx.cardview.widget.CardView | |
android:id="@+id/card_middle" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:layout_below="@+id/txt_head" | |
android:layout_margin="8dp" | |
app:cardCornerRadius="16dp"> | |
<LinearLayout | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:orientation="vertical"> | |
<TextView | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:padding="16dp" | |
android:text="Topics" | |
android:textColor="@color/colorPrimaryDark" | |
android:textSize="20sp" | |
android:textStyle="bold" /> | |
<View | |
android:layout_width="match_parent" | |
android:layout_height="2dp" | |
android:background="@color/colorPrimaryDark" /> | |
<HorizontalScrollView | |
android:layout_width="match_parent" | |
android:layout_height="match_parent"> | |
<LinearLayout | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:orientation="horizontal"> | |
<androidx.cardview.widget.CardView | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:layout_margin="8dp" | |
app:cardBackgroundColor="@color/colorAccent" | |
app:cardCornerRadius="16dp"> | |
<ImageView | |
android:layout_width="150dp" | |
android:layout_height="180dp" | |
android:scaleType="fitXY" | |
android:src="@drawable/placeholder" /> | |
</androidx.cardview.widget.CardView> | |
<androidx.cardview.widget.CardView | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:layout_margin="8dp" | |
app:cardBackgroundColor="@color/colorAccent" | |
app:cardCornerRadius="16dp"> | |
<ImageView | |
android:layout_width="150dp" | |
android:layout_height="180dp" | |
android:scaleType="fitXY" | |
android:src="@drawable/placeholder" /> | |
</androidx.cardview.widget.CardView> | |
<androidx.cardview.widget.CardView | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:layout_margin="8dp" | |
app:cardBackgroundColor="@color/colorAccent" | |
app:cardCornerRadius="16dp"> | |
<ImageView | |
android:layout_width="150dp" | |
android:layout_height="180dp" | |
android:scaleType="fitXY" | |
android:src="@drawable/placeholder" /> | |
</androidx.cardview.widget.CardView> | |
</LinearLayout> | |
</HorizontalScrollView> | |
</LinearLayout> | |
</androidx.cardview.widget.CardView> | |
<androidx.cardview.widget.CardView | |
android:id="@+id/card_below" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:layout_below="@+id/card_middle" | |
android:layout_margin="8dp" | |
app:cardCornerRadius="16dp"> | |
<LinearLayout | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:orientation="vertical"> | |
<TextView | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:padding="16dp" | |
android:text="Topics" | |
android:textColor="@color/colorPrimaryDark" | |
android:textSize="20sp" | |
android:textStyle="bold" /> | |
<View | |
android:layout_width="match_parent" | |
android:layout_height="2dp" | |
android:background="@color/colorPrimaryDark" /> | |
<LinearLayout | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:orientation="vertical"> | |
<androidx.cardview.widget.CardView | |
android:id="@+id/txt_1" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:layout_margin="8dp" | |
app:cardCornerRadius="16dp"> | |
<LinearLayout | |
android:layout_width="match_parent" | |
android:layout_height="100dp" | |
android:background="@drawable/placeholder" | |
android:orientation="vertical"> | |
<TextView | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:padding="16dp" | |
android:text="one" | |
android:textColor="#fff" /> | |
</LinearLayout> | |
</androidx.cardview.widget.CardView> | |
<androidx.cardview.widget.CardView | |
android:id="@+id/txt_2" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:layout_margin="8dp" | |
app:cardCornerRadius="16dp"> | |
<LinearLayout | |
android:layout_width="match_parent" | |
android:layout_height="100dp" | |
android:background="@drawable/placeholder" | |
android:orientation="vertical"> | |
<TextView | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:padding="16dp" | |
android:text="two" | |
android:textColor="#fff" /> | |
</LinearLayout> | |
</androidx.cardview.widget.CardView> | |
<androidx.cardview.widget.CardView | |
android:id="@+id/txt_3" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:layout_margin="8dp" | |
app:cardCornerRadius="16dp"> | |
<LinearLayout | |
android:layout_width="match_parent" | |
android:layout_height="100dp" | |
android:background="@drawable/placeholder" | |
android:orientation="vertical"> | |
<TextView | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:padding="16dp" | |
android:text="three" | |
android:textColor="#fff" /> | |
</LinearLayout> | |
</androidx.cardview.widget.CardView> | |
<androidx.cardview.widget.CardView | |
android:id="@+id/txt_4" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:layout_margin="8dp" | |
app:cardCornerRadius="16dp"> | |
<LinearLayout | |
android:layout_width="match_parent" | |
android:layout_height="100dp" | |
android:background="@drawable/placeholder" | |
android:orientation="vertical"> | |
<TextView | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:padding="16dp" | |
android:text="@string/head" | |
android:textColor="#fff" /> | |
</LinearLayout> | |
</androidx.cardview.widget.CardView> | |
<androidx.cardview.widget.CardView | |
android:id="@+id/txt_5" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:layout_margin="8dp" | |
app:cardCornerRadius="16dp"> | |
<LinearLayout | |
android:layout_width="match_parent" | |
android:layout_height="100dp" | |
android:background="@drawable/placeholder" | |
android:orientation="vertical"> | |
<TextView | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:padding="16dp" | |
android:text="gouuttr" | |
android:textColor="#fff" /> | |
</LinearLayout> | |
</androidx.cardview.widget.CardView> | |
</LinearLayout> | |
</LinearLayout> | |
</androidx.cardview.widget.CardView> | |
</RelativeLayout> | |
</androidx.core.widget.NestedScrollView> |
Comments :
Post a Comment