/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/edam/importcontacts/WizardActivity.java

  • Committer: edam
  • Date: 2011-05-05 21:49:43 UTC
  • Revision ID: edam@waxworlds.org-20110505214943-bg0cn6qz0gr49dlk
- updated TODO
- made varibale names consistent (camelCaseVariables now_use_underscores)

Show diffs side-by-side

added added

removed removed

26
26
import android.app.Activity;
27
27
import android.content.Intent;
28
28
import android.content.SharedPreferences;
 
29
import android.content.res.Configuration;
29
30
import android.os.Bundle;
30
31
import android.view.View;
31
32
import android.widget.Button;
32
33
 
33
34
public class WizardActivity extends Activity
34
35
{
35
 
        private Class< ? > _nextClass;
 
36
        private Class< ? > _next_class;
36
37
 
37
38
        @Override
38
 
        protected void onCreate( Bundle savedInstanceState )
 
39
        protected void onCreate( Bundle saved_instance_state )
39
40
        {
40
 
                super.onCreate( savedInstanceState );
 
41
                super.onCreate( saved_instance_state );
41
42
 
42
43
                // enable back button based on intent data
43
44
                Bundle extras = getIntent().getExtras();
62
63
        }
63
64
 
64
65
        @Override
65
 
        protected void  onActivityResult( int requestCode, int resultCode, Intent data )
 
66
        protected void onActivityResult( int request_code, int result_code,
 
67
                Intent data )
66
68
        {
67
 
                if( resultCode == RESULT_OK ) {
 
69
                if( result_code == RESULT_OK ) {
68
70
                        setResult( RESULT_OK );
69
71
                        finish();
70
72
                }
75
77
                // create bundle with back enabled state
76
78
                Bundle bundle = new Bundle();
77
79
                bundle.putBoolean( "back-enabled", true );
78
 
                Intent i = new Intent( this, _nextClass );
 
80
                Intent i = new Intent( this, _next_class );
79
81
                i.putExtras( bundle );
80
82
 
81
83
                // start next activity
90
92
 
91
93
        protected void setNextActivity( Class< ? > cls )
92
94
        {
93
 
                _nextClass = cls;
 
95
                _next_class = cls;
94
96
 
95
97
                // enable next button
96
98
                ( (Button)findViewById( R.id.next ) ).setEnabled( true );
100
102
        {
101
103
                return super.getSharedPreferences( "ImportContacts", 0 );
102
104
        }
 
105
 
 
106
        @Override
 
107
        public void onConfigurationChanged( Configuration new_config ) {
 
108
                super.onConfigurationChanged( new_config );
 
109
        }
103
110
}