How do you setLayoutParams() for an ImageView?

Posted by DeadTime on Stack Overflow See other posts from Stack Overflow or by DeadTime
Published on 2010-06-03T11:57:03Z Indexed on 2010/06/03 12:24 UTC
Read the original article Hit count: 282

Filed under:
|
|
|

I want to set the LayoutParams for an ImageView but cant seem to find out the proper way to do it.

I can only find documentation in the API for the various ViewGroups, but not an ImageView. Yet the ImageView seems to have this functionality.

This code doesn't work...

myImageView.setLayoutParams(new ImageView.LayoutParams(30,30));

How do I do it?

© Stack Overflow or respective owner

Related posts about android

Related posts about beginner