adding a Decompress menu item at the Decompress activity

This commit is contained in:
tibbi 2020-05-26 22:52:40 +02:00
parent 9b85e50f7f
commit bf486415be
3 changed files with 38 additions and 0 deletions

View File

@ -3,6 +3,8 @@ package com.simplemobiletools.filemanager.pro.activities
import android.annotation.SuppressLint
import android.net.Uri
import android.os.Bundle
import android.view.Menu
import android.view.MenuItem
import com.simplemobiletools.commons.extensions.getFilenameFromPath
import com.simplemobiletools.commons.extensions.getRealPathFromURI
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")
private fun getListItems(uri: Uri): ArrayList<ListItem> {
val listItems = ArrayList<ListItem>()

View File

@ -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>

View File

@ -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>