How to preserve scroll position in an ExpandableListView

后端 未结 4 567
走了就别回头了
走了就别回头了 2021-01-31 21:44

in my app I have a class derived from ExpandableListActivity. When I scroll the contents, and then change phone orientation or edit an item and then go back to the list, the ori

4条回答
  •  天命终不由人
    2021-01-31 22:11

    To prevent a reload of your activity when changing phone orientation, simply add the following line to your AndroidManifest.xml in the activity section:

            android:configChanges="keyboardHidden|orientation|screenSize" 
    

提交回复
热议问题