如何为Android Activity设置背景图片?
16lz
2021-01-23
1,背景图片资源:放在工程目录\res\drawable,命名为bk.png
2,修改main.xml
<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@drawable/bk" ><TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/hello" /></LinearLayout>
3,效果图
更多相关文章
- android 背景图片设置
- Android中欢迎界面背景图片放大效果
- 背景图片颜色渐变
- Android中View(视图)绘制不同状态背景图片原理深入分析以及State
- Android根据Button状态(normal,focused,pressed)显示不同背景图
- ListView有背景图片或背景颜色,那么在滑动ListView的时候,ListView
- Android之背景图片设置为重复而不是默认的拉伸
- Android 背景图片重复平铺
- Android基础小技术点:Android ListView设置背景图片及分割线、周