[Android] Remove artificial limitation to not leave the sdcard directory in the folder browser as well.
This commit is contained in:
parent
fcf86f112a
commit
1bea76a6e0
|
@ -49,8 +49,8 @@ public class FolderBrowser extends ListActivity {
|
||||||
Collections.sort(dir);
|
Collections.sort(dir);
|
||||||
Collections.sort(fls);
|
Collections.sort(fls);
|
||||||
dir.addAll(fls);
|
dir.addAll(fls);
|
||||||
if (!f.getName().equalsIgnoreCase("sdcard"))
|
if (!f.getPath().equalsIgnoreCase("/"))
|
||||||
dir.add(0, new GameListItem(getApplicationContext(), "..", "Parent Directory", f.getParent()));
|
dir.add(0, new GameListItem(getApplicationContext(), "..", "Parent Directory", f.getParent()));
|
||||||
|
|
||||||
adapter = new GameListAdapter(this,R.layout.folderbrowser,dir);
|
adapter = new GameListAdapter(this,R.layout.folderbrowser,dir);
|
||||||
this.setListAdapter(adapter);
|
this.setListAdapter(adapter);
|
||||||
|
@ -58,7 +58,6 @@ public class FolderBrowser extends ListActivity {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onListItemClick(ListView l, View v, int position, long id) {
|
protected void onListItemClick(ListView l, View v, int position, long id) {
|
||||||
// TODO Auto-generated method stub
|
|
||||||
super.onListItemClick(l, v, position, id);
|
super.onListItemClick(l, v, position, id);
|
||||||
GameListItem o = adapter.getItem(position);
|
GameListItem o = adapter.getItem(position);
|
||||||
if(o.getData().equalsIgnoreCase("folder")||o.getData().equalsIgnoreCase("parent directory")){
|
if(o.getData().equalsIgnoreCase("folder")||o.getData().equalsIgnoreCase("parent directory")){
|
||||||
|
|
Loading…
Reference in New Issue