About maintaining the state of the activity on orientation change

by ameya dandekar » Thu, 06 May 2010 13:49:11 GMT


Sponsored Links
 Hi....
  I am new to android....i m currently working on landscape mode for android
app in which i want to know
  how to maintain the state of the activity and views displayed on
orientation change i.e from portrait mode to landscape mode ?

Regards,
Ameya

--



Other Threads

1. code to call Android Music player Application

Dear sir,

I m an Android Developer but new to this field.

I stuck with some problem ,

Problem is==> how to call  "Android Music Player Application"  from my
android project.

please help me in this.

Thank you in Advance

-- 

2. how to get the subview in the GridView?

hi there,
Here is a GridView with custom ImageView in it.
How can i get the sub custom ImageView from the function
onItemClickListener ?
It will be crashed after i get the item.

onItemClickListener:
        videosView.setOnItemClickListener(new OnItemClickListener()
        {
            @Override
            public void onItemClick(AdapterView<?> parent, View view,
int position,
                    long id)
            {
                VideoItem item =
(VideoItem)view.findViewById(R.id.video_grid_item);
                if ( item != null )
                {
                    item.setOverlay(R.drawable.box);
                    Log.d(TAG, "item is not empty");
                    mVideoAdapter.notifyDataSetChanged();
                }

            }
        });

the  layout mail.xml:
        <LinearLayout android:id="@+id/topLayout"
           android:orientation="vertical"
           android:layout_width="fill_parent"
           android:layout_height="fill_parent"
           android:layout_weight="1.0">

        <GridView android:id="@+id/videoContent"
                android:drawSelectorOnTop="false"
                android:columnWidth="113dip"
                android:numColumns="auto_fit"
                android:cacheColorHint="#000000"
                android:background="#000000"
                android:listSelector="#000000"
                android:stretchMode="spacingWidthUniform"
                android:layout_width="fill_parent"
                android:layout_height="fill_parent"/>

<b>the gridviewItem.xml</b>
<LinearLayout
  xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="113dip"
  android:orientation="vertical"
  android:layout_height="wrap_content">

  <FrameLayout xmlns:android="http://schemas.android.com/apk/res/
android"
    android:orientation="vertical"
    android:layout_centerHorizontal="true"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content">

    <videoplayer.VideoItem
        android:id="@+id/video_grid_item"
        android:layout_width="105dip"
        android:layout_height="105dip"
        android:scaleType="centerCrop"
    />
  </FrameLayout>
</LinearLayout>

-- 

3. npapi plugin for android

4. NFC doubts. JSR 257 - 177

5. to startup with developing apps

6. use android media player native components at application layer

7. NFC Android