diff --git a/res/layout/filebrowser_content.xml b/res/layout/filebrowser_content.xml
new file mode 100644
index 00000000..6b6eabd4
--- /dev/null
+++ b/res/layout/filebrowser_content.xml
@@ -0,0 +1,66 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/ch/blinkenlights/android/vanilla/FilebrowserStartActivity.java b/src/ch/blinkenlights/android/vanilla/FilebrowserStartActivity.java
new file mode 100644
index 00000000..aa9cbc84
--- /dev/null
+++ b/src/ch/blinkenlights/android/vanilla/FilebrowserStartActivity.java
@@ -0,0 +1,133 @@
+/*
+ * Copyright (C) 2013 Adrian Ulrich
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+package ch.blinkenlights.android.vanilla;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.io.File;
+import android.app.Activity;
+import android.os.Bundle;
+import android.view.View;
+import android.view.MenuItem;
+import android.widget.TextView;
+import android.widget.Button;
+import android.widget.AdapterView;
+import android.widget.AdapterView.OnItemClickListener;
+import android.widget.ListView;
+import android.widget.Toast;
+import android.content.SharedPreferences;
+
+
+public class FilebrowserStartActivity extends PlaybackActivity {
+
+ private ListView mListView;
+ private TextView mPathDisplay;
+ private Button mSaveButton;
+ private FilebrowserStartAdapter mListAdapter;
+ private String mCurrentPath;
+ private SharedPreferences.Editor mPrefEditor;
+
+ @Override
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+
+ setTitle("TRNS: FILEPCKER");
+ setContentView(R.layout.filebrowser_content);
+
+ mCurrentPath = (String)getFilesystemBrowseStart().getAbsolutePath();
+ mPrefEditor = PlaybackService.getSettings(this).edit();
+ mListAdapter = new FilebrowserStartAdapter(this, R.layout.showqueue_row);
+ mPathDisplay = (TextView) findViewById(R.id.path_display);
+ mListView = (ListView) findViewById(R.id.list);
+ mSaveButton = (Button) findViewById(R.id.save_button);
+
+ mListView.setAdapter(mListAdapter);
+ mListView.setOnItemClickListener(new OnItemClickListener() {
+ @Override
+ public void onItemClick(AdapterView> parent, View view, int position, long id) {
+ jumpToDirectory(position);
+ }});
+
+ mSaveButton.setOnClickListener(new View.OnClickListener() {
+ public void onClick(View v) {
+ mPrefEditor.putString("filesystem_browse_start", mCurrentPath);
+ mPrefEditor.commit();
+ finish();
+ }});
+ }
+
+ /*
+ ** Called when we are displayed (again)
+ ** This will always refresh the whole song list
+ */
+ @Override
+ public void onResume() {
+ super.onResume();
+ refreshDirectoryList();
+ }
+
+ /*
+ ** Enters selected directory at 'pos'
+ */
+ private void jumpToDirectory(int pos) {
+ String dirent = mListAdapter.getItem(pos);
+
+ if(pos == 0) {
+ mCurrentPath = (new File(mCurrentPath)).getParent();
+ }
+ else {
+ mCurrentPath += "/" + dirent;
+ }
+
+ /* let java fixup any strange paths */
+ mCurrentPath = (new File(mCurrentPath == null ? "/" : mCurrentPath)).getAbsolutePath();
+
+ refreshDirectoryList();
+ }
+
+ /*
+ ** display mCurrentPath in the dialog
+ */
+ private void refreshDirectoryList() {
+ File path = new File(mCurrentPath);
+ File[]dirs = path.listFiles();
+
+ mListAdapter.clear();
+ mListAdapter.add("../");
+
+ if(dirs != null) {
+ Arrays.sort(dirs);
+ for(File fentry: dirs) {
+ if(fentry.isDirectory()) {
+ mListAdapter.add(fentry.getName());
+ }
+ }
+ }
+ else {
+ Toast.makeText(this, "Failed to display "+mCurrentPath, Toast.LENGTH_SHORT).show();
+ }
+ mPathDisplay.setText(mCurrentPath);
+ mListView.setSelectionFromTop(0, 0);
+ }
+
+}
diff --git a/src/ch/blinkenlights/android/vanilla/FilebrowserStartAdapter.java b/src/ch/blinkenlights/android/vanilla/FilebrowserStartAdapter.java
new file mode 100644
index 00000000..0206ed6e
--- /dev/null
+++ b/src/ch/blinkenlights/android/vanilla/FilebrowserStartAdapter.java
@@ -0,0 +1,65 @@
+/*
+ * Copyright (C) 2013 Adrian Ulrich
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+package ch.blinkenlights.android.vanilla;
+
+import android.content.Context;
+import android.app.Activity;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.ArrayAdapter;
+import android.view.LayoutInflater;
+import android.widget.TextView;
+import android.graphics.drawable.Drawable;
+
+
+public class FilebrowserStartAdapter extends ArrayAdapter {
+
+ int resource;
+ Context context;
+ private final Drawable mFolderIcon;
+
+ public FilebrowserStartAdapter(Context ctx, int res) {
+ super(ctx, res);
+ context = ctx;
+ resource = res;
+ mFolderIcon = context.getResources().getDrawable(R.drawable.folder);
+ }
+
+ @Override
+ public View getView(int position, View convertView, ViewGroup parent) {
+ LayoutInflater inflater = ((Activity)context).getLayoutInflater();
+ View row = inflater.inflate(resource, parent, false);
+ String label = getItem(position);
+ TextView target = ((TextView)row.findViewById(R.id.text));
+
+ target.setText(label);
+ target.setCompoundDrawablesWithIntrinsicBounds(mFolderIcon, null, null, null);
+
+ /* not used here (yet) */
+ View pmark = ((View)row.findViewById(R.id.playmark));
+ pmark.setVisibility(View.INVISIBLE);
+ return row;
+ }
+
+
+}