Android ViewPager2 + TabLayout + BottomNavigationView 实际案例
本篇主要介绍一下 ViewPager2 + TabLayout + BottomNavigationView 的结合操作

概述
相信大家都看过今日头条的的样式 如下: 顶部有这种tab 并且是可以滑动的, 这就是本篇所介绍的 ViewPager2 + TabLayout 的组合 下面来看看如何实现把

实现思路
1.Activity 布局文件中引入BottomNavigationView 和 FragmentContainerView控件
2.编写 TabLayoutHomeFragment 布局文件
3.编写 Fragment 用于集成ViewPager2 和TabLayout
4. 编写 RecFragment 用于继承RecycleView 展示
5.实现 ViewPager2TabLayoutActivity
代码实现
1.Activity 布局文件中引入BottomNavigationView 和 FragmentContainerView控件
其中 menu 使用上一篇中的指定的 menu
2.编写 TabLayoutHomeFragment 布局文件
主要想在这个 Home首页 Fragment 中 实现TabLayout 和 ViewPager2滑动功能- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>
复制代码 3. 编写 TabLayoutHomeFragment代码部分 用于集成ViewPager2 和TabLayout
- package com.johnny.slzzing.tablayout;import android.os.Bundle;import android.util.Log;import android.view.LayoutInflater;import android.view.View;import android.view.ViewGroup;import androidx.annotation.NonNull;import androidx.annotation.Nullable;import androidx.fragment.app.Fragment;import androidx.fragment.app.FragmentActivity;import androidx.viewpager2.adapter.FragmentStateAdapter;import androidx.viewpager2.widget.ViewPager2;import com.google.android.material.tabs.TabLayout;import com.google.android.material.tabs.TabLayoutMediator;import com.johnny.slzzing.BottomFragment;import com.johnny.slzzing.R;import com.johnny.slzzing.RecFragment;import java.util.Arrays;import java.util.List;public class TabLayoutHomeFragment2 extends Fragment { private static final String ARG_PARAM1 = "param1"; private static final String ARG_PARAM2 = "param2"; private static final String TAG = "TabLayoutHomeFragment"; // TODO: Rename and change types of parameters private String mParam1; private String mParam2; private ViewPager2 viewPager2; private TabLayout tabLayout; public TabLayoutHomeFragment2() {} public static TabLayoutHomeFragment2 newInstance(String param1, String param2) {<?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>TabLayoutHomeFragment2 fragment = new TabLayoutHomeFragment2();<?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>Bundle args = new Bundle();<?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>args.putString(ARG_PARAM1, param1);<?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>args.putString(ARG_PARAM2, param2);<?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>fragment.setArguments(args);<?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>return fragment; } @Override public void onCreate(Bundle savedInstanceState) {<?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>super.onCreate(savedInstanceState);<?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>if (getArguments() != null) {<?xml version="1.0" encoding="utf-8"?>
- <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"
- tools:context=".ViewPager2TabLayoutActivity">
-
- <androidx.fragment.app.FragmentContainerView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/container_view"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintTop_toTopOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toTopOf="@id/bootomnav3"/>
- <com.google.android.material.bottomnavigation.BottomNavigationView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/bootomnav3"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintStart_toStartOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toBottomOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:menu="@menu/bottom_item_menu"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:labelVisibilityMode="labeled"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>/>
- </androidx.constraintlayout.widget.ConstraintLayout>mParam1 = getArguments().getString(ARG_PARAM1);<?xml version="1.0" encoding="utf-8"?>
- <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"
- tools:context=".ViewPager2TabLayoutActivity">
-
- <androidx.fragment.app.FragmentContainerView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/container_view"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintTop_toTopOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toTopOf="@id/bootomnav3"/>
- <com.google.android.material.bottomnavigation.BottomNavigationView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/bootomnav3"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintStart_toStartOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toBottomOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:menu="@menu/bottom_item_menu"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:labelVisibilityMode="labeled"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>/>
- </androidx.constraintlayout.widget.ConstraintLayout>mParam2 = getArguments().getString(ARG_PARAM2);<?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>} } @Override public View onCreateView(<?xml version="1.0" encoding="utf-8"?>
- <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"
- tools:context=".ViewPager2TabLayoutActivity">
-
- <androidx.fragment.app.FragmentContainerView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/container_view"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintTop_toTopOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toTopOf="@id/bootomnav3"/>
- <com.google.android.material.bottomnavigation.BottomNavigationView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/bootomnav3"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintStart_toStartOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toBottomOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:menu="@menu/bottom_item_menu"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:labelVisibilityMode="labeled"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>/>
- </androidx.constraintlayout.widget.ConstraintLayout>LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {<?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>return inflater.inflate(R.layout.fragment_tab_layout_home2, container, false); } @Override public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {<?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>super.onViewCreated(view, savedInstanceState);<?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>viewPager2 = view.findViewById(R.id.myviepage2);<?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>viewPager2.setSaveEnabled(false);<?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>tabLayout = view.findViewById(R.id.mytablayout2);<?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>List titleList = initPageTitleList();<?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>TabLayoutChildViewPager tabLayoutChildViewPager =<?xml version="1.0" encoding="utf-8"?>
- <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"
- tools:context=".ViewPager2TabLayoutActivity">
-
- <androidx.fragment.app.FragmentContainerView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/container_view"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintTop_toTopOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toTopOf="@id/bootomnav3"/>
- <com.google.android.material.bottomnavigation.BottomNavigationView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/bootomnav3"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintStart_toStartOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toBottomOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:menu="@menu/bottom_item_menu"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:labelVisibilityMode="labeled"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>/>
- </androidx.constraintlayout.widget.ConstraintLayout> new TabLayoutChildViewPager(getActivity(),initChildFragmentList());<?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout> //重点!! ViewPager2绑定Adapter<?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>viewPager2.setAdapter(tabLayoutChildViewPager);<?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout> //重点!! 关联 TabLayout 和 ViewPager2<?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>new TabLayoutMediator(tabLayout, viewPager2, true,<?xml version="1.0" encoding="utf-8"?>
- <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"
- tools:context=".ViewPager2TabLayoutActivity">
-
- <androidx.fragment.app.FragmentContainerView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/container_view"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintTop_toTopOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toTopOf="@id/bootomnav3"/>
- <com.google.android.material.bottomnavigation.BottomNavigationView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/bootomnav3"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintStart_toStartOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toBottomOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:menu="@menu/bottom_item_menu"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:labelVisibilityMode="labeled"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>/>
- </androidx.constraintlayout.widget.ConstraintLayout> (tab, position) -> tab.setText(titleList.get(position)))<?xml version="1.0" encoding="utf-8"?>
- <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"
- tools:context=".ViewPager2TabLayoutActivity">
-
- <androidx.fragment.app.FragmentContainerView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/container_view"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintTop_toTopOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toTopOf="@id/bootomnav3"/>
- <com.google.android.material.bottomnavigation.BottomNavigationView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/bootomnav3"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintStart_toStartOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toBottomOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:menu="@menu/bottom_item_menu"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:labelVisibilityMode="labeled"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>/>
- </androidx.constraintlayout.widget.ConstraintLayout> .attach(); } private List initPageTitleList() { return Arrays.asList("推荐","关注","娱乐","游戏","电影", "电视剧","实时新闻"); } private List initChildFragmentList() {<?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>//在tablayout 的第一个fragment 中使用 RecycleView 优化一下页面<?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>RecFragment recFragment = new RecFragment();<?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>//BottomFragment bottomFragment = BottomFragment.newInstance("推荐", "");<?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>BottomFragment bottomFragment2 = BottomFragment.newInstance("关注", "");<?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>BottomFragment bottomFragment3 = BottomFragment.newInstance("娱乐", "");<?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>BottomFragment bottomFragment4 = BottomFragment.newInstance("游戏", "");<?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>BottomFragment bottomFragment5 = BottomFragment.newInstance("电影", "");<?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>BottomFragment bottomFragment6 = BottomFragment.newInstance("电视剧", "");<?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>BottomFragment bottomFragment7 = BottomFragment.newInstance("实时新闻", "");<?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>return Arrays.asList(<?xml version="1.0" encoding="utf-8"?>
- <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"
- tools:context=".ViewPager2TabLayoutActivity">
-
- <androidx.fragment.app.FragmentContainerView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/container_view"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintTop_toTopOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toTopOf="@id/bootomnav3"/>
- <com.google.android.material.bottomnavigation.BottomNavigationView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/bootomnav3"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintStart_toStartOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toBottomOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:menu="@menu/bottom_item_menu"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:labelVisibilityMode="labeled"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>/>
- </androidx.constraintlayout.widget.ConstraintLayout> recFragment,<?xml version="1.0" encoding="utf-8"?>
- <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"
- tools:context=".ViewPager2TabLayoutActivity">
-
- <androidx.fragment.app.FragmentContainerView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/container_view"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintTop_toTopOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toTopOf="@id/bootomnav3"/>
- <com.google.android.material.bottomnavigation.BottomNavigationView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/bootomnav3"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintStart_toStartOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toBottomOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:menu="@menu/bottom_item_menu"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:labelVisibilityMode="labeled"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>/>
- </androidx.constraintlayout.widget.ConstraintLayout> bottomFragment2,<?xml version="1.0" encoding="utf-8"?>
- <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"
- tools:context=".ViewPager2TabLayoutActivity">
-
- <androidx.fragment.app.FragmentContainerView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/container_view"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintTop_toTopOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toTopOf="@id/bootomnav3"/>
- <com.google.android.material.bottomnavigation.BottomNavigationView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/bootomnav3"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintStart_toStartOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toBottomOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:menu="@menu/bottom_item_menu"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:labelVisibilityMode="labeled"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>/>
- </androidx.constraintlayout.widget.ConstraintLayout> bottomFragment3,<?xml version="1.0" encoding="utf-8"?>
- <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"
- tools:context=".ViewPager2TabLayoutActivity">
-
- <androidx.fragment.app.FragmentContainerView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/container_view"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintTop_toTopOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toTopOf="@id/bootomnav3"/>
- <com.google.android.material.bottomnavigation.BottomNavigationView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/bootomnav3"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintStart_toStartOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toBottomOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:menu="@menu/bottom_item_menu"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:labelVisibilityMode="labeled"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>/>
- </androidx.constraintlayout.widget.ConstraintLayout> bottomFragment4,<?xml version="1.0" encoding="utf-8"?>
- <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"
- tools:context=".ViewPager2TabLayoutActivity">
-
- <androidx.fragment.app.FragmentContainerView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/container_view"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintTop_toTopOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toTopOf="@id/bootomnav3"/>
- <com.google.android.material.bottomnavigation.BottomNavigationView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/bootomnav3"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintStart_toStartOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toBottomOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:menu="@menu/bottom_item_menu"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:labelVisibilityMode="labeled"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>/>
- </androidx.constraintlayout.widget.ConstraintLayout> bottomFragment5,<?xml version="1.0" encoding="utf-8"?>
- <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"
- tools:context=".ViewPager2TabLayoutActivity">
-
- <androidx.fragment.app.FragmentContainerView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/container_view"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintTop_toTopOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toTopOf="@id/bootomnav3"/>
- <com.google.android.material.bottomnavigation.BottomNavigationView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/bootomnav3"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintStart_toStartOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toBottomOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:menu="@menu/bottom_item_menu"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:labelVisibilityMode="labeled"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>/>
- </androidx.constraintlayout.widget.ConstraintLayout> bottomFragment6,<?xml version="1.0" encoding="utf-8"?>
- <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"
- tools:context=".ViewPager2TabLayoutActivity">
-
- <androidx.fragment.app.FragmentContainerView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/container_view"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintTop_toTopOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toTopOf="@id/bootomnav3"/>
- <com.google.android.material.bottomnavigation.BottomNavigationView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/bootomnav3"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintStart_toStartOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toBottomOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:menu="@menu/bottom_item_menu"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:labelVisibilityMode="labeled"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>/>
- </androidx.constraintlayout.widget.ConstraintLayout> bottomFragment7); } static class TabLayoutChildViewPager extends FragmentStateAdapter{<?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>private List fragmentList;<?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>public TabLayoutChildViewPager(@NonNull FragmentActivity fragmentActivity, List fragmentList) {<?xml version="1.0" encoding="utf-8"?>
- <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"
- tools:context=".ViewPager2TabLayoutActivity">
-
- <androidx.fragment.app.FragmentContainerView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/container_view"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintTop_toTopOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toTopOf="@id/bootomnav3"/>
- <com.google.android.material.bottomnavigation.BottomNavigationView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/bootomnav3"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintStart_toStartOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toBottomOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:menu="@menu/bottom_item_menu"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:labelVisibilityMode="labeled"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>/>
- </androidx.constraintlayout.widget.ConstraintLayout>super(fragmentActivity);<?xml version="1.0" encoding="utf-8"?>
- <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"
- tools:context=".ViewPager2TabLayoutActivity">
-
- <androidx.fragment.app.FragmentContainerView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/container_view"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintTop_toTopOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toTopOf="@id/bootomnav3"/>
- <com.google.android.material.bottomnavigation.BottomNavigationView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/bootomnav3"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintStart_toStartOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toBottomOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:menu="@menu/bottom_item_menu"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:labelVisibilityMode="labeled"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>/>
- </androidx.constraintlayout.widget.ConstraintLayout>this.fragmentList = fragmentList;<?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>}<?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>@NonNull<?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>@Override<?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>public Fragment createFragment(int position) {<?xml version="1.0" encoding="utf-8"?>
- <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"
- tools:context=".ViewPager2TabLayoutActivity">
-
- <androidx.fragment.app.FragmentContainerView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/container_view"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintTop_toTopOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toTopOf="@id/bootomnav3"/>
- <com.google.android.material.bottomnavigation.BottomNavigationView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/bootomnav3"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintStart_toStartOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toBottomOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:menu="@menu/bottom_item_menu"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:labelVisibilityMode="labeled"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>/>
- </androidx.constraintlayout.widget.ConstraintLayout>return fragmentList.get(position);<?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>}<?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>@Override<?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>public int getItemCount() {<?xml version="1.0" encoding="utf-8"?>
- <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"
- tools:context=".ViewPager2TabLayoutActivity">
-
- <androidx.fragment.app.FragmentContainerView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/container_view"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintTop_toTopOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toTopOf="@id/bootomnav3"/>
- <com.google.android.material.bottomnavigation.BottomNavigationView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/bootomnav3"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintStart_toStartOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toBottomOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:menu="@menu/bottom_item_menu"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:labelVisibilityMode="labeled"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>/>
- </androidx.constraintlayout.widget.ConstraintLayout>return fragmentList.size();<?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>} }}
复制代码 4. 编写 RecFragment 用于继承RecycleView 展示
主要是优化TabLayout 的第一个fragment 样式- package com.johnny.slzzing;import static com.johnny.slzzing.R.drawable.discountberry;import static com.johnny.slzzing.R.drawable.discountbrocoli;import static com.johnny.slzzing.R.drawable.discountmeat;import android.os.Bundle;import android.view.LayoutInflater;import android.view.View;import android.view.ViewGroup;import androidx.annotation.NonNull;import androidx.annotation.Nullable;import androidx.fragment.app.Fragment;import androidx.recyclerview.widget.LinearLayoutManager;import androidx.recyclerview.widget.RecyclerView;import java.util.ArrayList;import java.util.List;/** * A simple {@link Fragment} subclass. * Use the {@link RecFragment#newInstance} factory method to * create an instance of this fragment. */public class RecFragment extends Fragment { // TODO: Rename parameter arguments, choose names that match // the fragment initialization parameters, e.g. ARG_ITEM_NUMBER private static final String ARG_PARAM1 = "param1"; private static final String ARG_PARAM2 = "param2"; // TODO: Rename and change types of parameters private String mParam1; private String mParam2; private RecyclerView discountRecyclerView; private DiscountedProductAdapter discountedProductAdapter; public RecFragment() {<?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>// Required empty public constructor } /** * Use this factory method to create a new instance of * this fragment using the provided parameters. * * @param param1 Parameter 1. * @param param2 Parameter 2. * @return A new instance of fragment RecFragment. */ // TODO: Rename and change types and number of parameters public static RecFragment newInstance(String param1, String param2) {<?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>RecFragment fragment = new RecFragment();<?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>Bundle args = new Bundle();<?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>args.putString(ARG_PARAM1, param1);<?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>args.putString(ARG_PARAM2, param2);<?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>fragment.setArguments(args);<?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>return fragment; } @Override public void onCreate(Bundle savedInstanceState) {<?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>super.onCreate(savedInstanceState);<?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>if (getArguments() != null) {<?xml version="1.0" encoding="utf-8"?>
- <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"
- tools:context=".ViewPager2TabLayoutActivity">
-
- <androidx.fragment.app.FragmentContainerView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/container_view"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintTop_toTopOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toTopOf="@id/bootomnav3"/>
- <com.google.android.material.bottomnavigation.BottomNavigationView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/bootomnav3"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintStart_toStartOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toBottomOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:menu="@menu/bottom_item_menu"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:labelVisibilityMode="labeled"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>/>
- </androidx.constraintlayout.widget.ConstraintLayout>mParam1 = getArguments().getString(ARG_PARAM1);<?xml version="1.0" encoding="utf-8"?>
- <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"
- tools:context=".ViewPager2TabLayoutActivity">
-
- <androidx.fragment.app.FragmentContainerView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/container_view"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintTop_toTopOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toTopOf="@id/bootomnav3"/>
- <com.google.android.material.bottomnavigation.BottomNavigationView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/bootomnav3"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintStart_toStartOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toBottomOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:menu="@menu/bottom_item_menu"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:labelVisibilityMode="labeled"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>/>
- </androidx.constraintlayout.widget.ConstraintLayout>mParam2 = getArguments().getString(ARG_PARAM2);<?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>} } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container,<?xml version="1.0" encoding="utf-8"?>
- <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"
- tools:context=".ViewPager2TabLayoutActivity">
-
- <androidx.fragment.app.FragmentContainerView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/container_view"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintTop_toTopOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toTopOf="@id/bootomnav3"/>
- <com.google.android.material.bottomnavigation.BottomNavigationView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/bootomnav3"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintStart_toStartOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toBottomOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:menu="@menu/bottom_item_menu"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:labelVisibilityMode="labeled"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>/>
- </androidx.constraintlayout.widget.ConstraintLayout><?xml version="1.0" encoding="utf-8"?>
- <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"
- tools:context=".ViewPager2TabLayoutActivity">
-
- <androidx.fragment.app.FragmentContainerView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/container_view"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintTop_toTopOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toTopOf="@id/bootomnav3"/>
- <com.google.android.material.bottomnavigation.BottomNavigationView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/bootomnav3"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintStart_toStartOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toBottomOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:menu="@menu/bottom_item_menu"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:labelVisibilityMode="labeled"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>/>
- </androidx.constraintlayout.widget.ConstraintLayout> Bundle savedInstanceState) {<?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>// Inflate the layout for this fragment<?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>return inflater.inflate(R.layout.fragment_rec, container, false); } @Override public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {<?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>super.onViewCreated(view, savedInstanceState);<?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>discountRecyclerView = view.findViewById(R.id.discountedRecycler);<?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>setDiscountedRecycler(initDiscountList()); } private List initDiscountList() {<?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>List discountedProductsList = new ArrayList();<?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>discountedProductsList.add(new DiscountedProducts(1, discountberry, "草莓", "草莓,多年生草本植物。高10-40厘米,茎低于叶或近相等,密被开展黄色柔毛"));<?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>discountedProductsList.add(new DiscountedProducts(2, discountbrocoli, "花菜","花椰菜(是十字花科、芸薹属植物野甘蓝的变种。"));<?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>discountedProductsList.add(new DiscountedProducts(3, discountmeat, "西红柿", "番茄 是茄科茄属 [2] 一年生或多年生草本植物,体高0.6-2米,全体生粘质腺毛,有强烈气味,茎易倒伏,叶羽状复叶或羽状深裂"));<?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>discountedProductsList.add(new DiscountedProducts(4, discountberry, "西瓜","西瓜 一年生蔓生藤本;茎、枝粗壮,具明显的棱。卷须较粗壮,具短柔毛,叶柄粗,密被柔毛"));<?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>discountedProductsList.add(new DiscountedProducts(5, discountbrocoli, "南瓜","南瓜 葫芦科南瓜属的一个种,一年生蔓生草本植物"));<?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>discountedProductsList.add(new DiscountedProducts(6, discountmeat, "猕猴桃", "中华猕猴桃 是猕猴桃科、猕猴桃属大植物。大型落叶藤本;幼一枝或厚或薄地被有灰白色茸毛或褐色长硬毛或铁锈色硬毛状刺毛,老时秃净或留有断损残毛"));<?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>discountedProductsList.add(new DiscountedProducts(7, discountberry, "草莓", "草莓,多年生草本植物。高10-40厘米,茎低于叶或近相等,密被开展黄色柔毛"));<?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>discountedProductsList.add(new DiscountedProducts(8, discountbrocoli, "花菜","花椰菜 是十字花科、芸薹属植物野甘蓝的变种。"));<?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>discountedProductsList.add(new DiscountedProducts(9, discountmeat, "西红柿", "番茄 是茄科茄属 [2] 一年生或多年生草本植物,体高0.6-2米,全体生粘质腺毛,有强烈气味,茎易倒伏,叶羽状复叶或羽状深裂"));<?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>discountedProductsList.add(new DiscountedProducts(10, discountberry, "西瓜","西瓜 一年生蔓生藤本;茎、枝粗壮,具明显的棱。卷须较粗壮,具短柔毛,叶柄粗,密被柔毛"));<?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>discountedProductsList.add(new DiscountedProducts(11, discountbrocoli, "南瓜","南瓜 葫芦科南瓜属的一个种,一年生蔓生草本植物"));<?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>discountedProductsList.add(new DiscountedProducts(12, discountmeat, "猕猴桃", "中华猕猴桃 是猕猴桃科、猕猴桃属大植物。大型落叶藤本;幼一枝或厚或薄地被有灰白色茸毛或褐色长硬毛或铁锈色硬毛状刺毛,老时秃净或留有断损残毛"));<?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>return discountedProductsList ; } private void setDiscountedRecycler(List dataList) {<?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>RecyclerView.LayoutManager layoutManager = new LinearLayoutManager(getContext(), LinearLayoutManager.VERTICAL, false);<?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>discountedProductAdapter = new DiscountedProductAdapter(getContext(),dataList);<?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>discountRecyclerView.setLayoutManager(layoutManager);<?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>discountRecyclerView.setAdapter(discountedProductAdapter); }}
复制代码 5.实现 ViewPager2TabLayoutActivity
- package com.johnny.slzzing;import android.annotation.SuppressLint;import android.os.Bundle;import android.view.MenuItem;import androidx.annotation.NonNull;import androidx.appcompat.app.AppCompatActivity;import androidx.fragment.app.Fragment;import androidx.fragment.app.FragmentContainerView;import com.google.android.material.bottomnavigation.BottomNavigationView;import com.google.android.material.navigation.NavigationBarView;import com.johnny.slzzing.tablayout.TabLayoutHomeFragment2;import java.util.HashMap;import java.util.Map;public class ViewPager2TabLayoutActivity extends AppCompatActivity { BottomNavigationView bottomNavigationView; FragmentContainerView fragmentContainerView; @Override protected void onCreate(Bundle savedInstanceState) {<?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>super.onCreate(savedInstanceState);<?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>setContentView(R.layout.activity_view_pager2_tab_layout);<?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>bottomNavigationView = findViewById(R.id.bootomnav3);<?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>fragmentContainerView = findViewById(R.id.container_view);<?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>Map fragmentMap = new HashMap();<?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>TabLayoutHomeFragment2 tabLayoutHomeFragment2 = new TabLayoutHomeFragment2();<?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>//这里 第一个home fragment 使用上面编写的 TabLayoutHomeFragment2<?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>fragmentMap.put(R.id.home_item,tabLayoutHomeFragment2);<?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>fragmentMap.put(R.id.type_item,Bottom2Fragment.newInstance("我是typefragment", ""));<?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>fragmentMap.put(R.id.add_item,Bottom2Fragment.newInstance("我是addfragment", ""));<?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>fragmentMap.put(R.id.setting_item,Bottom2Fragment.newInstance("我是settingfragment", ""));<?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>//bottomNavigationView 点击用于替换 FragmentContainerView<?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>bottomNavigationView.setOnItemSelectedListener(new NavigationBarView.OnItemSelectedListener() {<?xml version="1.0" encoding="utf-8"?>
- <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"
- tools:context=".ViewPager2TabLayoutActivity">
-
- <androidx.fragment.app.FragmentContainerView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/container_view"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintTop_toTopOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toTopOf="@id/bootomnav3"/>
- <com.google.android.material.bottomnavigation.BottomNavigationView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/bootomnav3"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintStart_toStartOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toBottomOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:menu="@menu/bottom_item_menu"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:labelVisibilityMode="labeled"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>/>
- </androidx.constraintlayout.widget.ConstraintLayout>@SuppressLint("NonConstantResourceId")<?xml version="1.0" encoding="utf-8"?>
- <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"
- tools:context=".ViewPager2TabLayoutActivity">
-
- <androidx.fragment.app.FragmentContainerView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/container_view"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintTop_toTopOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toTopOf="@id/bootomnav3"/>
- <com.google.android.material.bottomnavigation.BottomNavigationView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/bootomnav3"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintStart_toStartOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toBottomOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:menu="@menu/bottom_item_menu"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:labelVisibilityMode="labeled"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>/>
- </androidx.constraintlayout.widget.ConstraintLayout>@Override<?xml version="1.0" encoding="utf-8"?>
- <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"
- tools:context=".ViewPager2TabLayoutActivity">
-
- <androidx.fragment.app.FragmentContainerView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/container_view"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintTop_toTopOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toTopOf="@id/bootomnav3"/>
- <com.google.android.material.bottomnavigation.BottomNavigationView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/bootomnav3"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintStart_toStartOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toBottomOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:menu="@menu/bottom_item_menu"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:labelVisibilityMode="labeled"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>/>
- </androidx.constraintlayout.widget.ConstraintLayout>public boolean onNavigationItemSelected(@NonNull MenuItem item) {<?xml version="1.0" encoding="utf-8"?>
- <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"
- tools:context=".ViewPager2TabLayoutActivity">
-
- <androidx.fragment.app.FragmentContainerView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/container_view"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintTop_toTopOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toTopOf="@id/bootomnav3"/>
- <com.google.android.material.bottomnavigation.BottomNavigationView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/bootomnav3"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintStart_toStartOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toBottomOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:menu="@menu/bottom_item_menu"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:labelVisibilityMode="labeled"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>/>
- </androidx.constraintlayout.widget.ConstraintLayout> int itemId = item.getItemId();<?xml version="1.0" encoding="utf-8"?>
- <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"
- tools:context=".ViewPager2TabLayoutActivity">
-
- <androidx.fragment.app.FragmentContainerView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/container_view"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintTop_toTopOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toTopOf="@id/bootomnav3"/>
- <com.google.android.material.bottomnavigation.BottomNavigationView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/bootomnav3"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintStart_toStartOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toBottomOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:menu="@menu/bottom_item_menu"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:labelVisibilityMode="labeled"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>/>
- </androidx.constraintlayout.widget.ConstraintLayout> switch (itemId){<?xml version="1.0" encoding="utf-8"?>
- <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"
- tools:context=".ViewPager2TabLayoutActivity">
-
- <androidx.fragment.app.FragmentContainerView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/container_view"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintTop_toTopOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toTopOf="@id/bootomnav3"/>
- <com.google.android.material.bottomnavigation.BottomNavigationView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/bootomnav3"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintStart_toStartOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toBottomOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:menu="@menu/bottom_item_menu"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:labelVisibilityMode="labeled"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>/>
- </androidx.constraintlayout.widget.ConstraintLayout><?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>case R.id.home_item:<?xml version="1.0" encoding="utf-8"?>
- <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"
- tools:context=".ViewPager2TabLayoutActivity">
-
- <androidx.fragment.app.FragmentContainerView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/container_view"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintTop_toTopOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toTopOf="@id/bootomnav3"/>
- <com.google.android.material.bottomnavigation.BottomNavigationView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/bootomnav3"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintStart_toStartOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toBottomOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:menu="@menu/bottom_item_menu"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:labelVisibilityMode="labeled"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>/>
- </androidx.constraintlayout.widget.ConstraintLayout><?xml version="1.0" encoding="utf-8"?>
- <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"
- tools:context=".ViewPager2TabLayoutActivity">
-
- <androidx.fragment.app.FragmentContainerView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/container_view"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintTop_toTopOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toTopOf="@id/bootomnav3"/>
- <com.google.android.material.bottomnavigation.BottomNavigationView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/bootomnav3"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintStart_toStartOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toBottomOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:menu="@menu/bottom_item_menu"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:labelVisibilityMode="labeled"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>/>
- </androidx.constraintlayout.widget.ConstraintLayout>getSupportFragmentManager().beginTransaction()<?xml version="1.0" encoding="utf-8"?>
- <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"
- tools:context=".ViewPager2TabLayoutActivity">
-
- <androidx.fragment.app.FragmentContainerView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/container_view"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintTop_toTopOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toTopOf="@id/bootomnav3"/>
- <com.google.android.material.bottomnavigation.BottomNavigationView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/bootomnav3"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintStart_toStartOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toBottomOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:menu="@menu/bottom_item_menu"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:labelVisibilityMode="labeled"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>/>
- </androidx.constraintlayout.widget.ConstraintLayout><?xml version="1.0" encoding="utf-8"?>
- <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"
- tools:context=".ViewPager2TabLayoutActivity">
-
- <androidx.fragment.app.FragmentContainerView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/container_view"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintTop_toTopOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toTopOf="@id/bootomnav3"/>
- <com.google.android.material.bottomnavigation.BottomNavigationView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/bootomnav3"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintStart_toStartOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toBottomOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:menu="@menu/bottom_item_menu"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:labelVisibilityMode="labeled"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>/>
- </androidx.constraintlayout.widget.ConstraintLayout><?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>.replace(R.id.container_view, fragmentMap.get(R.id.home_item))<?xml version="1.0" encoding="utf-8"?>
- <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"
- tools:context=".ViewPager2TabLayoutActivity">
-
- <androidx.fragment.app.FragmentContainerView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/container_view"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintTop_toTopOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toTopOf="@id/bootomnav3"/>
- <com.google.android.material.bottomnavigation.BottomNavigationView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/bootomnav3"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintStart_toStartOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toBottomOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:menu="@menu/bottom_item_menu"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:labelVisibilityMode="labeled"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>/>
- </androidx.constraintlayout.widget.ConstraintLayout><?xml version="1.0" encoding="utf-8"?>
- <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"
- tools:context=".ViewPager2TabLayoutActivity">
-
- <androidx.fragment.app.FragmentContainerView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/container_view"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintTop_toTopOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toTopOf="@id/bootomnav3"/>
- <com.google.android.material.bottomnavigation.BottomNavigationView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/bootomnav3"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintStart_toStartOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toBottomOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:menu="@menu/bottom_item_menu"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:labelVisibilityMode="labeled"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>/>
- </androidx.constraintlayout.widget.ConstraintLayout><?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>.commit();<?xml version="1.0" encoding="utf-8"?>
- <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"
- tools:context=".ViewPager2TabLayoutActivity">
-
- <androidx.fragment.app.FragmentContainerView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/container_view"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintTop_toTopOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toTopOf="@id/bootomnav3"/>
- <com.google.android.material.bottomnavigation.BottomNavigationView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/bootomnav3"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintStart_toStartOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toBottomOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:menu="@menu/bottom_item_menu"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:labelVisibilityMode="labeled"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>/>
- </androidx.constraintlayout.widget.ConstraintLayout><?xml version="1.0" encoding="utf-8"?>
- <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"
- tools:context=".ViewPager2TabLayoutActivity">
-
- <androidx.fragment.app.FragmentContainerView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/container_view"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintTop_toTopOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toTopOf="@id/bootomnav3"/>
- <com.google.android.material.bottomnavigation.BottomNavigationView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/bootomnav3"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintStart_toStartOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toBottomOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:menu="@menu/bottom_item_menu"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:labelVisibilityMode="labeled"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>/>
- </androidx.constraintlayout.widget.ConstraintLayout>break;<?xml version="1.0" encoding="utf-8"?>
- <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"
- tools:context=".ViewPager2TabLayoutActivity">
-
- <androidx.fragment.app.FragmentContainerView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/container_view"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintTop_toTopOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toTopOf="@id/bootomnav3"/>
- <com.google.android.material.bottomnavigation.BottomNavigationView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/bootomnav3"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintStart_toStartOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toBottomOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:menu="@menu/bottom_item_menu"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:labelVisibilityMode="labeled"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>/>
- </androidx.constraintlayout.widget.ConstraintLayout><?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>case R.id.type_item:<?xml version="1.0" encoding="utf-8"?>
- <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"
- tools:context=".ViewPager2TabLayoutActivity">
-
- <androidx.fragment.app.FragmentContainerView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/container_view"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintTop_toTopOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toTopOf="@id/bootomnav3"/>
- <com.google.android.material.bottomnavigation.BottomNavigationView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/bootomnav3"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintStart_toStartOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toBottomOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:menu="@menu/bottom_item_menu"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:labelVisibilityMode="labeled"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>/>
- </androidx.constraintlayout.widget.ConstraintLayout><?xml version="1.0" encoding="utf-8"?>
- <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"
- tools:context=".ViewPager2TabLayoutActivity">
-
- <androidx.fragment.app.FragmentContainerView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/container_view"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintTop_toTopOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toTopOf="@id/bootomnav3"/>
- <com.google.android.material.bottomnavigation.BottomNavigationView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/bootomnav3"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintStart_toStartOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toBottomOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:menu="@menu/bottom_item_menu"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:labelVisibilityMode="labeled"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>/>
- </androidx.constraintlayout.widget.ConstraintLayout>getSupportFragmentManager().beginTransaction()<?xml version="1.0" encoding="utf-8"?>
- <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"
- tools:context=".ViewPager2TabLayoutActivity">
-
- <androidx.fragment.app.FragmentContainerView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/container_view"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintTop_toTopOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toTopOf="@id/bootomnav3"/>
- <com.google.android.material.bottomnavigation.BottomNavigationView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/bootomnav3"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintStart_toStartOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toBottomOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:menu="@menu/bottom_item_menu"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:labelVisibilityMode="labeled"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>/>
- </androidx.constraintlayout.widget.ConstraintLayout><?xml version="1.0" encoding="utf-8"?>
- <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"
- tools:context=".ViewPager2TabLayoutActivity">
-
- <androidx.fragment.app.FragmentContainerView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/container_view"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintTop_toTopOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toTopOf="@id/bootomnav3"/>
- <com.google.android.material.bottomnavigation.BottomNavigationView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/bootomnav3"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintStart_toStartOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toBottomOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:menu="@menu/bottom_item_menu"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:labelVisibilityMode="labeled"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>/>
- </androidx.constraintlayout.widget.ConstraintLayout><?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>.replace(R.id.container_view, fragmentMap.get(R.id.type_item))<?xml version="1.0" encoding="utf-8"?>
- <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"
- tools:context=".ViewPager2TabLayoutActivity">
-
- <androidx.fragment.app.FragmentContainerView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/container_view"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintTop_toTopOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toTopOf="@id/bootomnav3"/>
- <com.google.android.material.bottomnavigation.BottomNavigationView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/bootomnav3"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintStart_toStartOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toBottomOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:menu="@menu/bottom_item_menu"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:labelVisibilityMode="labeled"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>/>
- </androidx.constraintlayout.widget.ConstraintLayout><?xml version="1.0" encoding="utf-8"?>
- <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"
- tools:context=".ViewPager2TabLayoutActivity">
-
- <androidx.fragment.app.FragmentContainerView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/container_view"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintTop_toTopOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toTopOf="@id/bootomnav3"/>
- <com.google.android.material.bottomnavigation.BottomNavigationView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/bootomnav3"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintStart_toStartOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toBottomOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:menu="@menu/bottom_item_menu"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:labelVisibilityMode="labeled"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>/>
- </androidx.constraintlayout.widget.ConstraintLayout><?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>.commit();<?xml version="1.0" encoding="utf-8"?>
- <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"
- tools:context=".ViewPager2TabLayoutActivity">
-
- <androidx.fragment.app.FragmentContainerView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/container_view"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintTop_toTopOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toTopOf="@id/bootomnav3"/>
- <com.google.android.material.bottomnavigation.BottomNavigationView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/bootomnav3"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintStart_toStartOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toBottomOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:menu="@menu/bottom_item_menu"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:labelVisibilityMode="labeled"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>/>
- </androidx.constraintlayout.widget.ConstraintLayout><?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>case R.id.add_item:<?xml version="1.0" encoding="utf-8"?>
- <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"
- tools:context=".ViewPager2TabLayoutActivity">
-
- <androidx.fragment.app.FragmentContainerView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/container_view"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintTop_toTopOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toTopOf="@id/bootomnav3"/>
- <com.google.android.material.bottomnavigation.BottomNavigationView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/bootomnav3"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintStart_toStartOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toBottomOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:menu="@menu/bottom_item_menu"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:labelVisibilityMode="labeled"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>/>
- </androidx.constraintlayout.widget.ConstraintLayout><?xml version="1.0" encoding="utf-8"?>
- <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"
- tools:context=".ViewPager2TabLayoutActivity">
-
- <androidx.fragment.app.FragmentContainerView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/container_view"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintTop_toTopOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toTopOf="@id/bootomnav3"/>
- <com.google.android.material.bottomnavigation.BottomNavigationView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/bootomnav3"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintStart_toStartOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toBottomOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:menu="@menu/bottom_item_menu"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:labelVisibilityMode="labeled"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>/>
- </androidx.constraintlayout.widget.ConstraintLayout>getSupportFragmentManager().beginTransaction()<?xml version="1.0" encoding="utf-8"?>
- <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"
- tools:context=".ViewPager2TabLayoutActivity">
-
- <androidx.fragment.app.FragmentContainerView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/container_view"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintTop_toTopOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toTopOf="@id/bootomnav3"/>
- <com.google.android.material.bottomnavigation.BottomNavigationView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/bootomnav3"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintStart_toStartOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toBottomOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:menu="@menu/bottom_item_menu"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:labelVisibilityMode="labeled"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>/>
- </androidx.constraintlayout.widget.ConstraintLayout><?xml version="1.0" encoding="utf-8"?>
- <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"
- tools:context=".ViewPager2TabLayoutActivity">
-
- <androidx.fragment.app.FragmentContainerView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/container_view"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintTop_toTopOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toTopOf="@id/bootomnav3"/>
- <com.google.android.material.bottomnavigation.BottomNavigationView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/bootomnav3"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintStart_toStartOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toBottomOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:menu="@menu/bottom_item_menu"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:labelVisibilityMode="labeled"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>/>
- </androidx.constraintlayout.widget.ConstraintLayout><?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>.replace(R.id.container_view, fragmentMap.get(R.id.add_item))<?xml version="1.0" encoding="utf-8"?>
- <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"
- tools:context=".ViewPager2TabLayoutActivity">
-
- <androidx.fragment.app.FragmentContainerView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/container_view"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintTop_toTopOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toTopOf="@id/bootomnav3"/>
- <com.google.android.material.bottomnavigation.BottomNavigationView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/bootomnav3"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintStart_toStartOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toBottomOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:menu="@menu/bottom_item_menu"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:labelVisibilityMode="labeled"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>/>
- </androidx.constraintlayout.widget.ConstraintLayout><?xml version="1.0" encoding="utf-8"?>
- <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"
- tools:context=".ViewPager2TabLayoutActivity">
-
- <androidx.fragment.app.FragmentContainerView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/container_view"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintTop_toTopOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toTopOf="@id/bootomnav3"/>
- <com.google.android.material.bottomnavigation.BottomNavigationView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/bootomnav3"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintStart_toStartOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toBottomOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:menu="@menu/bottom_item_menu"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:labelVisibilityMode="labeled"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>/>
- </androidx.constraintlayout.widget.ConstraintLayout><?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>.commit();<?xml version="1.0" encoding="utf-8"?>
- <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"
- tools:context=".ViewPager2TabLayoutActivity">
-
- <androidx.fragment.app.FragmentContainerView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/container_view"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintTop_toTopOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toTopOf="@id/bootomnav3"/>
- <com.google.android.material.bottomnavigation.BottomNavigationView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/bootomnav3"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintStart_toStartOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toBottomOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:menu="@menu/bottom_item_menu"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:labelVisibilityMode="labeled"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>/>
- </androidx.constraintlayout.widget.ConstraintLayout><?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>case R.id.setting_item:<?xml version="1.0" encoding="utf-8"?>
- <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"
- tools:context=".ViewPager2TabLayoutActivity">
-
- <androidx.fragment.app.FragmentContainerView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/container_view"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintTop_toTopOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toTopOf="@id/bootomnav3"/>
- <com.google.android.material.bottomnavigation.BottomNavigationView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/bootomnav3"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintStart_toStartOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toBottomOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:menu="@menu/bottom_item_menu"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:labelVisibilityMode="labeled"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>/>
- </androidx.constraintlayout.widget.ConstraintLayout><?xml version="1.0" encoding="utf-8"?>
- <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"
- tools:context=".ViewPager2TabLayoutActivity">
-
- <androidx.fragment.app.FragmentContainerView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/container_view"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintTop_toTopOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toTopOf="@id/bootomnav3"/>
- <com.google.android.material.bottomnavigation.BottomNavigationView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/bootomnav3"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintStart_toStartOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toBottomOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:menu="@menu/bottom_item_menu"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:labelVisibilityMode="labeled"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>/>
- </androidx.constraintlayout.widget.ConstraintLayout>getSupportFragmentManager().beginTransaction()<?xml version="1.0" encoding="utf-8"?>
- <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"
- tools:context=".ViewPager2TabLayoutActivity">
-
- <androidx.fragment.app.FragmentContainerView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/container_view"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintTop_toTopOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toTopOf="@id/bootomnav3"/>
- <com.google.android.material.bottomnavigation.BottomNavigationView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/bootomnav3"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintStart_toStartOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toBottomOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:menu="@menu/bottom_item_menu"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:labelVisibilityMode="labeled"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>/>
- </androidx.constraintlayout.widget.ConstraintLayout><?xml version="1.0" encoding="utf-8"?>
- <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"
- tools:context=".ViewPager2TabLayoutActivity">
-
- <androidx.fragment.app.FragmentContainerView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/container_view"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintTop_toTopOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toTopOf="@id/bootomnav3"/>
- <com.google.android.material.bottomnavigation.BottomNavigationView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/bootomnav3"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintStart_toStartOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toBottomOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:menu="@menu/bottom_item_menu"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:labelVisibilityMode="labeled"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>/>
- </androidx.constraintlayout.widget.ConstraintLayout><?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>.replace(R.id.container_view, fragmentMap.get(R.id.setting_item))<?xml version="1.0" encoding="utf-8"?>
- <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"
- tools:context=".ViewPager2TabLayoutActivity">
-
- <androidx.fragment.app.FragmentContainerView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/container_view"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintTop_toTopOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toTopOf="@id/bootomnav3"/>
- <com.google.android.material.bottomnavigation.BottomNavigationView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/bootomnav3"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintStart_toStartOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toBottomOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:menu="@menu/bottom_item_menu"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:labelVisibilityMode="labeled"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>/>
- </androidx.constraintlayout.widget.ConstraintLayout><?xml version="1.0" encoding="utf-8"?>
- <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"
- tools:context=".ViewPager2TabLayoutActivity">
-
- <androidx.fragment.app.FragmentContainerView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/container_view"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintTop_toTopOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toTopOf="@id/bootomnav3"/>
- <com.google.android.material.bottomnavigation.BottomNavigationView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/bootomnav3"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintStart_toStartOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toBottomOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:menu="@menu/bottom_item_menu"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:labelVisibilityMode="labeled"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>/>
- </androidx.constraintlayout.widget.ConstraintLayout><?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>.commit();<?xml version="1.0" encoding="utf-8"?>
- <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"
- tools:context=".ViewPager2TabLayoutActivity">
-
- <androidx.fragment.app.FragmentContainerView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/container_view"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintTop_toTopOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toTopOf="@id/bootomnav3"/>
- <com.google.android.material.bottomnavigation.BottomNavigationView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/bootomnav3"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintStart_toStartOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toBottomOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:menu="@menu/bottom_item_menu"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:labelVisibilityMode="labeled"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>/>
- </androidx.constraintlayout.widget.ConstraintLayout> }<?xml version="1.0" encoding="utf-8"?>
- <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"
- tools:context=".ViewPager2TabLayoutActivity">
-
- <androidx.fragment.app.FragmentContainerView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/container_view"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintTop_toTopOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toTopOf="@id/bootomnav3"/>
- <com.google.android.material.bottomnavigation.BottomNavigationView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/bootomnav3"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintStart_toStartOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toBottomOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:menu="@menu/bottom_item_menu"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:labelVisibilityMode="labeled"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>/>
- </androidx.constraintlayout.widget.ConstraintLayout> return true;<?xml version="1.0" encoding="utf-8"?>
- <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"
- tools:context=".ViewPager2TabLayoutActivity">
-
- <androidx.fragment.app.FragmentContainerView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/container_view"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintTop_toTopOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toTopOf="@id/bootomnav3"/>
- <com.google.android.material.bottomnavigation.BottomNavigationView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/bootomnav3"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintStart_toStartOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toBottomOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:menu="@menu/bottom_item_menu"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:labelVisibilityMode="labeled"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>/>
- </androidx.constraintlayout.widget.ConstraintLayout>}<?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>});<?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>getSupportFragmentManager().beginTransaction()<?xml version="1.0" encoding="utf-8"?>
- <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"
- tools:context=".ViewPager2TabLayoutActivity">
-
- <androidx.fragment.app.FragmentContainerView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/container_view"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintTop_toTopOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toTopOf="@id/bootomnav3"/>
- <com.google.android.material.bottomnavigation.BottomNavigationView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/bootomnav3"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintStart_toStartOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toBottomOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:menu="@menu/bottom_item_menu"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:labelVisibilityMode="labeled"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>/>
- </androidx.constraintlayout.widget.ConstraintLayout> .replace(R.id.container_view, fragmentMap.get(R.id.home_item))<?xml version="1.0" encoding="utf-8"?>
- <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"
- tools:context=".ViewPager2TabLayoutActivity">
-
- <androidx.fragment.app.FragmentContainerView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/container_view"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintTop_toTopOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toTopOf="@id/bootomnav3"/>
- <com.google.android.material.bottomnavigation.BottomNavigationView
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:id="@+id/bootomnav3"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_width="match_parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>android:layout_height="0dp"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintStart_toStartOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:layout_constraintBottom_toBottomOf="parent"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:menu="@menu/bottom_item_menu"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>app:labelVisibilityMode="labeled"
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>/>
- </androidx.constraintlayout.widget.ConstraintLayout> .commit(); }}
复制代码 效果
可以看到 顶部有类似 今日头条的 Tab 并且可以滑动哟

总结
本篇主要介绍了 ViewPager2 + TabLayout 的一个集成 实现类似今日头条的顶部Tab 并且支持滑动
核心联动代码
不同于ViewPager , ViewPager2 使用 TabLayoutMediator 来联动TabLayout 和ViewPager2 以及 tab的标题,注意最后要 attach()- viewPager2.setAdapter(tabLayoutChildViewPager);new TabLayoutMediator(tabLayout, viewPager2, true,<?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>(tab, position) -> tab.setText(titleList.get(position)))<?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:context=".tablayout.TabLayoutHomeFragment">
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/mytablayout2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:tabMode="auto"
- app:tabGravity="start"
- app:tabBackground="@color/pink"
- app:tabTextColor="@color/white"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@id/myviepage2"
- />
- <androidx.viewpager2.widget.ViewPager2
- android:id="@+id/myviepage2"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_constraintTop_toBottomOf="@id/mytablayout2"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- />
- </androidx.constraintlayout.widget.ConstraintLayout>.attach();
复制代码欢迎大家访问 个人博客 Johnny小屋
欢迎关注个人公众号

免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作! |