я надуть раскладку, которые имеют новые флажков каждый раз, когда я закладки кнопки, как я могу сохранить состояние и (ключи, значение) эти флажков, и когда я надуть снова получить эти состояния, общие настройки могут сделать это или я должен использовать базу данных SQLite?сохранить sharedPreferences раздувает флажки
Это расположение, о котором я говорю.
<?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>
Использование 'SharedPreferences' –
@Greengoblin как? – Shivo
Проверьте мой ответ –