在Imageview中只有androidstudio没有在模拟器或手机中(Image in Imageview only androidstudio no in emulator or phone)

编程入门 行业动态 更新时间:2024-10-19 03:28:51
在Imageview中只有androidstudio没有在模拟器或手机中(Image in Imageview only androidstudio no in emulator or phone)

我对图像有一个疑问。

当我在2.2.0上使androidstudio工作后,如果我编辑xml文件,所有的imageview只能在androidstudio中生成图像。 但如果启动应用程序在genymotion或启动apk中的电话图像不显示。

<ImageView android:layout_height="40sp" app:srcCompat="@drawable/additem_button" android:id="@+id/imageView36" android:layout_weight="1" android:scaleType="fitXY" android:layout_width="51sp" android:layout_gravity="right" /> </FrameLayout>

我有在ldpi,mdpi,hdpi,xhdpi,xxhdpi,xxxhdpi中的所有图像,但我只启动应用程序xxhdpi手机,并没有新的图像浏览运行...请如何解决这个问题..谢谢..

I have a problmem with images.

After I ubdate androidstudio on 2.2.0 all imageview which build have image only in androidstudio if i editing xml file. but if start app in genymotion or launch apk in phone image not show.

<ImageView android:layout_height="40sp" app:srcCompat="@drawable/additem_button" android:id="@+id/imageView36" android:layout_weight="1" android:scaleType="fitXY" android:layout_width="51sp" android:layout_gravity="right" /> </FrameLayout>

I have all images in ldpi,mdpi,hdpi,xhdpi,xxhdpi,xxxhdpi, but I launch app only xxhdpi phones and run without new imageviews... please How resolve thise problem..Thanks..

最满意答案

我尝试这个并且运行良好。

<ImageView android:layout_height="40sp" android:src="@drawable/additem_button" android:id="@+id/imageView36" android:layout_weight="1" android:scaleType="fitXY" android:layout_width="51sp" android:layout_gravity="right" />

I try this and run good.

<ImageView android:layout_height="40sp" android:src="@drawable/additem_button" android:id="@+id/imageView36" android:layout_weight="1" android:scaleType="fitXY" android:layout_width="51sp" android:layout_gravity="right" />

更多推荐

本文发布于:2023-08-06 00:13:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1440875.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:模拟器   机中   androidstudio   Imageview   emulator

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!