简体   繁体   English

如何防止墙纸被缩放

[英]How do I prevent wallpaper from being zoomed

At Last I found one problem on setting the Image as wallpaper the image gets zoomed in.. Here is the screen shot of the image selection i made inside the app(First pic) after setting it has Wallpaper it appears like this(Second pic) 最后,我发现了将图像设置为放大图像的墙纸时遇到的一个问题。这是我在应用程序(第一个图片)中设置了墙纸后选择的图像的屏幕截图(第二个图片)

在此处输入图片说明 在此处输入图片说明

The code for this is: 的代码是:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:background="@color/background"
android:layout_height="match_parent" >

<ImageView
    android:id="@+id/image"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_gravity="center"
    android:adjustViewBounds="true"
    android:contentDescription="@string/desc" />

<ProgressBar
    android:id="@+id/loading"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_centerHorizontal="true"
    android:layout_centerVertical="true" />

that was not what i selected. 那不是我选择的。 Everything is zoomed in, any Help? 一切都放大了,有帮助吗? if anything else needed please tell me to upload it,thanks 如果还有其他需要,请告诉我上传,谢谢

Try adding this 尝试添加这个

android:scaleType="fitCenter"

also perhaps removing layout gravity center. 也可能删除布局重心。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何防止我的相机在 LibGDX 中延迟? - How do I prevent my camera from being delayed in LibGDX? 如何防止imageview中的图像被裁剪为正方形? - How do I prevent images in imageview from being cropped to a square? 墙纸问题,按设置背景时图片放大 - Wallpaper issue, picture is zoomed in when i press set background 当设备水平放置时,如何防止android布局变为水平/横向 - How do i prevent my android layout from turning horizontal/landscape when the device is being held horizontally 如何防止maven创建的ZIP文件被部署? - How do I prevent a ZIP file created by maven from being deployed? 如何防止在CXF Web服务客户端中生成JAXBElement <String>? - How do I prevent JAXBElement<String> from being generated in a CXF Web Service client? 当用户单击标题时,如何防止对Java Swing JTable列进行排序? - How do I prevent a Java Swing JTable column from being sorted when the user click on the header? 如何防止新注册的账户被自动登录? - How do I prevent newly registered accounts from being automatically signed in? 如何防止我的文本区域(专门输入类型的电子邮件)不被填充 - How do I prevent my text area (excually input type email) from not being filled Java:如何防止使用条件语句将重复项添加到ArrayList中? - Java: How do I prevent duplicates from being added to ArrayList using conditional statement?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM