summaryrefslogtreecommitdiff
path: root/Source/Android
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2013-08-14 19:49:39 -0400
committerLioncash <mathew1800@gmail.com>2013-08-14 19:49:39 -0400
commit9c27fedd6ddc9ead11bd83d119b0a7efb4c3f482 (patch)
treeabf214ebec14f55c0b6c5ac07871ecd9253cdce0 /Source/Android
parent1826fce9468d5ee7a55e7d121f4b30eef9916761 (diff)
[Android] Remove the subtitles on all folders in the folder browser. No need to have the subtitle "Folder" when it's visibly indicated by the icon of a folder next to it.
Now it looks like this: http://i.imgur.com/CbUSqgg.png
Diffstat (limited to 'Source/Android')
-rw-r--r--Source/Android/res/layout/folderbrowser.xml2
-rw-r--r--Source/Android/src/org/dolphinemu/dolphinemu/FolderBrowser.java2
-rw-r--r--Source/Android/src/org/dolphinemu/dolphinemu/FolderBrowserAdapter.java11
-rw-r--r--Source/Android/src/org/dolphinemu/dolphinemu/FolderBrowserItem.java18
4 files changed, 30 insertions, 3 deletions
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" />
</RelativeLayout>
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<FolderBrowserItem>
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
@@ -38,6 +38,24 @@ public final class FolderBrowserItem implements Comparable<FolderBrowserItem>
}
/**
+ * 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.
*
* @return the name of the file/folder represented by this FolderBrowserItem.