52 lines
2.0 KiB
XML
52 lines
2.0 KiB
XML
<androidx.constraintlayout.widget.ConstraintLayout
|
||
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"
|
||
android:background="@drawable/beij13"
|
||
android:id="@+id/main"
|
||
tools:context="com.wall.exquisite.wallpaper.FirstMainActivity">
|
||
|
||
<!-- 内层Tab(4D/LIVE/4K)- 顶部 -->
|
||
<com.google.android.material.tabs.TabLayout
|
||
android:id="@+id/innerTabLayout"
|
||
android:layout_width="match_parent"
|
||
android:layout_height="1dp"
|
||
android:visibility="gone"
|
||
app:tabGravity="fill"
|
||
app:tabMode="fixed"
|
||
app:layout_constraintTop_toTopOf="parent"
|
||
app:layout_constraintStart_toStartOf="parent"
|
||
app:layout_constraintEnd_toEndOf="parent" />
|
||
|
||
<!-- 外层ViewPager2 - 中间 -->
|
||
<androidx.viewpager2.widget.ViewPager2
|
||
android:id="@+id/outerViewPager"
|
||
android:layout_width="match_parent"
|
||
android:layout_height="0dp"
|
||
app:layout_constraintTop_toBottomOf="@+id/innerTabLayout"
|
||
app:layout_constraintBottom_toTopOf="@+id/outerTabLayout"
|
||
app:layout_constraintStart_toStartOf="parent"
|
||
app:layout_constraintEnd_toEndOf="parent" />
|
||
|
||
|
||
<!-- 外层Tab(Home/Setting)- 底部 -->
|
||
<com.google.android.material.tabs.TabLayout
|
||
android:id="@+id/outerTabLayout"
|
||
android:layout_width="match_parent"
|
||
android:layout_height="65dp"
|
||
android:background="@android:color/transparent"
|
||
app:tabGravity="fill"
|
||
app:tabMode="fixed"
|
||
app:tabIndicatorHeight="0dp"
|
||
app:tabPaddingStart="0dp"
|
||
app:tabPaddingEnd="0dp"
|
||
app:tabMinWidth="0dp"
|
||
app:iconSize="28dp"
|
||
app:tabInlineLabel="false"
|
||
app:layout_constraintBottom_toBottomOf="parent"
|
||
app:layout_constraintStart_toStartOf="parent"
|
||
app:layout_constraintEnd_toEndOf="parent" />
|
||
</androidx.constraintlayout.widget.ConstraintLayout>
|