Commit 6bbfdc1a authored by Geoffrey Métais's avatar Geoffrey Métais
Browse files

Display nicer name for root directory

parent 9345b7b0
......@@ -34,6 +34,7 @@ import android.support.v4.app.Fragment;
import android.support.v7.app.AlertDialog;
import android.support.v7.widget.AppCompatEditText;
import android.text.InputType;
import android.text.TextUtils;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
......@@ -44,6 +45,7 @@ import org.videolan.vlc.MediaDatabase;
import org.videolan.vlc.R;
import org.videolan.vlc.util.AndroidDevices;
import org.videolan.vlc.util.CustomDirectories;
import org.videolan.vlc.util.Strings;
import java.io.File;
......@@ -67,6 +69,21 @@ public class FileBrowserFragment extends BaseBrowserFragment {
return new FileBrowserFragment();
}
public String getTitle(){
if (mRoot)
return getCategoryTitle();
else {
String title = mMrl;
if (mCurrentMedia != null) {
if (TextUtils.equals(AndroidDevices.EXTERNAL_PUBLIC_DIRECTORY, mMrl))
title = getString(R.string.internal_memory);
else
title = mCurrentMedia.getTitle();
}
return title;
}
}
@Override
protected String getCategoryTitle() {
return getString(R.string.directories);
......
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