/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: 2016-03-28 18:18:11 UTC
  • Revision ID: tim@ed.am-20160328181811-as61lllmvnv8e5os
handle vcards with missing vesion lines (treat as v2.1)

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;
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
}