Advertisement
Maruf_Hasan

activityxml_just toolbar and tabs_Mark3

Nov 28th, 2019
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.72 KB | None | 0 0
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <androidx.coordinatorlayout.widget.CoordinatorLayout
  3. xmlns:android="http://schemas.android.com/apk/res/android"
  4. xmlns:app="http://schemas.android.com/apk/res-auto"
  5. xmlns:tools="http://schemas.android.com/tools"
  6. android:layout_width="match_parent"
  7. android:layout_height="match_parent"
  8. tools:context=".MainActivity">
  9. <com.google.android.material.appbar.AppBarLayout
  10. android:layout_width="match_parent"
  11. android:layout_height="wrap_content"
  12. android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
  13. >
  14. <androidx.appcompat.widget.Toolbar
  15. android:id="@+id/myToolbar"
  16. android:layout_width="match_parent"
  17. android:layout_height="?attr/actionBarSize"
  18. android:background="@color/colorPrimary"
  19. app:layout_scrollFlags="scroll|enterAlways"
  20. app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
  21. />
  22. <com.google.android.material.tabs.TabLayout
  23. android:id="@+id/myTab"
  24. android:layout_width="match_parent"
  25. android:layout_height="wrap_content"
  26. app:tabIndicatorColor="@android:color/white"
  27. app:tabIndicatorHeight="2dp"
  28. app:tabMode="fixed"
  29. app:tabGravity="fill"
  30. />
  31. </com.google.android.material.appbar.AppBarLayout>
  32. <androidx.viewpager.widget.ViewPager
  33. android:id="@+id/myViewPager"
  34. android:layout_width="match_parent"
  35. android:layout_height="match_parent"
  36. app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior"
  37. />
  38. </androidx.coordinatorlayout.widget.CoordinatorLayout>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement