/android/import-contacts

To get this branch, use:
bzr branch http://bzr.ed.am/android/import-contacts

« back to all changes in this revision

Viewing changes to src/org/waxworlds/importcontacts/Merge.java

  • Committer: edam
  • Date: 2009-01-10 16:14:11 UTC
  • Revision ID: edam@waxworlds.org-20090110161411-4d17l9hs9d6j277q
Initial import

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
package org.waxworlds.importcontacts;
 
2
 
 
3
import android.content.SharedPreferences;
 
4
import android.os.Bundle;
 
5
import android.widget.RadioGroup;
 
6
 
 
7
public class Merge extends WizardActivity
 
8
{
 
9
        @Override
 
10
        protected void onCreate( Bundle savedInstanceState )
 
11
        {
 
12
                setContentView( R.layout.merge );
 
13
                super.onCreate( savedInstanceState );
 
14
 
 
15
                setNextState( ImportContacts.STATE_DOIT );
 
16
        }
 
17
 
 
18
        @Override
 
19
        protected void onPause()
 
20
        {
 
21
                super.onPause();
 
22
 
 
23
                SharedPreferences.Editor editor = getSharedPreferences().edit();
 
24
 
 
25
                // radio button selection
 
26
                RadioGroup rg = (RadioGroup)findViewById( R.id.merge_setting );
 
27
                editor.putInt( "merge_setting", rg.getCheckedRadioButtonId() );
 
28
 
 
29
                editor.commit();
 
30
        }
 
31
 
 
32
        @Override
 
33
        protected void onResume()
 
34
        {
 
35
                super.onResume();
 
36
 
 
37
                SharedPreferences prefs = getSharedPreferences();
 
38
 
 
39
                // radio button selection
 
40
                RadioGroup rg = (RadioGroup)findViewById( R.id.merge_setting );
 
41
                rg.check( prefs.getInt( "merge_setting", R.id.merge_prompt ) );
 
42
        }
 
43
 
 
44
 
 
45
}