Alert dialog dismissed while rotating phone in android -
i had give permission in manifest activities in app activity re-starting while rotating phone. restart dismissing alert box, again calling web server fetching data , activity maintain previous state. had tried possibilities can not solution. how can fix issue?
@override public void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); requestwindowfeature(window.feature_no_title); setcontentview(r.layout.station_list_layout); constantvalues.current_activity=stationlistactivity.this; constantvalues.nearest_place_menu_slider_flag=false; constantvalues.message_menu_slider_flag=false; constantvalues.station_list_menu_slider_flag=true; orientation=getresources().getconfiguration().orientation; userandmessagecount=new userandmessagecount(); ((textview)findviewbyid(r.id.stationlist_route_name)).settext(constantvalues.route_name); list = (listview) findviewbyid(r.id.mylistview); cursor cursor=new updatelocaldatabase().getstationnamebyroute(); adapter=new stationlistadapter(stationlistactivity.this, cursor); adapter.notifydatasetchanged(); if(!constantvalues.station_list_loated) userandmessagecount.execute(); else { footer.setmsgcount(constantvalues.msg_count); footer.setusercount(constantvalues.favorite_station_list.size()); list.setadapter(adapter); } } <activity android:configchanges="orientation|keyboardhidden" android:screenorientation="unspecified" android:name=".launchingpageactivity" android:label="@string/app_name"> <intent-filter> <action android:name="android.intent.action.main" /> <category android:name="android.intent.category.launcher" /> </intent-filter> </activity>`
android:configchanges="keyboardhidden|orientation|screensize"
add activity element in manifest
like
<activity android:configchanges="orientation|keyboardhidden|screensize" android:screenorientation="unspecified" android:name=".launchingpageactivity" android:label="@string/app_name"> <intent-filter> <action android:name="android.intent.action.main" /> <category android:name="android.intent.category.launcher" /> </intent-filter> </activity>`
Comments
Post a Comment