1

I have problem with measuring height of box. I got two boxes (overlayed) :

enter image description here

One is displaying text etc and second box is when settings buttons will be clicked.

I got problem like a photo below

enter image description here

   holder.local_normal_box.measure(View.MeasureSpec.UNSPECIFIED, View.MeasureSpec.UNSPECIFIED)
    var height: Int = holder.local_normal_box.getMeasuredHeight()

    holder.local_settings_box.maxHeight = height
    holder.local_settings_box.minHeight=height

Blue overlay is settings box.

fariji1294
  • 41
  • 8

1 Answers1

0

Use ConstraintLayout instead of LinearLayout. It is the layout recently recommended by Google

Noah
  • 567
  • 5
  • 21