开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜