Android Related - A tiny simplification/readability change for NativeListView.

In this case, contains functions pretty much the same way, just more readable.
This commit is contained in:
Lioncash 2013-04-15 00:52:43 -04:00
parent 7772f0d071
commit a44fb7bdd0
1 changed files with 7 additions and 7 deletions

View File

@ -16,7 +16,7 @@ import android.widget.Toast;
public class NativeListView extends ListActivity { public class NativeListView extends ListActivity {
private FileArrayAdapter adapter; private FileArrayAdapter adapter;
static private File currentDir = null; private static File currentDir = null;
private void Fill(File f) private void Fill(File f)
{ {
@ -33,12 +33,12 @@ public class NativeListView extends ListActivity {
if(ff.isDirectory()) if(ff.isDirectory())
dir.add(new Option(ff.getName(),"Folder",ff.getAbsolutePath())); dir.add(new Option(ff.getName(),"Folder",ff.getAbsolutePath()));
else else
if (ff.getName().toLowerCase().indexOf(".gcm") >= 0 || if (ff.getName().toLowerCase().contains(".gcm") ||
ff.getName().toLowerCase().indexOf(".iso") >= 0 || ff.getName().toLowerCase().contains(".iso") ||
ff.getName().toLowerCase().indexOf(".wbfs") >= 0 || ff.getName().toLowerCase().contains(".wbfs") ||
ff.getName().toLowerCase().indexOf(".gcz") >= 0 || ff.getName().toLowerCase().contains(".gcz") ||
ff.getName().toLowerCase().indexOf(".dol") >= 0 || ff.getName().toLowerCase().contains(".dol") ||
ff.getName().toLowerCase().indexOf(".elf") >= 0) ff.getName().toLowerCase().contains(".elf"))
fls.add(new Option(ff.getName(),"File Size: "+ff.length(),ff.getAbsolutePath())); fls.add(new Option(ff.getName(),"File Size: "+ff.length(),ff.getAbsolutePath()));
} }
} }