Git Product home page Git Product logo

Comments (4)

LillteZheng avatar LillteZheng commented on June 1, 2024

贴图和代码哈

from flowhelper.

Neroliuxx avatar Neroliuxx commented on June 1, 2024

1637889942(1)
代码就是很普通的父控件是NestedScrollView,子控件包含了多个LableFlowLayout,截图的这些空白区域应当是无法占满一行进行换行后留下的空白,无法在这些地发触发滑动操作,有数据的地方是可以的。

from flowhelper.

LillteZheng avatar LillteZheng commented on June 1, 2024

这个确实没办法,LabelFlowLayout 会根据子控件去测量父布局的宽度,空白部分 不属于,LabelFlowLayout ,而是属于 NestedScrollView.
或者你可以在 labelFlowLayout 再套一层,再进行滑动

from flowhelper.

YangShaoXiong avatar YangShaoXiong commented on June 1, 2024

看源码,作者在ScrollFlowLayout中的onTouchEvent方法做了事件拦截,所以会导致NestedScrollView无法滑动。可以考虑覆盖LabelFlowLayout中onTouchEvent方法来解决滑动冲突的问题,这种解决办法有没有什么后遗症还有待观察。期待作者提供完美解决方案

class FixedLabelFlowLayout @JvmOverloads constructor(
    context: Context, attrs: AttributeSet? = null
) : LabelFlowLayout(context, attrs) {

    override fun onTouchEvent(event: MotionEvent?): Boolean {
        return false
    }
}

from flowhelper.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.