android-flowlayout icon indicating copy to clipboard operation
android-flowlayout copied to clipboard

When RecyclerView layout_height set to wrap_content, there will be nothing show on the screen.

Open pzhangleo opened this issue 8 years ago • 3 comments

in FlowLayoutManager this.config.setMaxWidth(this.getWidth() - this.getPaddingRight() - this.getPaddingLeft()); this.config.setMaxHeight(this.getHeight() - this.getPaddingTop() - this.getPaddingBottom()); this.config.setWidthMode(View.MeasureSpec.EXACTLY); this.config.setHeightMode(View.MeasureSpec.EXACTLY); this.config.setCheckCanFit(true); setMaxHeight always get 0. And when i set a exactly height in xml, the content can not scroll when the recyclerview is bigger than its parent. Can you please tell how to solve this? Thank you very much.

pzhangleo avatar Mar 18 '16 09:03 pzhangleo

Same thing here

liyiheng avatar May 05 '16 15:05 liyiheng

[SOLUTION ] Hey, I had the same problem @pzhangleo @XanthusL, solved it by putting setAutoMeasureEnabled(true) in the constructor of the FlowLayoutManager, i.e. public FlowLayoutManager() { this.config = new ConfigDefinition(); setAutoMeasureEnabled(true); }

Hopefully this can help someone else stuck on this as well, it's a relatively simple solution!

BrandonJF avatar Nov 21 '16 22:11 BrandonJF

@BrandonJF I added setAutoMeasureEnabled(true) in the FlowLayoutManager's constructor... It still isn't working... Can you elaborate a li'l more over this..

KanikaKachhawaha avatar Jul 10 '17 09:07 KanikaKachhawaha