I have this code when I'm creating my popup
val width = ConstraintLayout.LayoutParams.MATCH_PARENT
The popup is showing up and have a full width as wanted. But for some reasons the width variable gets assigned -1 and I use that variable to populate other things in the popup so they get an negative width and don't show up. How come this gives back -1 when the popup gets full width?