ApmeM / android-flowlayout

Linear layout, that wrap its content to the next line if there is no space in the current line.
2.03k stars 370 forks source link

Support for TextView and Edit Text #72

Open nagaprakash2020 opened 8 years ago

nagaprakash2020 commented 8 years ago

I tried your library with combination of TextViews and Edit Texts. TextView spans multiple lines followed by Edit Text and this can be followed by another Edit Text or Text View.

Example: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus sed elit elementum, maximus tortor id, vulputate urna. Ut ultricies magna vel leo pretium rhoncus. __ Lorem ipsum dolor sit amet, consectetur _____ __.

That is what I am trying to achieve. Do you think that can be done using your library ?

DavidDTA commented 8 years ago

I expect that what you're seeing is something like

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus sed elit elementum, maximus tortor id, vulputate urna. Ut ultricies magna vel leo pretium rhoncus. __ Lorem ipsum dolor sit amet, consectetur _____ __.

with an unexpected line break after rhoncus. If that's the case, what's happening is that the entire TextView is being laid out as a block, and the EditText is wrapping since the block fills the entire line. The issue can be avoided by splitting up the TextView into many smaller ones with one word each. This allows the FlowLayout to work with many small rectangles rather than one big one.

nagaprakash2020 commented 8 years ago

That is a good idea. I will try it. Thanks for your quick response.