Created
July 26, 2020 13:42
-
-
Save tfkproject/361d2962ec9906b638e058262f7ba41b to your computer and use it in GitHub Desktop.
Fragment dalam fragment (tab dalam navbottom)
This file contains hidden or 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
<!-- ini layout fragment yg berada pada salah satu navbottom --> | |
<?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" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
tools:context=".ui.home.HomeFragment"> | |
<LinearLayout | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:paddingBottom="60dp" | |
android:orientation="vertical"> | |
<androidx.cardview.widget.CardView | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
app:cardUseCompatPadding="true" | |
app:contentPadding="8dp"> | |
<LinearLayout | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:orientation="vertical"> | |
<!-- ini tab layoutnya, sisanya untuk ngeset layout tab ya seperti biasa --> | |
<com.google.android.material.tabs.TabLayout | |
android:id="@+id/tabs" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
app:tabMode="fixed" /> | |
<androidx.viewpager2.widget.ViewPager2 | |
android:id="@+id/view_pager" | |
android:layout_width="match_parent" | |
android:layout_marginTop="8dp" | |
android:layout_height="0dp" | |
android:layout_weight="1" /> | |
</LinearLayout> | |
</androidx.cardview.widget.CardView> | |
</LinearLayout> | |
</RelativeLayout> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment