0

I'he tried for this answer but its disappears my view on change orientation.

thanks for help

Community
  • 1
  • 1
Ankit
  • 483
  • 7
  • 24

1 Answers1

1

You just need to create a Fragment class, call it from Activity.Then create layout-land folder,put same layout file in both layout and layout-land folder.Now you can use background according to your requirement for portrait and landscape mode. In Manifest

<activity android:name="com.example.MainActivity" >

You don't need to use onConfigurationChanged() for this operation,this will automatically call xml from layout in portrait mode and from layout-land in landscape mode.

Dilip
  • 2,271
  • 5
  • 32
  • 52