Skip to content
This repository has been archived by the owner on Mar 8, 2024. It is now read-only.

Commit

Permalink
feat : Implemented validation case for Offset.
Browse files Browse the repository at this point in the history
refractor: Replaced hardcoded string with String resources

Offset could be used with having a path different from the root hierarchy. Now offset will only be set if its Absolute path contains Root Directories Absolute path.
  • Loading branch information
Angad committed Feb 17, 2017
1 parent aec49ea commit fb88716
Show file tree
Hide file tree
Showing 5 changed files with 122 additions and 135 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -159,15 +159,14 @@ public void onClick(View view) {
properties.error_dir=new File("/mnt");
//Set new properties of dialog.
dialog.setProperties(properties);
// ArrayList<String> paths=new ArrayList<>();
// String sdcard=Environment.getExternalStorageDirectory().getPath();
// paths.add(sdcard+".VOD/0.jpg");
// paths.add(sdcard+".VOD/100.jpg");
// paths.add(sdcard+".VOD/1000.jpg");
// paths.add(sdcard+".VOD/1010.jpg");
// paths.add(sdcard+".VOD/1020.jpg");
// paths.add(sdcard+".VOD/1070.jpg");
// dialog.markFiles(paths);
ArrayList<String> paths=new ArrayList<>();
paths.add("/sdcard"+"/.VOD");
paths.add("/sdcard"+"/.VOD/100.jpg");
paths.add("/sdcard"+"/.VOD/1000.jpg");
paths.add("/sdcard"+"/.VOD/1010.jpg");
paths.add("/sdcard"+"/.VOD/1020.jpg");
paths.add("/sdcard"+"/.VOD/1070.jpg");
dialog.markFiles(paths);
}
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,14 +133,14 @@ public View getView(final int i, View view, ViewGroup viewGroup) {
SimpleDateFormat sdate = new SimpleDateFormat("dd/MM/yyyy", Locale.getDefault());
SimpleDateFormat stime = new SimpleDateFormat("hh:mm aa", Locale.getDefault());
Date date = new Date(item.getTime());
if(i==0&&item.getFilename().startsWith("...")) {
if(i==0&&item.getFilename().startsWith(context.getString(R.string.label_parent_dir))) {
holder.type.setText(R.string.label_parent_directory);
}
else {
holder.type.setText(context.getString(R.string.last_edit) + sdate.format(date) + ", " + stime.format(date));
}
if(holder.fmark.getVisibility()==View.VISIBLE) {
if(i==0&&item.getFilename().startsWith("..."))
if(i==0&&item.getFilename().startsWith(context.getString(R.string.label_parent_dir)))
{ holder.fmark.setVisibility(View.INVISIBLE);
}
if (MarkedItemList.hasItem(item.getLocation())) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

/* SingleTon containing <Key,Value> pair of all the selected files.
* Key: Directory/File path.
* Value: Directory/File Name.
* Value: FileListItem Object.
*/
public class MarkedItemList {
private static HashMap<String,FileListItem> ourInstance = new HashMap<>();
Expand Down
Loading

0 comments on commit fb88716

Please sign in to comment.