hi again .. i want to create a fragment with 300d...
# anko
y
hi again .. i want to create a fragment with 300dp width and 200dp height..how can i create that? I have tried like this but the fragments are still
match parents
in view pagers
Copy code
class LoginUI:AnkoComponent<Fragment>{
        override fun createView(ui: AnkoContext<Fragment>): View {
         return ui.apply{
                  verticalLayout {
                      lparams(width = dip(300), height = dip(200))

                      cardView {
                          id = R.id.login_card
                          cardElevation = dip(8).toFloat()
                          radius = dip(10).toFloat()
                          verticalGravity = Gravity.BOTTOM
                          horizontalGravity = Gravity.CENTER_HORIZONTAL
                          cardBackgroundColor = AppCompatResources.getColorStateList(context, R.color.cardview_light_background)


                      }

                  }


          }.view
        }
    }
Slack Conversation