ボタンにタブを付けるたびに新しいチェックボックスを持つレイアウトを膨張させます。これらのチェックボックスの状態と(キー、値)を保存するにはどうすればよいですか。また、膨張させたときに再びこれらの状態を取得すると、共有設定でそれを行うことができます。 SQLite データベースを使用しますか?
これは私が話しているレイアウトです。
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal" android:layout_width="match_parent"
android:layout_height="wrap_content"
>
<CheckBox
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:id="@+id/checkBox"
style="?android:attr/starStyle"
android:layout_alignBottom="@+id/teamTextView"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true" />
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:id="@+id/teamTextView"
android:layout_centerVertical="true"
android:layout_toRightOf="@+id/LogoImageView"
android:layout_toLeftOf="@+id/checkBox"
android:layout_toStartOf="@+id/checkBox"
android:gravity="center"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginTop="2dp"
android:background="#d3d3d3" >
</LinearLayout>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/LogoImageView"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
</RelativeLayout>