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

  • Committer: Tim Marston
  • Date: 2014-03-01 17:35:41 UTC
  • Revision ID: tim@ed.am-20140301173541-c1dg1u8hm2j2vy5q
bump version no. to 1.3.4 (and fixed some lint warnings)

Show diffs side-by-side

added added

removed removed

1
1
/*
2
2
 * WizardActivity.java
3
3
 *
4
 
 * Copyright (C) 2009 Tim Marston <edam@waxworlds.org>
 
4
 * Copyright (C) 2009 Tim Marston <tim@ed.am>
5
5
 *
6
6
 * This file is part of the Import Contacts program (hereafter referred
7
 
 * to as "this program"). For more information, see
8
 
 * http://www.waxworlds.org/edam/software/android/import-contacts
 
7
 * to as "this program").  For more information, see
 
8
 * http://ed.am/dev/android/import-contacts
9
9
 *
10
10
 * This program is free software: you can redistribute it and/or modify
11
11
 * it under the terms of the GNU General Public License as published by
21
21
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
22
22
 */
23
23
 
24
 
package org.waxworlds.edam.importcontacts;
 
24
package am.ed.importcontacts;
25
25
 
26
26
import android.app.Activity;
27
27
import android.content.Intent;
33
33
 
34
34
public class WizardActivity extends Activity
35
35
{
36
 
        private Class< ? > _nextClass;
 
36
        private Class< ? > _next_class;
37
37
 
38
38
        @Override
39
 
        protected void onCreate( Bundle savedInstanceState )
 
39
        protected void onCreate( Bundle saved_instance_state )
40
40
        {
41
 
                super.onCreate( savedInstanceState );
 
41
                super.onCreate( saved_instance_state );
42
42
 
43
43
                // enable back button based on intent data
44
44
                Bundle extras = getIntent().getExtras();
63
63
        }
64
64
 
65
65
        @Override
66
 
        protected void onActivityResult( int requestCode, int resultCode,
 
66
        protected void onActivityResult( int request_code, int result_code,
67
67
                Intent data )
68
68
        {
69
 
                if( resultCode == RESULT_OK ) {
 
69
                if( result_code == RESULT_OK ) {
70
70
                        setResult( RESULT_OK );
71
71
                        finish();
72
72
                }
77
77
                // create bundle with back enabled state
78
78
                Bundle bundle = new Bundle();
79
79
                bundle.putBoolean( "back-enabled", true );
80
 
                Intent i = new Intent( this, _nextClass );
 
80
                Intent i = new Intent( this, _next_class );
81
81
                i.putExtras( bundle );
82
82
 
83
83
                // start next activity
92
92
 
93
93
        protected void setNextActivity( Class< ? > cls )
94
94
        {
95
 
                _nextClass = cls;
 
95
                _next_class = cls;
96
96
 
97
97
                // enable next button
98
98
                ( (Button)findViewById( R.id.next ) ).setEnabled( true );
104
104
        }
105
105
 
106
106
        @Override
107
 
        public void onConfigurationChanged( Configuration newConfig ) {
108
 
                super.onConfigurationChanged( newConfig );
 
107
        public void onConfigurationChanged( Configuration new_config ) {
 
108
                super.onConfigurationChanged( new_config );
109
109
        }
110
110
}