MVVM模式下左上角出现小白点

图1


左上角出现小白点

只要是布局里面有滑动的空间开始滑动,有时候不滑动也会出现这种问题

<?xml version="1.0" encoding="utf-8"?>

<layout xmlns:android="http://schemas.android.com/apk/res/android"

xmlns:app="http://schemas.android.com/apk/res-auto">

<RelativeLayout

    android:layout_width="match_parent"

    android:layout_height="match_parent"

    android:background="@drawable/sing_bg"

    android:padding="@dimen/dp_16">....</RelativeLayout>

</layout>

因为RecyclerView我使用的是BaseQuickAdapter做的适配,刚开始还以为是这个控件的原因,后来自己写了左滑加载更多的控件,还是出现相同的问题,然后就开始重新查找问题

布局里面有使用ConstraintLayout空间,还以为是这个控件的原因,结果全部换成了LineatLayout 和RelativeLayout还是不行,后来我在外面包了一层LinearLayout 就好啦

xmlns:app="http://schemas.android.com/apk/res-auto">

<LinearLayout>

<RelativeLayout

    android:layout_width="match_parent"

    android:layout_height="match_parent"

    android:background="@drawable/sing_bg"

    android:padding="@dimen/dp_16">....</RelativeLayout>

</LinearLayout>

</layout>

©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容