我是一个业余的android程序员,我试图设计我的应用程序。我从网上找到了一张照片,这里是link。我想将其设置为应用程序的背景。我会这样做。我真的不明白@ drawable/background的概念,它是如何工作的,我该怎么办?Android应用程序的背景图像
0
A
回答
2
设置你的照片到res/drawable
文件夹更多的可绘制。然后在你的布局文件(layout/main.xml
)高problably作为默认的项目添加此图像视图
<ImageView
android:id="@+id/myImageView"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_alignParentLeft="true"
android:scale_type="center_crop"
android:layout_alignParentTop="true" android:src="@drawable/your_picture_name"/>
但切勿将您的图片的文件扩展。只有文件名。对于 示例如果您的图片全名BEATIFULL_CAR .JPG
只能添加 BEATIFULL_CAR
0
- Drawable是Android项目中的资源文件夹,您可以在其中通过不同的数据。
如果你想在绘制对象文件夹中使用任何图像作为背景复制/粘贴,并 使用属性
android:background="@drawable/your_image_name"
在layout_main.xml 作为<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@drawable/your_picture_name" android:gravity="center_vertical|center_horizontal"
完蛋了。
你可知道在这个Link
相关问题
- 1. Windows Phone应用程序背景图像
- 2. Android应用程序背景
- 3. Android背景应用程序
- 4. Android应用程序中的背景图像的最小尺寸
- 5. 如何更改Android应用程序的背景图像?
- 6. 将图像设置为Android应用程序中的背景
- 7. 如何为android应用程序包含背景图像
- 8. 背景图像在android应用程序中似乎很小?
- 9. 设置Android应用程序背景图像
- 10. Android背景图像
- 11. Android应用程序的视频背景
- 12. 赶上Android应用程序的背景
- 13. 如何显示iPhone应用程序的背景图像或前景图像
- 14. 更改和谐绘图应用程序的背景图像
- 15. iOS应用背景图像
- 16. Android:检测应用程序背景
- 17. Android - 设置应用程序背景
- 18. Android应用程序:背景拉伸
- 19. Android应用程序背景分辨率
- 20. Android中没有背景应用程序
- 21. Android应用程序自定义背景
- 22. 适用于iOS应用程序背景的多个图像
- 23. 用于Java2D应用程序的复杂背景图像
- 24. 背景中的矢量图像崩溃的应用程序
- 25. Java小程序中的背景图像
- 26. 拍摄背景中运行的应用程序的截图 - android
- 27. 试图闪烁我的Android应用程序的背景颜色
- 28. Android编程作物背景图像
- 29. TableView背景iPad应用程序中的图像
- 30. iPhone应用程序启动不同背景的图像
我看到多个可绘制文件夹。一个位于res和bin> res – user1842633 2013-03-06 18:33:50
@ user1842633使用** res/drawable ** – hakiko 2013-03-06 18:35:34
我试图添加文件,但它给了我这个:[2013-03-06 14:24:03 - MyApp] res \ drawable-hdpi \ NWHS_JAG.png:无效的文件名:只能包含[a-z0-9_。] – user1842633 2013-03-06 19:27:01