split copy and move to 2 items
This commit is contained in:
parent
aae7c39058
commit
dc2e621d6b
7 changed files with 52 additions and 15 deletions
|
@ -32,7 +32,7 @@ android {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile 'com.simplemobiletools:commons:2.14.7'
|
compile 'com.simplemobiletools:commons:2.14.8'
|
||||||
compile 'com.davemorrissey.labs:subsampling-scale-image-view:3.6.0'
|
compile 'com.davemorrissey.labs:subsampling-scale-image-view:3.6.0'
|
||||||
compile 'com.theartofdev.edmodo:android-image-cropper:2.3.1'
|
compile 'com.theartofdev.edmodo:android-image-cropper:2.3.1'
|
||||||
compile 'com.bignerdranch.android:recyclerview-multiselect:0.2'
|
compile 'com.bignerdranch.android:recyclerview-multiselect:0.2'
|
||||||
|
|
|
@ -148,7 +148,8 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
||||||
|
|
||||||
when (item.itemId) {
|
when (item.itemId) {
|
||||||
R.id.menu_set_as_wallpaper -> setAsWallpaper(getCurrentFile())
|
R.id.menu_set_as_wallpaper -> setAsWallpaper(getCurrentFile())
|
||||||
R.id.menu_copy_move -> displayCopyDialog()
|
R.id.cab_copy_to -> copyTo()
|
||||||
|
R.id.cab_move_to -> moveTo()
|
||||||
R.id.menu_open_with -> openWith(getCurrentFile())
|
R.id.menu_open_with -> openWith(getCurrentFile())
|
||||||
R.id.menu_share -> shareMedium(getCurrentMedium()!!)
|
R.id.menu_share -> shareMedium(getCurrentMedium()!!)
|
||||||
R.id.menu_delete -> askConfirmDelete()
|
R.id.menu_delete -> askConfirmDelete()
|
||||||
|
@ -196,6 +197,14 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun copyTo() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun moveTo() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
private fun saveImageAs() {
|
private fun saveImageAs() {
|
||||||
val currPath = getCurrentMedium()!!.path
|
val currPath = getCurrentMedium()!!.path
|
||||||
SaveAsDialog(this, currPath) {
|
SaveAsDialog(this, currPath) {
|
||||||
|
|
|
@ -85,7 +85,8 @@ class DirectoryAdapter(val activity: SimpleActivity, val dirs: MutableList<Direc
|
||||||
R.id.cab_hide -> toggleFoldersVisibility(true)
|
R.id.cab_hide -> toggleFoldersVisibility(true)
|
||||||
R.id.cab_unhide -> toggleFoldersVisibility(false)
|
R.id.cab_unhide -> toggleFoldersVisibility(false)
|
||||||
R.id.cab_exclude -> tryExcludeFolder()
|
R.id.cab_exclude -> tryExcludeFolder()
|
||||||
R.id.cab_copy_move -> displayCopyDialog()
|
R.id.cab_copy_to -> copyTo()
|
||||||
|
R.id.cab_move_to -> moveTo()
|
||||||
R.id.cab_select_all -> selectAll()
|
R.id.cab_select_all -> selectAll()
|
||||||
R.id.cab_delete -> askConfirmDelete()
|
R.id.cab_delete -> askConfirmDelete()
|
||||||
else -> return false
|
else -> return false
|
||||||
|
@ -253,6 +254,14 @@ class DirectoryAdapter(val activity: SimpleActivity, val dirs: MutableList<Direc
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun copyTo() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun moveTo() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
fun selectAll() {
|
fun selectAll() {
|
||||||
val cnt = dirs.size
|
val cnt = dirs.size
|
||||||
for (i in 0..cnt - 1) {
|
for (i in 0..cnt - 1) {
|
||||||
|
|
|
@ -76,7 +76,8 @@ class MediaAdapter(val activity: SimpleActivity, var media: MutableList<Medium>,
|
||||||
R.id.cab_rename -> renameFile()
|
R.id.cab_rename -> renameFile()
|
||||||
R.id.cab_edit -> editFile()
|
R.id.cab_edit -> editFile()
|
||||||
R.id.cab_share -> shareMedia()
|
R.id.cab_share -> shareMedia()
|
||||||
R.id.cab_copy_move -> displayCopyDialog()
|
R.id.cab_copy_to -> copyTo()
|
||||||
|
R.id.cab_move_to -> moveTo()
|
||||||
R.id.cab_select_all -> selectAll()
|
R.id.cab_select_all -> selectAll()
|
||||||
R.id.cab_delete -> askConfirmDelete()
|
R.id.cab_delete -> askConfirmDelete()
|
||||||
else -> return false
|
else -> return false
|
||||||
|
@ -161,6 +162,14 @@ class MediaAdapter(val activity: SimpleActivity, var media: MutableList<Medium>,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun copyTo() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun moveTo() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
fun selectAll() {
|
fun selectAll() {
|
||||||
val cnt = media.size
|
val cnt = media.size
|
||||||
for (i in 0..cnt - 1) {
|
for (i in 0..cnt - 1) {
|
||||||
|
|
|
@ -36,10 +36,13 @@
|
||||||
android:title="@string/exclude"
|
android:title="@string/exclude"
|
||||||
app:showAsAction="never"/>
|
app:showAsAction="never"/>
|
||||||
<item
|
<item
|
||||||
android:id="@+id/cab_copy_move"
|
android:id="@+id/cab_copy_to"
|
||||||
android:icon="@drawable/ic_copy"
|
android:title="@string/copy_to"
|
||||||
android:title="@string/copy_move"
|
app:showAsAction="never"/>
|
||||||
app:showAsAction="ifRoom"/>
|
<item
|
||||||
|
android:id="@+id/cab_move_to"
|
||||||
|
android:title="@string/move_to"
|
||||||
|
app:showAsAction="never"/>
|
||||||
<item
|
<item
|
||||||
android:id="@+id/cab_select_all"
|
android:id="@+id/cab_select_all"
|
||||||
android:icon="@drawable/ic_select_all"
|
android:icon="@drawable/ic_select_all"
|
||||||
|
|
|
@ -16,11 +16,6 @@
|
||||||
android:icon="@drawable/ic_info"
|
android:icon="@drawable/ic_info"
|
||||||
android:title="@string/properties"
|
android:title="@string/properties"
|
||||||
app:showAsAction="ifRoom"/>
|
app:showAsAction="ifRoom"/>
|
||||||
<item
|
|
||||||
android:id="@+id/cab_copy_move"
|
|
||||||
android:icon="@drawable/ic_copy"
|
|
||||||
android:title="@string/copy_move"
|
|
||||||
app:showAsAction="ifRoom"/>
|
|
||||||
<item
|
<item
|
||||||
android:id="@+id/cab_rename"
|
android:id="@+id/cab_rename"
|
||||||
android:icon="@drawable/ic_rename"
|
android:icon="@drawable/ic_rename"
|
||||||
|
@ -36,4 +31,12 @@
|
||||||
android:icon="@drawable/ic_select_all"
|
android:icon="@drawable/ic_select_all"
|
||||||
android:title="@string/select_all"
|
android:title="@string/select_all"
|
||||||
app:showAsAction="ifRoom"/>
|
app:showAsAction="ifRoom"/>
|
||||||
|
<item
|
||||||
|
android:id="@+id/cab_copy_to"
|
||||||
|
android:title="@string/copy_to"
|
||||||
|
app:showAsAction="never"/>
|
||||||
|
<item
|
||||||
|
android:id="@+id/cab_move_to"
|
||||||
|
android:title="@string/move_to"
|
||||||
|
app:showAsAction="never"/>
|
||||||
</menu>
|
</menu>
|
||||||
|
|
|
@ -35,8 +35,12 @@
|
||||||
android:title="@string/share"
|
android:title="@string/share"
|
||||||
app:showAsAction="ifRoom"/>
|
app:showAsAction="ifRoom"/>
|
||||||
<item
|
<item
|
||||||
android:id="@+id/menu_copy_move"
|
android:id="@+id/menu_copy_to"
|
||||||
android:title="@string/copy_move"
|
android:title="@string/copy_to"
|
||||||
|
app:showAsAction="never"/>
|
||||||
|
<item
|
||||||
|
android:id="@+id/menu_move_to"
|
||||||
|
android:title="@string/move_to"
|
||||||
app:showAsAction="never"/>
|
app:showAsAction="never"/>
|
||||||
<item
|
<item
|
||||||
android:id="@+id/menu_set_as_wallpaper"
|
android:id="@+id/menu_set_as_wallpaper"
|
||||||
|
|
Loading…
Reference in a new issue