mkojadinovic
07/25/2017, 9:21 AMcardView(){
lparams(height = wrapContent, width = matchParent){
}
}
And it looks like there is no lparams here. But if I do something like
verticalLayout(){
cardView(){
lparams(height = wrapContent, width = matchParent){
}
}
}
it is there. So it looks like I can’t use cardView like root view?miha-x64
07/25/2017, 9:31 AMit looks like there is no lparams hereWhat do you mean? No such method? That’s because
lparams
methods are declared inside _LinearLayout
, _RelativeLayout
, _FrameLayout
and so on. You can’t use lparams
on any root view, try using explicit layoutParams = SomeLayout.LayoutParams(...)
.mkojadinovic
07/25/2017, 9:34 AMmkojadinovic
07/25/2017, 9:40 AMmkojadinovic
07/25/2017, 9:40 AMbicx
07/26/2017, 6:17 PM