android - Imageview.setMaxHeight is working wrong -


hy!

i download picture internet , want display it. height should 1/6 of max screen height (for multi phone support)

code:

final imageview iv = (imageview) findviewbyid(r.id.imageview01);  iv.setmaxheight(getwindowmanager().getdefaultdisplay().getheight()/6); 

please help!

try using layout_weight attribute of linearlayout divide screen parts need. ratio of values set different parts makes parts become bigger or smaller.


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -