display some details at the files and directories

This commit is contained in:
tibbi
2016-07-14 20:42:42 +02:00
parent ef4d505b6f
commit 5633bfcbc2
8 changed files with 71 additions and 12 deletions

View File

@ -126,11 +126,18 @@ public class ItemsFragment extends android.support.v4.app.Fragment
if (mToBeDeleted.contains(curPath))
continue;
items.add(new FileDirItem(curPath, curName, file.isDirectory()));
int children = getChildren(file);
long size = file.length();
items.add(new FileDirItem(curPath, curName, file.isDirectory(), children, size));
}
return items;
}
private int getChildren(File file) {
return (file.isDirectory()) ? file.listFiles().length : 0;
}
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
final FileDirItem item = mItems.get(position);