bnuvincent

我不晓得一般是怎么做的,但是至少可以用两种方法,一种是用一个全屏的ImageView来当作背景,通过修改imageview来修改背景图片,一种是将你xml中最外层的那个布局,LinerLayout之类的,添加id属性,在程序中通过这个来setbackgroundResource。

 

 

我添加了没问题啊。<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:id="@+id/bg"
    >
而且,我直接用        HelloWorld.this.getWindow().setBackgroundDrawableResource(R.drawable.icon);getWindow也可以实现,前面的HelloWorld是当前Activity的名称

分类:

技术点:

相关文章:

  • 2021-12-05
  • 2021-10-21
  • 2021-12-27
  • 2021-12-21
  • 2021-05-29
  • 2021-09-07
  • 2022-12-23
猜你喜欢
  • 2022-01-11
  • 2021-10-17
  • 2022-02-08
  • 2022-12-23
  • 2022-02-09
  • 2021-12-24
  • 2021-07-31
相关资源
相似解决方案