Newer
Older
music / app / src / main / res / layout / activity_main.xml
  1. <?xml version="1.0" encoding="utf-8"?><!--
  2. ~ Copyright (C) 2022 Lukas Eisenhauer
  3. ~
  4. ~ This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or(at your option) any later version.
  5. ~
  6. ~ This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  7. ~
  8. ~ You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
  9. -->
  10.  
  11. <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
  12. xmlns:app="http://schemas.android.com/apk/res-auto"
  13. xmlns:tools="http://schemas.android.com/tools"
  14. android:layout_width="match_parent"
  15. android:layout_height="match_parent"
  16. tools:context=".MainActivity">
  17.  
  18. <com.google.android.material.tabs.TabLayout
  19. android:id="@+id/tabLayout"
  20. android:layout_width="0dp"
  21. android:layout_height="wrap_content"
  22. app:layout_constraintEnd_toEndOf="parent"
  23. app:layout_constraintStart_toStartOf="parent"
  24. app:layout_constraintTop_toTopOf="parent">
  25.  
  26. <com.google.android.material.tabs.TabItem
  27. android:layout_width="wrap_content"
  28. android:layout_height="wrap_content"
  29. android:text="@string/play_tab" />
  30.  
  31. <com.google.android.material.tabs.TabItem
  32. android:layout_width="wrap_content"
  33. android:layout_height="wrap_content"
  34. android:text="@string/song_tab" />
  35.  
  36. <com.google.android.material.tabs.TabItem
  37. android:layout_width="wrap_content"
  38. android:layout_height="wrap_content"
  39. android:text="@string/instrument_tab" />
  40.  
  41. <com.google.android.material.tabs.TabItem
  42. android:layout_width="wrap_content"
  43. android:layout_height="wrap_content"
  44. android:text="@string/credits_tab" />
  45. </com.google.android.material.tabs.TabLayout>
  46.  
  47. <androidx.viewpager2.widget.ViewPager2
  48. android:id="@+id/tabPager"
  49. android:layout_width="0dp"
  50. android:layout_height="0dp"
  51. app:layout_constraintBottom_toBottomOf="parent"
  52. app:layout_constraintEnd_toEndOf="parent"
  53. app:layout_constraintStart_toStartOf="parent"
  54. app:layout_constraintTop_toBottomOf="@+id/tabLayout" />
  55.  
  56. </androidx.constraintlayout.widget.ConstraintLayout>