Showing posts with label cardview in android. Show all posts
Showing posts with label cardview in android. Show all posts

Wednesday, October 13, 2021

HomePage Design in School Project CardView Design

 <?xml version="1.0" encoding="utf-8"?>

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
tools:context=".MainActivity"
android:padding="10dp"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ScrollView

android:layout_width="match_parent"

android:layout_height="wrap_content">



<LinearLayout

android:layout_width="match_parent"

android:layout_height="wrap_content"

android:orientation="vertical">
<LinearLayout
android:gravity="center"
android:layout_height="match_parent"
android:layout_width="match_parent">
<androidx.cardview.widget.CardView
android:layout_marginRight="10dp"
android:layout_marginLeft="10dp"
android:layout_marginBottom="10dp"
android:layout_marginTop="10dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:elevation="8dp"
app:cardCornerRadius="8dp"
android:padding="4dp">
<LinearLayout
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<!--Image view for displaying our image-->
<ImageView
android:fitsSystemWindows="true"

android:layout_width="100dp"
android:layout_height="100dp"
android:layout_margin="4dp"
android:background="@drawable/homework"
android:padding="3dp" />

<!--Text view for displaying our text -->
<TextView
android:textStyle="bold"
android:textSize="17sp"

android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="2dp"
android:padding="3dp"
android:text="HomeWork"
android:layout_centerInParent="true"
android:textColor="@color/black" />
</LinearLayout>
</androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView
android:layout_marginRight="10dp"
android:layout_marginLeft="10dp"
android:layout_marginBottom="10dp"
android:layout_marginTop="10dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:elevation="8dp"
app:cardCornerRadius="8dp"
android:padding="4dp">
<LinearLayout
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<!--Image view for displaying our image-->
<ImageView
android:fitsSystemWindows="true"

android:layout_width="100dp"
android:layout_height="100dp"
android:layout_margin="4dp"
android:background="@drawable/homework"
android:padding="3dp" />

<!--Text view for displaying our text -->
<TextView
android:textStyle="bold"
android:textSize="17sp"

android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="2dp"
android:padding="3dp"
android:text="HomeWork"
android:layout_centerInParent="true"
android:textColor="@color/black" />
</LinearLayout>
</androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView
android:layout_marginRight="10dp"
android:layout_marginLeft="10dp"
android:layout_marginBottom="10dp"
android:layout_marginTop="10dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:elevation="8dp"
app:cardCornerRadius="8dp"
android:padding="4dp">
<LinearLayout
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<!--Image view for displaying our image-->
<ImageView
android:fitsSystemWindows="true"

android:layout_width="100dp"
android:layout_height="100dp"
android:layout_margin="4dp"
android:background="@drawable/homework"
android:padding="3dp" />

<!--Text view for displaying our text -->
<TextView
android:textStyle="bold"
android:textSize="17sp"

android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="2dp"
android:padding="3dp"
android:text="HomeWork"
android:layout_centerInParent="true"
android:textColor="@color/black" />
</LinearLayout>
</androidx.cardview.widget.CardView>

</LinearLayout>
<LinearLayout
android:gravity="center"
android:layout_height="match_parent"
android:layout_width="match_parent">
<androidx.cardview.widget.CardView
android:layout_marginRight="10dp"
android:layout_marginLeft="10dp"
android:layout_marginBottom="10dp"
android:layout_marginTop="10dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:elevation="8dp"
app:cardCornerRadius="8dp"
android:padding="4dp">
<LinearLayout
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<!--Image view for displaying our image-->
<ImageView
android:fitsSystemWindows="true"

android:layout_width="100dp"
android:layout_height="100dp"
android:layout_margin="4dp"
android:background="@drawable/homework"
android:padding="3dp" />

<!--Text view for displaying our text -->
<TextView
android:textStyle="bold"
android:textSize="17sp"

android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="2dp"
android:padding="3dp"
android:text="HomeWork"
android:layout_centerInParent="true"
android:textColor="@color/black" />
</LinearLayout>
</androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView
android:layout_marginRight="10dp"
android:layout_marginLeft="10dp"
android:layout_marginBottom="10dp"
android:layout_marginTop="10dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:elevation="8dp"
app:cardCornerRadius="8dp"
android:padding="4dp">
<LinearLayout
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<!--Image view for displaying our image-->
<ImageView
android:fitsSystemWindows="true"

android:layout_width="100dp"
android:layout_height="100dp"
android:layout_margin="4dp"
android:background="@drawable/homework"
android:padding="3dp" />

<!--Text view for displaying our text -->
<TextView
android:textStyle="bold"
android:textSize="17sp"

android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="2dp"
android:padding="3dp"
android:text="HomeWork"
android:layout_centerInParent="true"
android:textColor="@color/black" />
</LinearLayout>
</androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView
android:layout_marginRight="10dp"
android:layout_marginLeft="10dp"
android:layout_marginBottom="10dp"
android:layout_marginTop="10dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:elevation="8dp"
app:cardCornerRadius="8dp"
android:padding="4dp">
<LinearLayout
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<!--Image view for displaying our image-->
<ImageView
android:fitsSystemWindows="true"

android:layout_width="100dp"
android:layout_height="100dp"
android:layout_margin="4dp"
android:background="@drawable/homework"
android:padding="3dp" />

<!--Text view for displaying our text -->
<TextView
android:textStyle="bold"
android:textSize="17sp"

android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="2dp"
android:padding="3dp"
android:text="HomeWork"
android:layout_centerInParent="true"
android:textColor="@color/black" />
</LinearLayout>
</androidx.cardview.widget.CardView>

</LinearLayout>
<LinearLayout
android:gravity="center"
android:layout_height="match_parent"
android:layout_width="match_parent">
<androidx.cardview.widget.CardView
android:layout_marginRight="10dp"
android:layout_marginLeft="10dp"
android:layout_marginBottom="10dp"
android:layout_marginTop="10dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:elevation="8dp"
app:cardCornerRadius="8dp"
android:padding="4dp">
<LinearLayout
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<!--Image view for displaying our image-->
<ImageView
android:fitsSystemWindows="true"

android:layout_width="100dp"
android:layout_height="100dp"
android:layout_margin="4dp"
android:background="@drawable/homework"
android:padding="3dp" />

<!--Text view for displaying our text -->
<TextView
android:textStyle="bold"
android:textSize="17sp"

android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="2dp"
android:padding="3dp"
android:text="HomeWork"
android:layout_centerInParent="true"
android:textColor="@color/black" />
</LinearLayout>
</androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView
android:layout_marginRight="10dp"
android:layout_marginLeft="10dp"
android:layout_marginBottom="10dp"
android:layout_marginTop="10dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:elevation="8dp"
app:cardCornerRadius="8dp"
android:padding="4dp">
<LinearLayout
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<!--Image view for displaying our image-->
<ImageView
android:fitsSystemWindows="true"

android:layout_width="100dp"
android:layout_height="100dp"
android:layout_margin="4dp"
android:background="@drawable/homework"
android:padding="3dp" />

<!--Text view for displaying our text -->
<TextView
android:textStyle="bold"
android:textSize="17sp"

android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="2dp"
android:padding="3dp"
android:text="HomeWork"
android:layout_centerInParent="true"
android:textColor="@color/black" />
</LinearLayout>
</androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView
android:layout_marginRight="10dp"
android:layout_marginLeft="10dp"
android:layout_marginBottom="10dp"
android:layout_marginTop="10dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:elevation="8dp"
app:cardCornerRadius="8dp"
android:padding="4dp">
<LinearLayout
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<!--Image view for displaying our image-->
<ImageView
android:fitsSystemWindows="true"

android:layout_width="100dp"
android:layout_height="100dp"
android:layout_margin="4dp"
android:background="@drawable/homework"
android:padding="3dp" />

<!--Text view for displaying our text -->
<TextView
android:textStyle="bold"
android:textSize="17sp"

android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="2dp"
android:padding="3dp"
android:text="HomeWork"
android:layout_centerInParent="true"
android:textColor="@color/black" />
</LinearLayout>
</androidx.cardview.widget.CardView>

</LinearLayout>
<LinearLayout
android:gravity="center"
android:layout_height="match_parent"
android:layout_width="match_parent">
<androidx.cardview.widget.CardView
android:layout_marginRight="10dp"
android:layout_marginLeft="10dp"
android:layout_marginBottom="10dp"
android:layout_marginTop="10dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:elevation="8dp"
app:cardCornerRadius="8dp"
android:padding="4dp">
<LinearLayout
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<!--Image view for displaying our image-->
<ImageView
android:fitsSystemWindows="true"

android:layout_width="100dp"
android:layout_height="100dp"
android:layout_margin="4dp"
android:background="@drawable/homework"
android:padding="3dp" />

<!--Text view for displaying our text -->
<TextView
android:textStyle="bold"
android:textSize="17sp"

android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="2dp"
android:padding="3dp"
android:text="HomeWork"
android:layout_centerInParent="true"
android:textColor="@color/black" />
</LinearLayout>
</androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView
android:layout_marginRight="10dp"
android:layout_marginLeft="10dp"
android:layout_marginBottom="10dp"
android:layout_marginTop="10dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:elevation="8dp"
app:cardCornerRadius="8dp"
android:padding="4dp">
<LinearLayout
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<!--Image view for displaying our image-->
<ImageView
android:fitsSystemWindows="true"

android:layout_width="100dp"
android:layout_height="100dp"
android:layout_margin="4dp"
android:background="@drawable/homework"
android:padding="3dp" />

<!--Text view for displaying our text -->
<TextView
android:textStyle="bold"
android:textSize="17sp"

android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="2dp"
android:padding="3dp"
android:text="HomeWork"
android:layout_centerInParent="true"
android:textColor="@color/black" />
</LinearLayout>
</androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView
android:layout_marginRight="10dp"
android:layout_marginLeft="10dp"
android:layout_marginBottom="10dp"
android:layout_marginTop="10dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:elevation="8dp"
app:cardCornerRadius="8dp"
android:padding="4dp">
<LinearLayout
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<!--Image view for displaying our image-->
<ImageView
android:fitsSystemWindows="true"

android:layout_width="100dp"
android:layout_height="100dp"
android:layout_margin="4dp"
android:background="@drawable/homework"
android:padding="3dp" />

<!--Text view for displaying our text -->
<TextView
android:textStyle="bold"
android:textSize="17sp"

android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="2dp"
android:padding="3dp"
android:text="HomeWork"
android:layout_centerInParent="true"
android:textColor="@color/black" />
</LinearLayout>
</androidx.cardview.widget.CardView>

</LinearLayout>
<LinearLayout
android:gravity="center"
android:layout_height="match_parent"
android:layout_width="match_parent">
<androidx.cardview.widget.CardView
android:layout_marginRight="10dp"
android:layout_marginLeft="10dp"
android:layout_marginBottom="10dp"
android:layout_marginTop="10dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:elevation="8dp"
app:cardCornerRadius="8dp"
android:padding="4dp">
<LinearLayout
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<!--Image view for displaying our image-->
<ImageView
android:fitsSystemWindows="true"

android:layout_width="100dp"
android:layout_height="100dp"
android:layout_margin="4dp"
android:background="@drawable/homework"
android:padding="3dp" />

<!--Text view for displaying our text -->
<TextView
android:textStyle="bold"
android:textSize="17sp"

android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="2dp"
android:padding="3dp"
android:text="HomeWork"
android:layout_centerInParent="true"
android:textColor="@color/black" />
</LinearLayout>
</androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView
android:layout_marginRight="10dp"
android:layout_marginLeft="10dp"
android:layout_marginBottom="10dp"
android:layout_marginTop="10dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:elevation="8dp"
app:cardCornerRadius="8dp"
android:padding="4dp">
<LinearLayout
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<!--Image view for displaying our image-->
<ImageView
android:fitsSystemWindows="true"

android:layout_width="100dp"
android:layout_height="100dp"
android:layout_margin="4dp"
android:background="@drawable/homework"
android:padding="3dp" />

<!--Text view for displaying our text -->
<TextView
android:textStyle="bold"
android:textSize="17sp"

android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="2dp"
android:padding="3dp"
android:text="HomeWork"
android:layout_centerInParent="true"
android:textColor="@color/black" />
</LinearLayout>
</androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView
android:layout_marginRight="10dp"
android:layout_marginLeft="10dp"
android:layout_marginBottom="10dp"
android:layout_marginTop="10dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:elevation="8dp"
app:cardCornerRadius="8dp"
android:padding="4dp">
<LinearLayout
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<!--Image view for displaying our image-->
<ImageView
android:fitsSystemWindows="true"

android:layout_width="100dp"
android:layout_height="100dp"
android:layout_margin="4dp"
android:background="@drawable/homework"
android:padding="3dp" />

<!--Text view for displaying our text -->
<TextView
android:textStyle="bold"
android:textSize="17sp"

android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="2dp"
android:padding="3dp"
android:text="HomeWork"
android:layout_centerInParent="true"
android:textColor="@color/black" />
</LinearLayout>
</androidx.cardview.widget.CardView>

</LinearLayout>
<LinearLayout
android:gravity="center"
android:layout_height="match_parent"
android:layout_width="match_parent">
<androidx.cardview.widget.CardView
android:layout_marginRight="10dp"
android:layout_marginLeft="10dp"
android:layout_marginBottom="10dp"
android:layout_marginTop="10dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:elevation="8dp"
app:cardCornerRadius="8dp"
android:padding="4dp">
<LinearLayout
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<!--Image view for displaying our image-->
<ImageView
android:fitsSystemWindows="true"

android:layout_width="100dp"
android:layout_height="100dp"
android:layout_margin="4dp"
android:background="@drawable/homework"
android:padding="3dp" />

<!--Text view for displaying our text -->
<TextView
android:textStyle="bold"
android:textSize="17sp"

android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="2dp"
android:padding="3dp"
android:text="HomeWork"
android:layout_centerInParent="true"
android:textColor="@color/black" />
</LinearLayout>
</androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView
android:layout_marginRight="10dp"
android:layout_marginLeft="10dp"
android:layout_marginBottom="10dp"
android:layout_marginTop="10dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:elevation="8dp"
app:cardCornerRadius="8dp"
android:padding="4dp">
<LinearLayout
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<!--Image view for displaying our image-->
<ImageView
android:fitsSystemWindows="true"

android:layout_width="100dp"
android:layout_height="100dp"
android:layout_margin="4dp"
android:background="@drawable/homework"
android:padding="3dp" />

<!--Text view for displaying our text -->
<TextView
android:textStyle="bold"
android:textSize="17sp"

android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="2dp"
android:padding="3dp"
android:text="HomeWork"
android:layout_centerInParent="true"
android:textColor="@color/black" />
</LinearLayout>
</androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView
android:layout_marginRight="10dp"
android:layout_marginLeft="10dp"
android:layout_marginBottom="10dp"
android:layout_marginTop="10dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:elevation="8dp"
app:cardCornerRadius="8dp"
android:padding="4dp">
<LinearLayout
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<!--Image view for displaying our image-->
<ImageView
android:fitsSystemWindows="true"

android:layout_width="100dp"
android:layout_height="100dp"
android:layout_margin="4dp"
android:background="@drawable/homework"
android:padding="3dp" />

<!--Text view for displaying our text -->
<TextView
android:textStyle="bold"
android:textSize="17sp"

android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="2dp"
android:padding="3dp"
android:text="HomeWork"
android:layout_centerInParent="true"
android:textColor="@color/black" />
</LinearLayout>
</androidx.cardview.widget.CardView>

</LinearLayout>




</LinearLayout>
</ScrollView>

</LinearLayout>

Activity Navigation One Activity to another Activity

Main Activity :-   <? xml version ="1.0" encoding ="utf-8" ?> < RelativeLayout xmlns: android ="http://sch...