我的應用有一個背景,應該在某些事件發生後更改。那麼,我該怎麼做呢?如何更改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