I'm trying to put a background image for my app. I used two images for landscape view and portrait view.
I went through this question answers and it didn't help.
Here's my portrait view background.
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/scrollView1" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@drawable/background" > Here's my landscape view background.
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/scrollView1" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@drawable/background_land"> When I load my app in the portrait view, portrait background view displays and when I change the orientation to landscape the same portrait image stretches and displays. but, when I load the app in landscape view, landscape background view displays.
What should I do to change the background image when we change the orientation.
- Edit -
Activity from manifest.
<activity android:name="com.NICT.nict.LoginActivity" android:configChanges="orientation|screenSize" android:label="@string/app_name" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity>