/android/export-contacts

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

« back to all changes in this revision

Viewing changes to src/am/ed/exportcontacts/ConfigureVCF.java

  • Committer: Tim Marston
  • Date: 2013-07-19 16:00:10 UTC
  • Revision ID: tim@ed.am-20130719160010-4jxhmuqee2zmzsjn
added a new family pic!

Show diffs side-by-side

added added

removed removed

42
42
 
43
43
        private FileChooser _file_chooser = null;
44
44
 
45
 
        // the sdcard path prefix
46
 
        private String _sdcard_prefix;
47
 
 
48
45
        // the save path
49
46
        private String _path;
50
47
 
57
54
                setNextActivity( Doit.class );
58
55
 
59
56
                // get sdcard prefix
60
 
                _sdcard_prefix = getSdCardPathPrefix();
61
 
                if( _sdcard_prefix == null )
 
57
                String sdcard_prefix = getSdCardPathPrefix();
 
58
                if( sdcard_prefix == null )
62
59
                        showDialog( DIALOG_NOSDCARD );
63
60
 
64
61
                // create file chooser
76
73
                                        }
77
74
                                }
78
75
                        } );
79
 
                if( _sdcard_prefix != null )
80
 
                        _file_chooser.setPathPrefix( _sdcard_prefix );
 
76
                _file_chooser.setPathPrefix( "/sdcard" );
81
77
 
82
 
                // set up browser button
83
78
                Button path_button = (Button)findViewById( R.id.path );
84
79
                path_button.setOnClickListener( new View.OnClickListener() {
85
80
                        public void onClick( View view ) {
95
90
                SharedPreferences.Editor editor = getSharedPreferences().edit();
96
91
 
97
92
                // path and filename
98
 
                editor.putString( "path", _path );
 
93
                editor.putString(  "path", _path );
99
94
                EditText filename = (EditText)findViewById( R.id.filename );
100
95
                editor.putString( "filename", filename.getText().toString() );
101
96
 
153
148
        protected void updatePathButton()
154
149
        {
155
150
                Button path_button = (Button)findViewById( R.id.path );
156
 
                if( _sdcard_prefix != null )
157
 
                        path_button.setText(
158
 
                                _file_chooser.prettyPrint( _sdcard_prefix + _path, true ) );
 
151
                path_button.setText(
 
152
                        _file_chooser.prettyPrint( "/sdcard" + _path, true ) );
159
153
        }
160
154
 
161
155
        protected void onBrowse()