adding a Decompress menu item at the Decompress activity
This commit is contained in:
parent
9b85e50f7f
commit
bf486415be
|
@ -3,6 +3,8 @@ package com.simplemobiletools.filemanager.pro.activities
|
||||||
import android.annotation.SuppressLint
|
import android.annotation.SuppressLint
|
||||||
import android.net.Uri
|
import android.net.Uri
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
|
import android.view.Menu
|
||||||
|
import android.view.MenuItem
|
||||||
import com.simplemobiletools.commons.extensions.getFilenameFromPath
|
import com.simplemobiletools.commons.extensions.getFilenameFromPath
|
||||||
import com.simplemobiletools.commons.extensions.getRealPathFromURI
|
import com.simplemobiletools.commons.extensions.getRealPathFromURI
|
||||||
import com.simplemobiletools.commons.extensions.showErrorToast
|
import com.simplemobiletools.commons.extensions.showErrorToast
|
||||||
|
@ -42,6 +44,24 @@ class DecompressActivity : SimpleActivity() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun onCreateOptionsMenu(menu: Menu): Boolean {
|
||||||
|
menuInflater.inflate(R.menu.menu_decompress, menu)
|
||||||
|
updateMenuItemColors(menu)
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onOptionsItemSelected(item: MenuItem): Boolean {
|
||||||
|
when (item.itemId) {
|
||||||
|
R.id.decompress -> decompressFiles()
|
||||||
|
}
|
||||||
|
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun decompressFiles() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@SuppressLint("NewApi")
|
@SuppressLint("NewApi")
|
||||||
private fun getListItems(uri: Uri): ArrayList<ListItem> {
|
private fun getListItems(uri: Uri): ArrayList<ListItem> {
|
||||||
val listItems = ArrayList<ListItem>()
|
val listItems = ArrayList<ListItem>()
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:fillColor="#FFFFFF"
|
||||||
|
android:pathData="M19,12v7L5,19v-7L3,12v7c0,1.1 0.9,2 2,2h14c1.1,0 2,-0.9 2,-2v-7h-2zM13,12.67l2.59,-2.58L17,11.5l-5,5 -5,-5 1.41,-1.41L11,12.67L11,3h2z" />
|
||||||
|
</vector>
|
|
@ -0,0 +1,9 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||||
|
<item
|
||||||
|
android:id="@+id/decompress"
|
||||||
|
android:icon="@drawable/ic_decompress_vector"
|
||||||
|
android:title="@string/decompress"
|
||||||
|
app:showAsAction="ifRoom" />
|
||||||
|
</menu>
|
Loading…
Reference in New Issue