how to set image's top and bottom in same size for android?

╄→гoц情女王★ 提交于 2019-12-24 00:59:50

问题


I want to display image in center and top and bottom in same size refer bellow screens,anybody know please give the code to me... Thanks All


回答1:


Use

android:scaleType="centerInside"

or

ImageView.setScaleType(ImageView.ScaleType.CENTER_INSIDE)



来源:https://stackoverflow.com/questions/3653431/how-to-set-images-top-and-bottom-in-same-size-for-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!