diff options
Diffstat (limited to 'src/cgeo/geocaching/cgSelectMapfile.java')
| -rw-r--r-- | src/cgeo/geocaching/cgSelectMapfile.java | 99 |
1 files changed, 50 insertions, 49 deletions
diff --git a/src/cgeo/geocaching/cgSelectMapfile.java b/src/cgeo/geocaching/cgSelectMapfile.java index 9ce9dd2..921987c 100644 --- a/src/cgeo/geocaching/cgSelectMapfile.java +++ b/src/cgeo/geocaching/cgSelectMapfile.java @@ -1,60 +1,61 @@ package cgeo.geocaching; -import java.io.File; -import java.util.List; +import cgeo.geocaching.files.FileList; import android.content.Intent; import android.os.Bundle; import android.os.Environment; -import cgeo.geocaching.files.FileList; + +import java.io.File; +import java.util.List; public class cgSelectMapfile extends FileList<cgMapfileListAdapter> { - public cgSelectMapfile() { - super("map"); - } - - String mapFile; - - @Override - public void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - - mapFile = getSettings().getMapFile(); - } - - public void close() { - - Intent intent = new Intent(); - intent.putExtra("mapfile", mapFile); - - setResult(RESULT_OK, intent); - - finish(); - } - - @Override - protected cgMapfileListAdapter getAdapter(List<File> files) { - return new cgMapfileListAdapter(this, files); - } - - @Override - protected String[] getBaseFolders() { - String base = Environment.getExternalStorageDirectory().toString(); - return new String[]{base + "/mfmaps", base + "/Locus/mapsVector"}; - } - - @Override - protected void setTitle() { - setTitle(res.getString(R.string.map_file_select_title)); - } - - public String getCurrentMapfile() { - return mapFile; - } - - public void setMapfile(String newMapfile) { - mapFile = newMapfile; - } + public cgSelectMapfile() { + super("map"); + } + + String mapFile; + + @Override + public void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + + mapFile = getSettings().getMapFile(); + } + + public void close() { + + Intent intent = new Intent(); + intent.putExtra("mapfile", mapFile); + + setResult(RESULT_OK, intent); + + finish(); + } + + @Override + protected cgMapfileListAdapter getAdapter(List<File> files) { + return new cgMapfileListAdapter(this, files); + } + + @Override + protected String[] getBaseFolders() { + String base = Environment.getExternalStorageDirectory().toString(); + return new String[] { base + "/mfmaps", base + "/Locus/mapsVector" }; + } + + @Override + protected void setTitle() { + setTitle(res.getString(R.string.map_file_select_title)); + } + + public String getCurrentMapfile() { + return mapFile; + } + + public void setMapfile(String newMapfile) { + mapFile = newMapfile; + } } |
