diff options
author | Bananeweizen <bananeweizen@gmx.de> | 2013-04-28 14:18:29 +0200 |
---|---|---|
committer | Bananeweizen <bananeweizen@gmx.de> | 2013-05-01 08:51:15 +0200 |
commit | 74fce89a36e8d130851145941459966aed1176c3 (patch) | |
tree | a5569af3499cc0dee3b3824576b225b0d2849992 /main/src/cgeo/geocaching/files | |
parent | 2f938427afe4b6c5c77f67e78955a53a468c7ceb (diff) | |
download | cgeo-74fce89a36e8d130851145941459966aed1176c3.zip cgeo-74fce89a36e8d130851145941459966aed1176c3.tar.gz cgeo-74fce89a36e8d130851145941459966aed1176c3.tar.bz2 |
#2684: use view injection library
* If you have compile errors after pulling, please consult the issue on
github.
Diffstat (limited to 'main/src/cgeo/geocaching/files')
-rw-r--r-- | main/src/cgeo/geocaching/files/AbstractFileListActivity.java | 6 | ||||
-rw-r--r-- | main/src/cgeo/geocaching/files/SimpleDirChooser.java | 11 |
2 files changed, 5 insertions, 12 deletions
diff --git a/main/src/cgeo/geocaching/files/AbstractFileListActivity.java b/main/src/cgeo/geocaching/files/AbstractFileListActivity.java index 5ff0d91..8b02eeb 100644 --- a/main/src/cgeo/geocaching/files/AbstractFileListActivity.java +++ b/main/src/cgeo/geocaching/files/AbstractFileListActivity.java @@ -89,7 +89,6 @@ public abstract class AbstractFileListActivity<T extends ArrayAdapter<File>> ext setTheme(); setContentView(R.layout.gpx); - setTitle(); Bundle extras = getIntent().getExtras(); if (extras != null) { @@ -146,11 +145,6 @@ public abstract class AbstractFileListActivity<T extends ArrayAdapter<File>> ext */ protected abstract List<File> getBaseFolders(); - /** - * Triggers the deriving class to set the title - */ - protected abstract void setTitle(); - private class SearchFilesThread extends Thread { private final FileListSelector selector = new FileListSelector(); diff --git a/main/src/cgeo/geocaching/files/SimpleDirChooser.java b/main/src/cgeo/geocaching/files/SimpleDirChooser.java index 844287c..824173c 100644 --- a/main/src/cgeo/geocaching/files/SimpleDirChooser.java +++ b/main/src/cgeo/geocaching/files/SimpleDirChooser.java @@ -2,11 +2,11 @@ package cgeo.geocaching.files; import cgeo.geocaching.Intents; import cgeo.geocaching.R; +import cgeo.geocaching.activity.AbstractListActivity; import cgeo.geocaching.activity.ActivityMixin; import org.apache.commons.lang3.StringUtils; -import android.app.ListActivity; import android.content.Context; import android.content.Intent; import android.net.Uri; @@ -31,7 +31,7 @@ import java.util.List; /** * Dialog for choosing a file or directory. */ -public class SimpleDirChooser extends ListActivity { +public class SimpleDirChooser extends AbstractListActivity { private static final String PARENT_DIR = ".. "; private File currentDir; private FileArrayAdapter adapter; @@ -46,7 +46,6 @@ public class SimpleDirChooser extends ListActivity { ActivityMixin.setTheme(this); setContentView(R.layout.simple_dir_chooser); - setTitle(this.getResources().getString(R.string.simple_dir_chooser_title)); fill(currentDir); @@ -106,13 +105,13 @@ public class SimpleDirChooser extends ListActivity { public class FileArrayAdapter extends ArrayAdapter<Option> { - private Context content; + private Context context; private int id; private List<Option> items; public FileArrayAdapter(Context context, int simpleDirItemResId, List<Option> objects) { super(context, simpleDirItemResId, objects); - this.content = context; + this.context = context; this.id = simpleDirItemResId; this.items = objects; } @@ -126,7 +125,7 @@ public class SimpleDirChooser extends ListActivity { public View getView(int position, View convertView, ViewGroup parent) { View v = convertView; if (v == null) { - LayoutInflater vi = (LayoutInflater) content.getSystemService(Context.LAYOUT_INFLATER_SERVICE); + LayoutInflater vi = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); v = vi.inflate(id, null); } |