android - Screen orientation change not calling activity methods -


so there lots of posts on topic neither working in case.

orientation not calling method of activity.

i tried possible ways mentioned like:

putting android:configchanges="orientation|keyboardhidden|screensize" in calling activity.

then putting onconfigurationchanged method as:

@override     public void onconfigurationchanged(configuration conf) {         super.onconfigurationchanged(conf);         system.out.println("on onconfigurationchanged called..............");     } 

but not getting called.

oncreate(), onresume(), onrestoreinstancestate() methods not getting called when change screen orientation.

further, changed sdk versions , target versions without success.

update:

my part of activity manifest activity is:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"     package="com.wassap.main"     android:versioncode="1"     android:versionname="1.0" >    <uses-sdk     android:minsdkversion="8"     android:targetsdkversion="16"/>          <activity             android:name=".useractivity"             android:label="@string/app_name"              android:launchmode="singletask"              android:configchanges="orientation|keyboardhidden|screensize" >         </activity> 

relevant useractivity xml-

           <linearlayout              android:layout_width="fill_parent"              android:layout_height="fill_parent"              android:orientation="horizontal"              android:clickable="true"                              android:onclick="builddocument">             <textview              android:id="@+id/title"              android:layout_width="wrap_content"              android:layout_height="wrap_content"              android:text="build document">            </textview>         </linearlayout> 

useractivity class class in orientation after onclick builddocument.

when in useractivity, click of builddocument, noticed destroy() method not called when go back clicking on button.

all in all, no life cycle method seems getting called.

finally got right. there call other activity inside user activity started , current activity not concerned 1 taken account orientation. in other activity, added logger check orientation change , working fine.


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

javascript - Clean way to programmatically use CSS transitions from JS? -

android - send complex objects as post php java -