Untitled
plain_text
7 days ago
2.4 kB
2
Indexable
Never
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent"> <!-- BottomNavigationView ở trên --> <LinearLayout android:id="@+id/topLayout" android:layout_width="match_parent" android:layout_height="60dp" android:layout_alignParentTop="true" android:orientation="horizontal" android:gravity="end|center_vertical" android:weightSum="10" android:background="@color/xanhss"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="8" android:text="hello" /> <ImageButton android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:background="@color/xanhss" android:src="@drawable/ic_dark"/> <ImageButton android:id="@+id/img1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:background="@color/xanhss" android:src="@drawable/ic_dark"/> </LinearLayout> <!-- FragmentContainerView để hiển thị nội dung --> <androidx.fragment.app.FragmentContainerView android:id="@+id/fragmentContainerView" android:name="androidx.navigation.fragment.NavHostFragment" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_above="@+id/bottomBottomNavigationView" android:layout_below="@id/topLayout" app:defaultNavHost="true" /> <!-- BottomNavigationView ở dưới --> <com.google.android.material.bottomnavigation.BottomNavigationView android:id="@+id/bottomBottomNavigationView" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:background="?android:attr/windowBackground" app:menu="@menu/bottomnavigation_menu" /> </RelativeLayout>