-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Displaying cut, copy and paste buttons
- Loading branch information
1 parent
33dcea5
commit 4580555
Showing
14 changed files
with
200 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
app/src/main/java/com/mauriciotogneri/fileexplorer/models/Clipboard.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
package com.mauriciotogneri.fileexplorer.models; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
|
||
public class Clipboard | ||
{ | ||
private Mode mode = Mode.NONE; | ||
private List<FileInfo> items = new ArrayList<>(); | ||
|
||
private enum Mode | ||
{ | ||
NONE, | ||
CUT, | ||
COPY | ||
} | ||
|
||
public Clipboard() | ||
{ | ||
} | ||
|
||
public void cut(List<FileInfo> items) | ||
{ | ||
mode = Mode.CUT; | ||
this.items = items; | ||
} | ||
|
||
public void copy(List<FileInfo> items) | ||
{ | ||
mode = Mode.COPY; | ||
this.items = items; | ||
} | ||
|
||
public void paste() | ||
{ | ||
// TODO | ||
|
||
items.clear(); | ||
mode = Mode.NONE; | ||
} | ||
|
||
public boolean isEmpty() | ||
{ | ||
return items.isEmpty(); | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
...otogneri/fileexplorer/utils/FileInfo.java → ...togneri/fileexplorer/models/FileInfo.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...iotogneri/fileexplorer/utils/ToolBar.java → ...otogneri/fileexplorer/models/ToolBar.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<vector android:height="24dp" android:viewportHeight="512.0" | ||
android:viewportWidth="512.0" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<path android:fillAlpha="1" android:fillColor="#ffffff" | ||
android:pathData="M236.5,121.8A15.3,15.3 0,0 0,234.4 122L98.8,122A15.3,15.3 0,0 0,83.4 137.3L83.4,451.6A15.3,15.3 86.1,0 0,98.8 466.9L336.4,466.9A15.3,15.3 0,0 0,351.7 451.6L351.7,239.4A15.3,15.3 0,0 0,345.9 224.8L248.8,127.7A15.3,15.3 94.1,0 0,236.5 121.8ZM114.1,152.6 L221.4,152.6 221.4,234.5A15.3,15.3 94.1,0 0,225.8 247.9,15.3 15.3,0 0,0 225.9,248 15.3,15.3 94.1,0 0,226.2 248.2,15.3 15.3,0 0,0 239.3,252.3L321.1,252.3 321.1,436.2 114.1,436.2 114.1,152.6ZM252.1,174.3 L299.4,221.6 252.1,221.6 252.1,174.3Z" | ||
android:strokeColor="#00000000" android:strokeWidth="40"/> | ||
<path android:fillAlpha="1" android:fillColor="#ffffff" | ||
android:pathData="M313.2,45.1C312.4,45.1 311.7,45.2 311,45.3L175.4,45.3C171.4,45.3 167.4,47 164.6,49.8 161.7,52.7 160.1,56.7 160.1,60.7L160.1,102.8 190.8,102.8 190.8,76 298.1,76 298.1,138.6 335.1,175.6 397.7,175.6 397.7,359.6 370.9,359.6 370.9,390.3 413,390.3C417,390.3 421,388.6 423.9,385.8 426.7,382.9 428.4,378.9 428.4,374.9L428.4,162.8C429.3,157.4 427,151.5 422.6,148.2L325.5,51C322.6,47.3 317.9,45 313.2,45.1ZM328.7,97.7 L376,145 328.7,145Z" | ||
android:strokeColor="#00000000" android:strokeWidth="40"/> | ||
</vector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<vector android:height="24dp" android:viewportHeight="23.0" | ||
android:viewportWidth="23.0" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<path android:fillAlpha="1" android:fillColor="#ffffff" | ||
android:pathData="M9.258,6.12C9.258,4.147 7.644,2.533 5.672,2.533 3.699,2.533 2.085,4.147 2.085,6.12 2.085,8.093 3.699,9.707 5.672,9.707 6.21,9.707 6.658,9.617 7.106,9.348L9.258,11.5 7.106,13.652C6.658,13.383 6.21,13.293 5.672,13.293 3.699,13.293 2.085,14.907 2.085,16.88 2.085,18.853 3.699,20.467 5.672,20.467 7.644,20.467 9.258,18.853 9.258,16.88 9.258,16.342 9.169,15.894 8.9,15.445L11.052,13.293 17.328,19.57 20.915,19.57 8.9,7.555C9.169,7.106 9.258,6.658 9.258,6.12L9.258,6.12ZM5.672,7.913C4.685,7.913 3.878,7.106 3.878,6.12 3.878,5.133 4.685,4.326 5.672,4.326 6.658,4.326 7.465,5.133 7.465,6.12 7.465,7.106 6.658,7.913 5.672,7.913L5.672,7.913ZM5.672,18.674C4.685,18.674 3.878,17.867 3.878,16.88 3.878,15.894 4.685,15.087 5.672,15.087 6.658,15.087 7.465,15.894 7.465,16.88 7.465,17.867 6.658,18.674 5.672,18.674L5.672,18.674ZM11.052,11.052C11.321,11.052 11.5,11.231 11.5,11.5 11.5,11.769 11.321,11.948 11.052,11.948 10.783,11.948 10.603,11.769 10.603,11.5 10.603,11.231 10.783,11.052 11.052,11.052L11.052,11.052ZM20.915,3.43 L17.328,3.43 11.948,8.81 13.742,10.603 20.915,3.43 20.915,3.43Z" | ||
android:strokeColor="#00000000" android:strokeWidth="1"/> | ||
</vector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<vector android:height="24dp" android:viewportHeight="22.0" | ||
android:viewportWidth="22.0" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<path android:fillAlpha="1" android:fillColor="#ffffff" | ||
android:pathData="M16.547,3.869 L13.219,3.869C12.902,2.918 12.03,2.284 11,2.284 9.97,2.284 9.098,2.918 8.781,3.869L5.453,3.869C4.582,3.869 3.869,4.582 3.869,5.453L3.869,18.131C3.869,19.003 4.582,19.716 5.453,19.716L16.547,19.716C17.418,19.716 18.131,19.003 18.131,18.131L18.131,5.453C18.131,4.582 17.418,3.869 16.547,3.869L16.547,3.869ZM11,3.869C11.475,3.869 11.792,4.186 11.792,4.661 11.792,5.136 11.475,5.453 11,5.453 10.525,5.453 10.208,5.136 10.208,4.661 10.208,4.186 10.525,3.869 11,3.869L11,3.869ZM16.547,18.131 L5.453,18.131 5.453,5.453 7.038,5.453 7.038,7.831 14.962,7.831 14.962,5.453 16.547,5.453 16.547,18.131 16.547,18.131Z" | ||
android:strokeColor="#00000000" android:strokeWidth="1"/> | ||
</vector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters