Currently, I have this code for this page.
But my preview should that my button is at the center of the second half layout, but in my emulator, it shows it still at the top of the layout.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout
android:layout_weight="1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/background_profile">
<de.hdodenhof.circleimageview.CircleImageView
android:id="@+id/profile_img"
android:layout_width="100dp"
android:layout_height="100dp"
android:src="@drawable/default_person_icon"
app:civ_border_color="@android:color/black"
app:civ_border_width="2dp"
android:layout_centerInParent="true"
android:layout_marginTop="100dp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="User Email"
android:textSize="28sp"
android:textColor="@android:color/white"
android:layout_below="@+id/profile_img"
android:layout_centerHorizontal="true"
android:layout_marginTop="10dp"/>
</RelativeLayout>
<LinearLayout
android:layout_weight="1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:gravity="center">
<Button
android:id="@+id/btn_change_password"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Change Password"
app:cornerRadius="50dp"
android:layout_marginStart="40dp"
android:layout_marginEnd="40dp"/>
<Button
android:id="@+id/btn_sign_out"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Sign Out"
app:cornerRadius="50dp"
android:layout_marginStart="40dp"
android:layout_marginEnd="40dp"/>
</LinearLayout>
</LinearLayout>
Here the image for preview
https://i.stack.imgur.com/QLaot.jpg
and here is the image for the emulator