For some weird reason it loses it's LayoutParams a...
# anko
s
For some weird reason it loses it's LayoutParams and I have to explicitly set them again.
Copy code
view = context.include<ConstraintLayout>(R.layout.recent_item_card).apply {
    layoutParams = ConstraintLayout.LayoutParams(ConstraintLayout.LayoutParams.MATCH_PARENT, ConstraintLayout.LayoutParams.WRAP_CONTENT).apply {
                setMargins(dip(8),dip(5),dip(5),dip(8))
    }
}