Imageview.setMaxHeight is working wrong
Hy!
I download a picture from the internet and want to display it. The height should be 1/6 of the max screen height (for multi phone support)
Code:
final ImageView iv = (ImageView) findViewById(R.id.ImageView01);
iv.setMaxHeight(getWindowManager().开发者_JAVA技巧getDefaultDisplay().getHeight()/6);
Please help!
Try using the layout_weight
attribute of LinearLayout
to divide the screen into the parts you need. The ratio of the values you set to the different parts makes the parts become bigger or smaller.
精彩评论