Android在页面设置背景图片

Android在页面设置背景图片

在页面上设置背景,不需要在布局中设置。
在onCreate方法中加入代码:

this.getWindow().setBackgroundDrawableResource(R.drawable.a);

R.drawable.a为res资源文件夹下的资源图片a

猜你喜欢

转载自blog.csdn.net/weixin_42574892/article/details/106255435