我的应用有一个背景,应该在某些事件发生后更改。那么,我该怎么做呢?如何更改Android应用程序中的背景图像?
的main.xml:
<AbsoluteLayout
android:id="@+id/widget0"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android"
android:background="@drawable/bg">
有背景应改为:
if(a<b) *change background to bg2.jpg goes here*
帮助,请与遗憾,我的英语
强烈不建议使用AbsoluteLayout。 – PravinCG