I want to restore my orientation in fragment.
<p>I am using onSaveInstanceState(Bundle outState) and  passing a int value in PutInt , but in my onActivitycreated method  when i am trying to getInt then it is showing exception saying , Key android:view_state expected Bundle but value was a android.util.SparseArray.  The default value  was returned.</p>

<pre><code>public void onActivityCreated(Bundle savedInstanceState) {
        super.onActivityCreated(savedInstanceState);
        mListView = getListView();
        getListView().setChoiceMode(ListView.CHOICE_MODE_SINGLE);
        if (savedInstanceState !=null) {
            mCheckedPosition = savedInstanceState.getInt(STATE_CHECKED_POSITION, -1);
         }
..................
</code></pre>

<p>Here i am sending the value . it is fine here. problem is in when i am getting it.</p>

<pre><code> @Override
        public void onSaveInstanceState(Bundle outState) {
            super.onSaveInstanceState(outState);
            outState.putInt(STATE_CHECKED_POSITION, mCheckedPosition);
            Log.d(AppConstants.TAG,"STATE_CHECKED_POSITION"+mCheckedPosition );
        }
</code></pre>
