2012-03-17 15 views
1

Androidアプリケーションの開発を始めたばかりですが、さまざまなアクティビティ要素を試してみるうちに次の問題が発生しました。私は私のメインアクティビティで次のコードを持っています。オリエンテーションを変更するとTimePickerがクリアされます

<TableLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:id="@+id/mainLayout" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" > 

    <TableRow 
     android:id="@+id/row1" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" > 

     <TimePicker 
      android:id="@+id/timePicker1" 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" /> 

    </TableRow> 

</TableLayout> 

ただTimePickerでのアクティビティです。私の問題は、モバイルデバイスの向きを変更するたびにTimePickerの時間選択が空白になり、LogCatに次のエラーが生成されることです。

Saved cursor position 2/2 out of range for (restored) text 

答えて

関連する問題