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. Changes not affecting layout?

I've got two buttons, editEndDate and editEndTime, in a table row.
editEndDate takes up 25% of the row while the rest is taken up by
editEndTime.  I want the reverse, but nothing I do seems to make any
difference (this is why I hate CSS too!).  Here's the XML:

<TableRow
android:id="@+id/widget62b"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
    <Button
    android:id="@+id/editEndDate"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:textSize="18sp"
    android:layout_alignParentLeft="true"
    android:layout_weight="20"
    >
    </Button>
    <Button
    android:id="@+id/editEndTime"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:textSize="18sp"
    android:layout_alignParentRight="true"
    android:layout_weight="2"
    android:layout_toRightOf="@id/editEndDate"
    >
    </Button>
</TableRow>

You can see that editEndDate should be ridiculousl larger than editEndTime
but the same 25/75 ration exists.

What gives?

-- 

Faber Fedor
Cloud Computing New Jersey
http://cloudcomputingnj.com

--~--~---------~--~----~------------~-------~--~----~

2. Traceview only shows old data

I ran a trace on my app using the Debug class, but it seems the new
trace data isn't loaded by Traceview and somehow only the old data is
shown. I've recreated the sdcard, wiped the emulator and created a new
launch config (in Eclipse). I also changed my package name but
traceview still shows the old data with the old package name. Logcat
shows it writes the data fine to /sdcard but for some reason, the new
info isn't shown.

Any ideas what would cause this?

--~--~---------~--~----~------------~-------~--~----~

3. image resolution

4. Low on spac

5. Bundle getting lost after send

6. JSON easy Marshall/Unmarshall

7. my app sometimes take <1 second to load, sometimes 50 seconds