這裏面使用了ScrollableLayout ,Banner ,TabLayout,ViewPager,ListView 這四個整體實現了一個常見的效果;
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<com.cpoopc.scrollablelayoutlib.ScrollableLayout
android:id="@+id/scrollLayout_main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<com.youth.banner.Banner
android:id="@+id/banner_fg_main"
android:layout_width="match_parent"
android:layout_height="200dp" />
<com.google.android.material.tabs.TabLayout
android:id="@+id/tab