I have a little problem. As you know, the
     addPreferencesFromResource(R.xml.mypreference);
is deprecated. How can I store checkbox preferences so that a user can see the checkbox the next time he starts the application ?
TOTAL NOOB HERE. my activity which has the checkboxes:
    package com.example.program;
    import com.example.program.R;
    import android.os.Bundle;
    import android.app.Activity;
    import android.content.Intent;
    import android.view.Menu;
    import android.view.View;
    import android.widget.Button;
    import android.widget.CheckBox;
    import android.view.View.OnClickListener;
    public class JourneyActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.journey_select);
    final CheckBox checkBox = (CheckBox) findViewById(R.id.checkBox1);
    if (checkBox.isChecked()) {
        checkBox.setChecked(false);
    }
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
    // Inflate the menu; this adds items to the action bar if it is present.
    getMenuInflater().inflate(R.menu.main, menu);
    return true;
}
}
my program.xml file:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/menu1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/bg"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context=".JourneyActivity" >
<CheckBox
    android:id="@+id/checkBox1"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignLeft="@+id/textView2"
    android:layout_below="@+id/textView2"
    android:text="@string/done1"
    android:textColor="@color/red" />
    </RelativeLayout>
Ignore possible errors in xml file. So, how do I store the "click" when a user clicks my checkBox1 in the activity ?
THANK YOU.
 
    