diff options
| author | rsudev <rasch@munin-soft.de> | 2014-02-28 21:51:51 +0100 |
|---|---|---|
| committer | rsudev <rasch@munin-soft.de> | 2014-02-28 21:51:51 +0100 |
| commit | 2f8702fb5f2529a05ab239b480fbfd9afc0bed27 (patch) | |
| tree | f5c4add97cffe6d0e8813be305de7bf1f68f84b5 /main/src | |
| parent | b738cfa8fea4a6ac1eacdf23c66b8ddb1de76565 (diff) | |
| parent | 423da50116afcf1a6720f2a91fefece41562ef20 (diff) | |
| download | cgeo-2f8702fb5f2529a05ab239b480fbfd9afc0bed27.zip cgeo-2f8702fb5f2529a05ab239b480fbfd9afc0bed27.tar.gz cgeo-2f8702fb5f2529a05ab239b480fbfd9afc0bed27.tar.bz2 | |
Merge branch 'release'
Diffstat (limited to 'main/src')
| -rw-r--r-- | main/src/cgeo/geocaching/files/SimpleDirChooser.java | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/main/src/cgeo/geocaching/files/SimpleDirChooser.java b/main/src/cgeo/geocaching/files/SimpleDirChooser.java index e63c09f..1e1296a 100644 --- a/main/src/cgeo/geocaching/files/SimpleDirChooser.java +++ b/main/src/cgeo/geocaching/files/SimpleDirChooser.java @@ -57,8 +57,7 @@ public class SimpleDirChooser extends AbstractListActivity { fill(currentDir); okButton = (Button) findViewById(R.id.simple_dir_chooser_ok); - okButton.setEnabled(false); - okButton.setVisibility(View.INVISIBLE); + resetOkButton(); okButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { @@ -132,6 +131,7 @@ public class SimpleDirChooser extends AbstractListActivity { private void fill(File dir) { lastPosition = -1; + resetOkButton(); EditText path = (EditText) findViewById(R.id.simple_dir_chooser_path); path.setText(this.getResources().getString(R.string.simple_dir_chooser_current_path) + " " + dir.getAbsolutePath()); final File[] dirs = dir.listFiles(new DirOnlyFilenameFilter()); @@ -150,6 +150,13 @@ public class SimpleDirChooser extends AbstractListActivity { this.setListAdapter(adapter); } + private void resetOkButton() { + if (okButton != null) { + okButton.setEnabled(false); + okButton.setVisibility(View.INVISIBLE); + } + } + public class FileArrayAdapter extends ArrayAdapter<Option> { private Context context; |
