[英]Background image for button not loading in android
I have an android application with a main menu containing buttons with a background image 我有一个Android应用程序,其主菜单包含带有背景图片的按钮
Code: 码:
<Button
android:id="@+id/button1"
android:layout_width="300sp"
android:layout_height="45sp"
android:background="@drawable/aqua"
android:text="This is a button"
android:textColor="#FFFFFF"
/>
The image loads up in android above 5.0 but does not load up in android Kitkat and jellybean. 该图片会在高于5.0的android系统中加载,但不会在android kitkat和jellybean中加载。 I'm using android studio.
我正在使用android studio。
consider using a lower resolution drawable. 考虑使用较低分辨率的绘制对象。 it might just be that your file size is too big
可能只是您的文件太大
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.