Wednesday, January 29, 2014

How to set Width and Height for View Programmatically in Android

How to set Width and Height for View Programmatically in Android

This post about how to set the height and width for Imageview or Textview or Views programmatically . See below the example.

ImageView view = new ImageView(this);   
view.getLayoutParams().width =100;

view.getLayoutParams().height = 320;

No comments:

Post a Comment

Check out this may be help you

Related Posts Plugin for WordPress, Blogger...