youth5201314 / banner

🔥🔥🔥Banner 2.0 来了!Android广告图片轮播控件,内部基于ViewPager2实现,Indicator和UI都可以自定义。
Apache License 2.0
12.81k stars 2.51k forks source link

在fragment中使用画廊效果 华为mate10显示异常问题 #1087

Closed 87620089 closed 2 years ago

87620089 commented 2 years ago

1.使用环境 fragment中使用画廊效果 。TabLayout+ViewPager2+fragment 2.不同手机效果不同,详情见后面图片华为mate10最后一个页面显示高度错误。 小米10加载正常 华为mate10错误图片 3.我的使用版本2.2.2 华为mate10 其他高度正常的项底部显示也异常 华为P10存在跟mate10一样的问题 4.我的适配器布局如下: <?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">

<com.qmuiteam.qmui.widget.roundwidget.QMUIRoundRelativeLayout
    android:id="@+id/ll_add_book"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:gravity="center_horizontal"
    android:orientation="vertical"
    android:visibility="gone"
    app:layout_constraintBottom_toBottomOf="parent"
    app:layout_constraintEnd_toEndOf="parent"
    app:layout_constraintStart_toStartOf="parent"
    app:layout_constraintTop_toTopOf="parent"
    app:qmui_backgroundColor="@color/white"
    app:qmui_borderWidth="0dp"
    app:qmui_radius="8dp">

    <Space
        android:id="@+id/space"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerInParent="true" />

    <ImageView
        android:id="@+id/img_add"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_above="@+id/space"
        android:layout_centerHorizontal="true"
        android:src="@mipmap/add_book" />

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_below="@+id/space"
        android:layout_centerHorizontal="true"
        android:layout_marginTop="10dp"
        android:text="创建笔记本"
        android:textColor="@color/spe_text_color"
        android:textSize="13sp"
        android:textStyle="bold" />

</com.qmuiteam.qmui.widget.roundwidget.QMUIRoundRelativeLayout>

<com.qmuiteam.qmui.widget.roundwidget.QMUIRoundRelativeLayout
    android:id="@+id/rl_book_edit"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    app:layout_constraintBottom_toBottomOf="parent"
    app:layout_constraintEnd_toEndOf="parent"
    app:layout_constraintStart_toStartOf="parent"
    app:layout_constraintTop_toTopOf="parent"
    app:qmui_borderWidth="0dp"
    app:qmui_radius="8dp">

    <ImageView
        android:id="@+id/img_bg"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />

    <com.qmuiteam.qmui.widget.roundwidget.QMUIRoundRelativeLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        app:qmui_radiusTopLeft="0dp"
        app:qmui_radiusTopRight="0dp"
        android:id="@+id/rl_bottom_setting"
        android:clickable="false"
        app:qmui_radiusBottomLeft="8dp"
        app:qmui_radiusBottomRight="8dp"
        app:qmui_borderWidth="0dp"
        app:qmui_backgroundColor="#40000000"
        android:paddingLeft="8dp">

        <TextView
            android:id="@+id/tv_book_name"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerVertical="true"
            android:textColor="@color/white"
            android:textSize="11sp"
            tools:text="笔记本名称笔记本名称" />

        <ImageView
            android:id="@+id/img_book_setting"
            android:layout_width="wrap_content"
            android:clickable="true"
            android:layout_height="wrap_content"
            android:layout_alignParentRight="true"
            android:layout_centerVertical="true"
            android:padding="10dp"
            android:src="@mipmap/book_setting" />
    </com.qmuiteam.qmui.widget.roundwidget.QMUIRoundRelativeLayout>
</com.qmuiteam.qmui.widget.roundwidget.QMUIRoundRelativeLayout>

</androidx.constraintlayout.widget.ConstraintLayout>

87620089 commented 2 years ago

每项底部在小米10也是正常的 华为mate10 底部显示也异常 下图是小米10正常效果 3cf1d17b101f70432364f33a895663c 感谢 !!