Commit 8e41ac5d authored by Edward Wang's avatar Edward Wang

Add directory view through the menu

parent d99897b9
......@@ -28,6 +28,11 @@
android:icon="@drawable/ic_menu_refresh"
android:title="@string/refresh"
android:showAsAction="ifRoom" />
<item
android:id="@+id/ml_menu_browse"
android:icon="@drawable/ic_folder"
android:title="@string/directories"
android:showAsAction="ifRoom" />
<item
android:id="@+id/ml_menu_preferences"
android:icon="@android:drawable/ic_menu_preferences"
......
......@@ -252,6 +252,14 @@ public class MainActivity extends SherlockFragmentActivity {
case R.id.ml_menu_refresh:
MediaLibrary.getInstance(this).loadMediaItems(this);
break;
// Browse Folders
case R.id.ml_menu_browse:
FragmentTransaction ft = this.getSupportFragmentManager().beginTransaction();
ft.replace(R.id.fragment_placeholder, new DirectoryViewFragment(this));
ft.addToBackStack(null);
ft.commit();
break;
// Open MRL
case R.id.ml_menu_open_mrl:
AlertDialog.Builder b = new AlertDialog.Builder(this);
final EditText input = new EditText(this);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment