This is my layout and i want to move to home page with a single click.
[Added a Photo]eKv.png
My home button card view code is here
<androidx.cardview.widget.CardView
android:id="@+id/cv_home"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_marginLeft="10dp"
android:layout_marginTop="10dp"
app:cardCornerRadius="50dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#000000"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:id="@+id/iv_home"
android:layout_width="40dp"
android:layout_height="40dp"
android:src="@drawable/home" />
</LinearLayout>
</androidx.cardview.widget.CardView>
I can't understand what you mean by go to home page?
If u want to go HomeActivity/MainActivity, Just set a listener on the imageButton with an intent to start your home activity
Kotlin
Java