diff --git a/Source/Android/res/layout/folderbrowser.xml b/Source/Android/res/layout/folderbrowser.xml index adfd72ed35..3f7be27552 100644 --- a/Source/Android/res/layout/folderbrowser.xml +++ b/Source/Android/res/layout/folderbrowser.xml @@ -39,5 +39,5 @@ android:gravity="center_vertical" android:text="Title" - android:textStyle="bold" />/> + android:textStyle="bold" /> diff --git a/Source/Android/src/org/dolphinemu/dolphinemu/FolderBrowser.java b/Source/Android/src/org/dolphinemu/dolphinemu/FolderBrowser.java index e60378c2cd..3e2c93a3eb 100644 --- a/Source/Android/src/org/dolphinemu/dolphinemu/FolderBrowser.java +++ b/Source/Android/src/org/dolphinemu/dolphinemu/FolderBrowser.java @@ -45,7 +45,7 @@ public final class FolderBrowser extends Fragment { if(entry.isDirectory()) { - dir.add(new FolderBrowserItem(m_activity, entryName, getString(R.string.folder), entry.getAbsolutePath(), true)); + dir.add(new FolderBrowserItem(m_activity, entryName, entry.getAbsolutePath(), true)); } else { diff --git a/Source/Android/src/org/dolphinemu/dolphinemu/FolderBrowserAdapter.java b/Source/Android/src/org/dolphinemu/dolphinemu/FolderBrowserAdapter.java index dea96ce9d6..979ad35865 100644 --- a/Source/Android/src/org/dolphinemu/dolphinemu/FolderBrowserAdapter.java +++ b/Source/Android/src/org/dolphinemu/dolphinemu/FolderBrowserAdapter.java @@ -1,6 +1,7 @@ package org.dolphinemu.dolphinemu; import android.content.Context; +import android.content.res.Resources; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -58,7 +59,15 @@ public final class FolderBrowserAdapter extends ArrayAdapter if(subtitleText != null) { - subtitleText.setText(item.getSubtitle()); + // Remove the subtitle for all folders, except for the parent directory folder. + if (item.isDirectory() && !item.getSubtitle().equals(c.getResources().getString(R.string.parent_directory))) + { + subtitleText.setVisibility(View.GONE); + } + else + { + subtitleText.setText(item.getSubtitle()); + } } if (iconView != null) diff --git a/Source/Android/src/org/dolphinemu/dolphinemu/FolderBrowserItem.java b/Source/Android/src/org/dolphinemu/dolphinemu/FolderBrowserItem.java index d2f8773e24..a895da8c43 100644 --- a/Source/Android/src/org/dolphinemu/dolphinemu/FolderBrowserItem.java +++ b/Source/Android/src/org/dolphinemu/dolphinemu/FolderBrowserItem.java @@ -37,6 +37,24 @@ public final class FolderBrowserItem implements Comparable this.underlyingFile = new File(path); } + /** + * Constructor. Initializes a FolderBrowserItem with an empty subtitle. + * + * @param ctx Context this FolderBrowserItem is being used in. + * @param name The name of the file/folder represented by this item. + * @param path The path of the file/folder represented by this item. + * @param isValid Whether or not this item represents a file type that can be handled. + */ + public FolderBrowserItem(Context ctx, String name, String path, boolean isValid) + { + this.ctx = ctx; + this.name = name; + this.subtitle = ""; + this.path = path; + this.isValid = isValid; + this.underlyingFile = new File(path); + } + /** * Gets the name of the file/folder represented by this FolderBrowserItem. *