ログイン画面の背景画像用JSONに画像URLが解析されるスプラッシュ画面の時点で解析しました。ログイン画面のサンプルコードは次のとおりです。XML
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/loginLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/background_bg" <!-- I want to change this background dynamically. -->
android:focusableInTouchMode="true"
android:gravity="center"
tools:context=".activity.LoginActivity" >
<ScrollView
android:id="@+id/mainScrollView"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<!-- .... Here is edit text for login inputs and buttuns for singnup and login. -->
</LinearLayout>
</ScrollView>
</RelativeLayout>
上記では、背景に静止画像を配置しましたRelativeLayoutが、画像のURLに従って背景を変更できるようにしたいと考えています。
前もって感謝します。