mirror of
https://github.com/SimpleMobileTools/Simple-File-Manager.git
synced 2025-06-05 22:09:15 +02:00
display some details at the files and directories
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user