FlowLayout icon indicating copy to clipboard operation
FlowLayout copied to clipboard

margin child doesn' t take effect

Open augustopicciani opened this issue 9 years ago • 1 comments

If I have structure like this:

FlowLayout [ LinearLayout->TextView + ImageView]

What I have to do to set margin to a LinearLayout? I tried something like sample in your project: FlowLayout.LayoutParams params = new FlowLayout.LayoutParams(FlowLayout.LayoutParams.wrap_content,FlowLayout.LAyoutParams.wrap_Content); params.rightMargin = 10; LinearLayout.setLayoutParams(params)

but nothing happened. If I use LinearLayout.LayoutParams it return a cast exception.

Can u please give me an help? Thanks.

augustopicciani avatar Jul 08 '15 15:07 augustopicciani

Hi,

Had a similar issue. Solved it by wrapping the LinearLayout in a FrameLayout (keeping the margins on the LinearLayout.

Harald K

haraldk avatar Dec 18 '15 12:12 haraldk