I display an image using the ImageView container. the image should be resized when the user enters a specific value and clicks on the update
resizing just for display, the original resource remains as it is. NO editing, saving, etc.
xml layout
<ImageView android:background="@drawable/picture01" android:id="@+id/picture01holder" android:layout_below="@+id/TextView01" android:layout_height="wrap_content" android:layout_width="wrap_content" </ImageView>
main.java
final ImageView pic01 = (ImageView)findViewById(R.id.picture01);
Now, what am I doing to dynamically assign this pic01 of my choice. just a function, I can implement it inside the button myself. I believe that I need to use something like pic01.setLayoutParams, but I do not know how to use it.
Basically I want to overwrite layout_height = "wrap_content" and layout_width = "wrap_content" in .java
kasai source share