|
@@ -107,8 +107,7 @@ public class UploadFilesActivity extends FileActivity implements
|
|
|
/// USER INTERFACE
|
|
|
|
|
|
// Drop-down navigation
|
|
|
- mDirectories = new CustomArrayAdapter<String>(this,
|
|
|
- R.layout.support_simple_spinner_dropdown_item);
|
|
|
+ mDirectories = new CustomArrayAdapter<>(this, R.layout.support_simple_spinner_dropdown_item);
|
|
|
File currDir = mCurrentDir;
|
|
|
while(currDir != null && currDir.getParentFile() != null) {
|
|
|
mDirectories.add(currDir.getName());
|
|
@@ -119,8 +118,7 @@ public class UploadFilesActivity extends FileActivity implements
|
|
|
// Inflate and set the layout view
|
|
|
setContentView(R.layout.upload_files_layout);
|
|
|
|
|
|
- mFileListFragment = (LocalFileListFragment)
|
|
|
- getSupportFragmentManager().findFragmentById(R.id.local_files_list);
|
|
|
+ mFileListFragment = (LocalFileListFragment) getSupportFragmentManager().findFragmentById(R.id.local_files_list);
|
|
|
|
|
|
|
|
|
// Set input controllers
|
|
@@ -209,7 +207,7 @@ public class UploadFilesActivity extends FileActivity implements
|
|
|
|
|
|
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
|
|
builder.setTitle(R.string.actionbar_sort_title)
|
|
|
- .setSingleChoiceItems(R.array.menu_items_sort_by_options_local, sortOrder,
|
|
|
+ .setSingleChoiceItems(R.array.menu_items_sort_by_options, sortOrder,
|
|
|
new DialogInterface.OnClickListener() {
|
|
|
public void onClick(DialogInterface dialog, int which) {
|
|
|
switch (which){
|
|
@@ -219,6 +217,9 @@ public class UploadFilesActivity extends FileActivity implements
|
|
|
case 1:
|
|
|
mFileListFragment.sortByDate(false);
|
|
|
break;
|
|
|
+ case 2:
|
|
|
+ mFileListFragment.sortBySize(false);
|
|
|
+ break;
|
|
|
}
|
|
|
|
|
|
dialog.dismiss();
|