I want to resize image view according to screen resolution and size. How to do it? I searched android development tutorials.. but it is useless.. pls help.. It's for my mini project..
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
You can try to scale the image to X,Y coordinates by setting:
android:scaleType="fitXY"
property.
回答2:
By default, Android
maintain multiple folders for the images with different resolutions. Reason behind that is the resolution of the Android Device on which the application is gonna run.
hdpi - maintain images for the Android Broad Screen set or Android Phones with the Higher resolution.
ldpi - for Lower images quality.
mdpi - for medium images support.
xhdi - images folder for devices with maximum resolution.
Android OS will select the image itself by checking the compatible device and its resolution. Hope this helps your cause.