android - How do I set the size of my Bitmap to WRAP_CONTENT and FILL_PARENT? -
android - How do I set the size of my Bitmap to WRAP_CONTENT and FILL_PARENT? -
right setting width , height staticly this:
mybitmap = bitmap.createbitmap(300, 400, bitmap.config.argb_8888); how can width fill_parent , height wrap_content
i have been looking online , confused options available. there's setlayoutparams(), onmeasure(), setminimumwidth(), etc....
can point me in right direction?
i making bitmap within custom view within main activity.
thanks
i create layoutparams this.
this or this might helpful.
edited, more detail:
layoutparams params = new layoutparams(layoutparams.match_parent, layoutparams.wrap_content); imageview iv = new imageview(this); iv.setimagebitmap(mybitmap); iv.setlayoutparams(params); customview.addview(iv); android view bitmap measure
Comments
Post a Comment