This commit is contained in:
Karen Tsai 2014-03-06 02:38:19 -05:00
commit c2b4f6b799
2 changed files with 8 additions and 11 deletions

View File

@ -293,20 +293,17 @@ public class FileBrowser extends Fragment {
private void createListItem(LinearLayout list, final File game) {
final String name = game.getName();
final String nameLower = name.toLowerCase(Locale.getDefault());
final View childview = parentActivity.getLayoutInflater().inflate(
R.layout.app_list_item, null, false);
((TextView) childview.findViewById(R.id.item_name)).setText(name);
((ImageView) childview.findViewById(R.id.item_icon))
.setImageResource(game == null ? R.drawable.config : game
.isDirectory() ? R.drawable.open_folder
: name.toLowerCase(Locale.getDefault())
.endsWith(".gdi") ? R.drawable.gdi : name
.toLowerCase(Locale.getDefault()).endsWith(
".cdi") ? R.drawable.cdi : name
.toLowerCase(Locale.getDefault()).endsWith(
".chd") ? R.drawable.chd
.setImageResource(game.isDirectory() ? R.drawable.open_folder
: nameLower.endsWith(".gdi") ? R.drawable.gdi
: nameLower.endsWith(".cdi") ? R.drawable.cdi
: nameLower.endsWith(".chd") ? R.drawable.chd
: R.drawable.disk_unknown);
childview.setTag(name);

View File

@ -71,7 +71,7 @@ public class MainActivity extends SlidingFragmentActivity implements
}
String prior_error = mPrefs.getString("prior_error", null);
if (prior_error != null && !prior_error.equals(null)) {
if (prior_error != null) {
displayLogOutput(prior_error);
mPrefs.edit().remove("prior_error").commit();
} else {