Graphic bug fixes

This commit is contained in:
Hardcore Sushi 2020-07-21 15:05:05 +02:00
parent cf0753e74a
commit fc7d916bf9
35 changed files with 88 additions and 98 deletions

View File

@ -16,7 +16,6 @@
android:theme="@style/AppTheme">
<activity
android:name=".SettingsActivity"
android:theme="@style/Theme.Cyanea.Dark.NoActionBar"
android:label="@string/title_activity_settings"
android:parentActivityName=".MainActivity"/>
<activity android:name=".explorers.ExplorerActivity" />
@ -24,7 +23,6 @@
<activity android:name=".explorers.ExplorerActivityDrop" />
<activity
android:name=".OpenActivity"
android:theme="@style/Theme.Cyanea.Dark.NoActionBar"
android:screenOrientation="nosensor"
android:windowSoftInputMode="adjustPan">
<intent-filter android:label="@string/share_menu_label">
@ -36,11 +34,9 @@
</activity>
<activity
android:name=".CreateActivity"
android:theme="@style/Theme.Cyanea.Dark.NoActionBar"
android:screenOrientation="nosensor" />
<activity
android:name=".ChangePasswordActivity"
android:theme="@style/Theme.Cyanea.Dark.NoActionBar"
android:screenOrientation="nosensor"
android:windowSoftInputMode="adjustPan" />
<activity

View File

@ -9,11 +9,14 @@ import androidx.preference.PreferenceManager
import com.jaredrummler.cyanea.app.CyaneaAppCompatActivity
import sushi.hardcore.droidfs.widgets.ThemeColor
open class ColoredActivity: CyaneaAppCompatActivity() {
open class BaseActivity: CyaneaAppCompatActivity() {
protected lateinit var sharedPrefs: SharedPreferences
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
sharedPrefs = PreferenceManager.getDefaultSharedPreferences(this)
if (!sharedPrefs.getBoolean("usf_screenshot", false)){
window.setFlags(WindowManager.LayoutParams.FLAG_SECURE, WindowManager.LayoutParams.FLAG_SECURE)
}
val themeColor = ThemeColor.getThemeColor(this)
if (cyanea.accent != themeColor){
val backgroundColor = ContextCompat.getColor(this, R.color.backgroundColor)

View File

@ -25,7 +25,7 @@ import sushi.hardcore.droidfs.util.Wiper
import sushi.hardcore.droidfs.widgets.ColoredAlertDialog
import java.util.*
class ChangePasswordActivity : ColoredActivity() {
class ChangePasswordActivity : BaseActivity() {
companion object {
private const val PICK_DIRECTORY_REQUEST_CODE = 1
}
@ -34,9 +34,6 @@ class ChangePasswordActivity : ColoredActivity() {
private var usf_fingerprint = false
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
if (!sharedPrefs.getBoolean("usf_screenshot", false)){
window.setFlags(WindowManager.LayoutParams.FLAG_SECURE, WindowManager.LayoutParams.FLAG_SECURE)
}
setContentView(R.layout.activity_change_password)
setSupportActionBar(toolbar)
usf_fingerprint = sharedPrefs.getBoolean("usf_fingerprint", false)
@ -73,7 +70,7 @@ class ChangePasswordActivity : ColoredActivity() {
}
}
fun pick_directory(view: View?) {
fun pickDirectory(view: View?) {
val i = Intent(Intent.ACTION_OPEN_DOCUMENT_TREE)
startActivityForResult(i, PICK_DIRECTORY_REQUEST_CODE)
}

View File

@ -13,7 +13,7 @@ class ConstValues {
Pair("image", listOf("png", "jpg", "jpeg")),
Pair("video", listOf("mp4", "webm")),
Pair("audio", listOf("mp3", "ogg")),
Pair("text", listOf("txt", "json", "conf", "xml", "java", "kt", "py", "go", "c", "h", "cpp", "hpp", "sh", "js", "html", "css", "php"))
Pair("text", listOf("txt", "json", "conf", "log", "xml", "java", "kt", "py", "go", "c", "h", "cpp", "hpp", "sh", "js", "html", "css", "php"))
)
fun isImage(path: String): Boolean {

View File

@ -23,7 +23,7 @@ import sushi.hardcore.droidfs.widgets.ColoredAlertDialog
import java.io.File
import java.util.*
class CreateActivity : ColoredActivity() {
class CreateActivity : BaseActivity() {
companion object {
private const val PICK_DIRECTORY_REQUEST_CODE = 1
}
@ -33,9 +33,6 @@ class CreateActivity : ColoredActivity() {
private var usf_fingerprint = false
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
if (!sharedPrefs.getBoolean("usf_screenshot", false)){
window.setFlags(WindowManager.LayoutParams.FLAG_SECURE, WindowManager.LayoutParams.FLAG_SECURE)
}
setContentView(R.layout.activity_create)
setSupportActionBar(toolbar)
usf_fingerprint = sharedPrefs.getBoolean("usf_fingerprint", false)
@ -50,7 +47,7 @@ class CreateActivity : ColoredActivity() {
}
}
fun pick_directory(view: View?) {
fun pickDirectory(view: View?) {
val i = Intent(Intent.ACTION_OPEN_DOCUMENT_TREE)
startActivityForResult(i, PICK_DIRECTORY_REQUEST_CODE)
}

View File

@ -7,9 +7,7 @@ import android.os.Build
import android.os.Bundle
import android.os.Environment
import android.util.DisplayMetrics
import android.util.Log
import android.view.*
import androidx.appcompat.app.AppCompatActivity
import androidx.core.content.ContextCompat
import androidx.preference.PreferenceManager
import com.bumptech.glide.Glide
@ -17,16 +15,12 @@ import kotlinx.android.synthetic.main.activity_main.*
import kotlinx.android.synthetic.main.toolbar.*
import sushi.hardcore.droidfs.widgets.ColoredAlertDialog
class MainActivity : AppCompatActivity() {
class MainActivity : BaseActivity() {
companion object {
private const val STORAGE_PERMISSIONS_REQUEST = 1
}
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
val sharedPrefs = PreferenceManager.getDefaultSharedPreferences(this)
if (!sharedPrefs.getBoolean("usf_screenshot", false)){
window.setFlags(WindowManager.LayoutParams.FLAG_SECURE, WindowManager.LayoutParams.FLAG_SECURE)
}
setContentView(R.layout.activity_main)
setSupportActionBar(toolbar)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {

View File

@ -8,8 +8,6 @@ import android.view.View
import android.view.WindowManager
import android.widget.AdapterView.OnItemClickListener
import android.widget.Toast
import kotlinx.android.synthetic.main.activity_change_password.*
import kotlinx.android.synthetic.main.activity_open.*
import kotlinx.android.synthetic.main.activity_open.checkbox_remember_path
import kotlinx.android.synthetic.main.activity_open.checkbox_save_password
import kotlinx.android.synthetic.main.activity_open.edit_password
@ -29,7 +27,7 @@ import sushi.hardcore.droidfs.widgets.ColoredAlertDialog
import java.io.File
import java.util.*
class OpenActivity : ColoredActivity() {
class OpenActivity : BaseActivity() {
companion object {
private const val PICK_DIRECTORY_REQUEST_CODE = 1
}
@ -40,12 +38,8 @@ class OpenActivity : ColoredActivity() {
private var usf_fingerprint = false
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
if (!sharedPrefs.getBoolean("usf_screenshot", false)){
window.setFlags(WindowManager.LayoutParams.FLAG_SECURE, WindowManager.LayoutParams.FLAG_SECURE)
}
setContentView(R.layout.activity_open)
setSupportActionBar(toolbar)
//val sharedPrefs = PreferenceManager.getDefaultSharedPreferences(this)
usf_fingerprint = sharedPrefs.getBoolean("usf_fingerprint", false)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && usf_fingerprint) {
fingerprintPasswordHashSaver = FingerprintPasswordHashSaver(this, sharedPrefs)
@ -72,7 +66,7 @@ class OpenActivity : ColoredActivity() {
}
}
fun pick_directory(view: View?) {
fun pickDirectory(view: View?) {
val i = Intent(Intent.ACTION_OPEN_DOCUMENT_TREE)
startActivityForResult(i, PICK_DIRECTORY_REQUEST_CODE)
}

View File

@ -1,19 +1,17 @@
package sushi.hardcore.droidfs
import android.os.Bundle
import android.view.WindowManager
import androidx.fragment.app.Fragment
import androidx.preference.Preference
import androidx.preference.PreferenceFragmentCompat
import kotlinx.android.synthetic.main.toolbar.*
import sushi.hardcore.droidfs.widgets.ThemeColor
class SettingsActivity : ColoredActivity(), PreferenceFragmentCompat.OnPreferenceStartFragmentCallback {
class SettingsActivity : BaseActivity(), PreferenceFragmentCompat.OnPreferenceStartFragmentCallback {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
if (!sharedPrefs.getBoolean("usf_screenshot", false)){
window.setFlags(WindowManager.LayoutParams.FLAG_SECURE, WindowManager.LayoutParams.FLAG_SECURE)
}
setContentView(R.layout.activity_settings)
setSupportActionBar(toolbar)
supportActionBar?.setDisplayHomeAsUpEnabled(true)
@ -33,12 +31,14 @@ class SettingsActivity : ColoredActivity(), PreferenceFragmentCompat.OnPreferenc
class SettingsFragment : PreferenceFragmentCompat() {
override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {
setPreferencesFromResource(R.xml.root_preferences, rootKey)
ThemeColor.tintPreferenceIcons(preferenceScreen, ThemeColor.getThemeColor(requireContext()))
}
}
class UnsafeFeaturesSettingsFragment : PreferenceFragmentCompat() {
override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {
setPreferencesFromResource(R.xml.unsafe_features_preferences, rootKey)
ThemeColor.tintPreferenceIcons(preferenceScreen, ThemeColor.getThemeColor(requireContext()))
}
}

View File

@ -16,7 +16,7 @@ import com.github.clans.fab.FloatingActionMenu
import kotlinx.android.synthetic.main.activity_explorer_base.*
import kotlinx.android.synthetic.main.explorer_info_bar.*
import kotlinx.android.synthetic.main.toolbar.*
import sushi.hardcore.droidfs.ColoredActivity
import sushi.hardcore.droidfs.BaseActivity
import sushi.hardcore.droidfs.ConstValues
import sushi.hardcore.droidfs.ConstValues.Companion.isAudio
import sushi.hardcore.droidfs.ConstValues.Companion.isImage
@ -36,7 +36,7 @@ import sushi.hardcore.droidfs.util.GocryptfsVolume
import sushi.hardcore.droidfs.widgets.ColoredAlertDialog
import java.util.*
open class BaseExplorerActivity : ColoredActivity() {
open class BaseExplorerActivity : BaseActivity() {
private lateinit var shared_prefs_editor: SharedPreferences.Editor
private lateinit var sort_modes_entries: Array<String>
private lateinit var sort_modes_values: Array<String>
@ -49,9 +49,6 @@ open class BaseExplorerActivity : ColoredActivity() {
private var usf_open = false
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
if (!sharedPrefs.getBoolean("usf_screenshot", false)){
window.setFlags(WindowManager.LayoutParams.FLAG_SECURE, WindowManager.LayoutParams.FLAG_SECURE)
}
usf_open = sharedPrefs.getBoolean("usf_open", false)
val intent = intent
volume_name = intent.getStringExtra("volume_name") ?: ""

View File

@ -77,7 +77,7 @@ class ExplorerActivity : BaseExplorerActivity() {
fun onClickAddFile(view: View?) {
fam_explorer.close(true)
val i = Intent(Intent.ACTION_OPEN_DOCUMENT)
val i = Intent(Intent.ACTION_GET_CONTENT)
i.type = "*/*"
i.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, true)
i.addCategory(Intent.CATEGORY_OPENABLE)
@ -96,24 +96,23 @@ class ExplorerActivity : BaseExplorerActivity() {
if (requestCode == PICK_FILES_REQUEST_CODE) {
if (resultCode == Activity.RESULT_OK && data != null) {
val uris: MutableList<Uri> = ArrayList()
val single_uri = data.data
if (single_uri == null) { //multiples choices
val clipdata = data.clipData
if (clipdata != null){
for (i in 0 until clipdata.itemCount) {
uris.add(clipdata.getItemAt(i).uri)
val singleUri = data.data
if (singleUri == null) { //multiples choices
val clipData = data.clipData
if (clipData != null){
for (i in 0 until clipData.itemCount) {
uris.add(clipData.getItemAt(i).uri)
}
}
} else {
uris.add(single_uri)
uris.add(singleUri)
}
if (uris.isNotEmpty()){
var success = true
for (uri in uris) {
val dst_path = FilesUtils.path_join(current_path, FilesUtils.getFilenameFromURI(this, uri))
var `is` = contentResolver.openInputStream(uri)
if (`is` != null) {
success = gocryptfsVolume.import_file(`is`, dst_path)
val dstPath = FilesUtils.path_join(current_path, FilesUtils.getFilenameFromURI(this, uri))
contentResolver.openInputStream(uri)?.let {
success = gocryptfsVolume.import_file(it, dstPath)
}
if (!success) {
ColoredAlertDialog(this)

View File

@ -5,7 +5,7 @@ import android.os.Bundle
import android.view.View
import android.view.WindowManager
import androidx.preference.PreferenceManager
import sushi.hardcore.droidfs.ColoredActivity
import sushi.hardcore.droidfs.BaseActivity
import sushi.hardcore.droidfs.R
import sushi.hardcore.droidfs.provider.TemporaryFileProvider
import sushi.hardcore.droidfs.util.GocryptfsVolume
@ -14,16 +14,12 @@ import sushi.hardcore.droidfs.widgets.ColoredAlertDialog
import java.io.File
import java.util.ArrayList
abstract class FileViewerActivity: ColoredActivity() {
abstract class FileViewerActivity: BaseActivity() {
private var cachedFiles: MutableList<Uri> = ArrayList()
lateinit var gocryptfsVolume: GocryptfsVolume
lateinit var filePath: String
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
val sharedPrefs = PreferenceManager.getDefaultSharedPreferences(this)
if (!sharedPrefs.getBoolean("usf_screenshot", false)){
window.setFlags(WindowManager.LayoutParams.FLAG_SECURE, WindowManager.LayoutParams.FLAG_SECURE)
}
filePath = intent.getStringExtra("path")!!
val sessionID = intent.getIntExtra("sessionID", -1)
gocryptfsVolume = GocryptfsVolume(sessionID)

View File

@ -126,38 +126,38 @@ class GocryptfsVolume(var sessionID: Int) {
return false
}
fun import_file(`is`: InputStream, handleID: Int): Boolean {
fun import_file(inputStream: InputStream, handleID: Int): Boolean {
var offset: Long = 0
val io_buffer = ByteArray(DefaultBS)
var length: Int
while (`is`.read(io_buffer).also { length = it } > 0) {
while (inputStream.read(io_buffer).also { length = it } > 0) {
val written = native_write_file(sessionID, handleID, offset, io_buffer, length).toLong()
if (written == length.toLong()) {
offset += written
} else {
`is`.close()
inputStream.close()
return false
}
}
native_close_file(sessionID, handleID)
`is`.close()
inputStream.close()
return true
}
fun import_file(`is`: InputStream, dst_path: String): Boolean {
fun import_file(inputStream: InputStream, dst_path: String): Boolean {
var success = false
val dst_handleID = open_write_mode(dst_path)
if (dst_handleID != -1) {
success = import_file(`is`, dst_handleID)
success = import_file(inputStream, dst_handleID)
close_file(dst_handleID)
}
return success
}
fun import_file(context: Context, src_uri: Uri, dst_path: String): Boolean {
val `is` = context.contentResolver.openInputStream(src_uri)
if (`is` != null){
return import_file(`is`, dst_path)
val inputStream = context.contentResolver.openInputStream(src_uri)
if (inputStream != null){
return import_file(inputStream, dst_path)
}
return false
}

View File

@ -2,7 +2,11 @@ package sushi.hardcore.droidfs.widgets
import android.content.Context
import android.graphics.Color
import android.graphics.drawable.Drawable
import androidx.core.content.ContextCompat
import androidx.core.graphics.drawable.DrawableCompat
import androidx.preference.Preference
import androidx.preference.PreferenceGroup
import androidx.preference.PreferenceManager
import sushi.hardcore.droidfs.R
@ -11,4 +15,14 @@ object ThemeColor {
val sharedPrefs = PreferenceManager.getDefaultSharedPreferences(context)
return sharedPrefs.getInt("themeColor", ContextCompat.getColor(context, R.color.themeColor))
}
fun tintPreferenceIcons(preference: Preference, color: Int){
if (preference is PreferenceGroup) {
for (i in 0 until preference.preferenceCount) {
tintPreferenceIcons(preference.getPreference(i), color)
}
} else {
val icon: Drawable = preference.icon
DrawableCompat.setTint(icon, color)
}
}
}

View File

@ -4,9 +4,9 @@
android:height="24dp"
android:viewportWidth="1024"
android:viewportHeight="1024"
android:tint="@color/cyanea_accent">
android:tint="#FFFFFF">
<path
android:fillColor="#ffffff"
android:fillColor="#FFFFFF"
android:pathData="M749.5,417.3H715V283.8c0-54.4-21.1-105.3-59.4-143.6c-38.4-38.4-89.3-59.5-143.5-59.5 c-54.3,0-105.3,21.3-143.6,59.6c-38.3,38.4-59.5,88.9-59.5,143.9h60c0-79,64.2-143.4,143.1-143.4c38.2,0,74.1,14.7,101.1,41.7 c27,27,41.8,62.9,41.8,101.2v133.5H274.5c-41.1,0-74.5,33.4-74.5,74.5v376.5c0,41.3,33.4,74.9,74.5,74.9h475 c41.1,0,74.5-33.6,74.5-74.9V491.8C824,450.7,790.6,417.3,749.5,417.3z M532,742.7v55.5h-40v-55.5c-23-8.2-39.5-30.2-39.5-56 c0-32.8,26.7-59.5,59.5-59.5s59.5,26.7,59.5,59.5C571.5,712.5,555,734.5,532,742.7z" />
</vector>

View File

@ -1,5 +1,5 @@
<vector android:height="24dp" android:tint="#FFFFFF"
android:viewportHeight="24" android:viewportWidth="24"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M6,19c0,1.1 0.9,2 2,2h8c1.1,0 2,-0.9 2,-2V7H6v12zM19,4h-3.5l-1,-1h-5l-1,1H5v2h14V4z"/>
<path android:fillColor="#FFFFFF" android:pathData="M6,19c0,1.1 0.9,2 2,2h8c1.1,0 2,-0.9 2,-2V7H6v12zM19,4h-3.5l-1,-1h-5l-1,1H5v2h14V4z"/>
</vector>

View File

@ -5,6 +5,6 @@
android:width="24dp"
android:height="24dp">
<path
android:fillColor="@color/themeColor"
android:fillColor="#FFFFFF"
android:pathData="M14 2H6C4.9 2 4 2.9 4 4v16c0 1.1 0.9 2 2 2h12c1.1 0 2 -0.9 2 -2V8L14 2zM15 13h-2v4c0 1.105 -0.895 2 -2 2s-2 -0.895 -2 -2c0 -1.105 0.895 -2 2 -2v-4h4V13zM13 9V3.5L18.5 9H13z" />
</vector>

View File

@ -6,6 +6,6 @@
android:viewportHeight="24">
<path
android:fillColor="@color/themeColor"
android:fillColor="#FFFFFF"
android:pathData="M14,2H6C4.9,2,4,2.9,4,4v16c0,1.1,0.9,2,2,2h12c1.1,0,2-0.9,2-2V8L14,2z M7,18l2.5-3.333l1.5,2l2.5-3.333L17,18H7z M13,9 V3.5L18.5,9H13z" />
</vector>

View File

@ -6,6 +6,6 @@
android:viewportHeight="24">
<path
android:fillColor="@color/themeColor"
android:fillColor="#FFFFFF"
android:pathData="M14,2H6C4.9,2,4,2.9,4,4v16c0,1.1,0.9,2,2,2h12c1.1,0,2-0.9,2-2V8L14,2z M16,18H8v-2h8V18z M16,14H8v-2h8V14z M13,9V3.5 L18.5,9H13z" />
</vector>

View File

@ -2,6 +2,6 @@
android:viewportHeight="24" android:viewportWidth="24"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path
android:fillColor="@color/themeColor"
android:fillColor="#FFFFFF"
android:pathData="M6,2c-1.1,0 -1.99,0.9 -1.99,2L4,20c0,1.1 0.89,2 1.99,2L18,22c1.1,0 2,-0.9 2,-2L20,8l-6,-6L6,2zM13,9L13,3.5L18.5,9L13,9z"/>
</vector>

View File

@ -6,6 +6,6 @@
android:viewportHeight="24">
<path
android:fillColor="@color/themeColor"
android:fillColor="#FFFFFF"
android:pathData="M14,2H6C4.9,2,4,2.9,4,4v16c0,1.1,0.9,2,2,2h12c1.1,0,2-0.9,2-2V8L14,2z M10,18v-6l5,3L10,18z M13,9V3.5L18.5,9H13z" />
</vector>

View File

@ -1,5 +1,5 @@
<vector android:height="24dp" android:tint="@color/cyanea_accent"
<vector android:height="24dp" android:tint="#FFFFFF"
android:viewportHeight="24" android:viewportWidth="24"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#ffffff" android:pathData="M17.81,4.47c-0.08,0 -0.16,-0.02 -0.23,-0.06C15.66,3.42 14,3 12.01,3c-1.98,0 -3.86,0.47 -5.57,1.41 -0.24,0.13 -0.54,0.04 -0.68,-0.2 -0.13,-0.24 -0.04,-0.55 0.2,-0.68C7.82,2.52 9.86,2 12.01,2c2.13,0 3.99,0.47 6.03,1.52 0.25,0.13 0.34,0.43 0.21,0.67 -0.09,0.18 -0.26,0.28 -0.44,0.28zM3.5,9.72c-0.1,0 -0.2,-0.03 -0.29,-0.09 -0.23,-0.16 -0.28,-0.47 -0.12,-0.7 0.99,-1.4 2.25,-2.5 3.75,-3.27C9.98,4.04 14,4.03 17.15,5.65c1.5,0.77 2.76,1.86 3.75,3.25 0.16,0.22 0.11,0.54 -0.12,0.7 -0.23,0.16 -0.54,0.11 -0.7,-0.12 -0.9,-1.26 -2.04,-2.25 -3.39,-2.94 -2.87,-1.47 -6.54,-1.47 -9.4,0.01 -1.36,0.7 -2.5,1.7 -3.4,2.96 -0.08,0.14 -0.23,0.21 -0.39,0.21zM9.75,21.79c-0.13,0 -0.26,-0.05 -0.35,-0.15 -0.87,-0.87 -1.34,-1.43 -2.01,-2.64 -0.69,-1.23 -1.05,-2.73 -1.05,-4.34 0,-2.97 2.54,-5.39 5.66,-5.39s5.66,2.42 5.66,5.39c0,0.28 -0.22,0.5 -0.5,0.5s-0.5,-0.22 -0.5,-0.5c0,-2.42 -2.09,-4.39 -4.66,-4.39 -2.57,0 -4.66,1.97 -4.66,4.39 0,1.44 0.32,2.77 0.93,3.85 0.64,1.15 1.08,1.64 1.85,2.42 0.19,0.2 0.19,0.51 0,0.71 -0.11,0.1 -0.24,0.15 -0.37,0.15zM16.92,19.94c-1.19,0 -2.24,-0.3 -3.1,-0.89 -1.49,-1.01 -2.38,-2.65 -2.38,-4.39 0,-0.28 0.22,-0.5 0.5,-0.5s0.5,0.22 0.5,0.5c0,1.41 0.72,2.74 1.94,3.56 0.71,0.48 1.54,0.71 2.54,0.71 0.24,0 0.64,-0.03 1.04,-0.1 0.27,-0.05 0.53,0.13 0.58,0.41 0.05,0.27 -0.13,0.53 -0.41,0.58 -0.57,0.11 -1.07,0.12 -1.21,0.12zM14.91,22c-0.04,0 -0.09,-0.01 -0.13,-0.02 -1.59,-0.44 -2.63,-1.03 -3.72,-2.1 -1.4,-1.39 -2.17,-3.24 -2.17,-5.22 0,-1.62 1.38,-2.94 3.08,-2.94 1.7,0 3.08,1.32 3.08,2.94 0,1.07 0.93,1.94 2.08,1.94s2.08,-0.87 2.08,-1.94c0,-3.77 -3.25,-6.83 -7.25,-6.83 -2.84,0 -5.44,1.58 -6.61,4.03 -0.39,0.81 -0.59,1.76 -0.59,2.8 0,0.78 0.07,2.01 0.67,3.61 0.1,0.26 -0.03,0.55 -0.29,0.64 -0.26,0.1 -0.55,-0.04 -0.64,-0.29 -0.49,-1.31 -0.73,-2.61 -0.73,-3.96 0,-1.2 0.23,-2.29 0.68,-3.24 1.33,-2.79 4.28,-4.6 7.51,-4.6 4.55,0 8.25,3.51 8.25,7.83 0,1.62 -1.38,2.94 -3.08,2.94s-3.08,-1.32 -3.08,-2.94c0,-1.07 -0.93,-1.94 -2.08,-1.94s-2.08,0.87 -2.08,1.94c0,1.71 0.66,3.31 1.87,4.51 0.95,0.94 1.86,1.46 3.27,1.85 0.27,0.07 0.42,0.35 0.35,0.61 -0.05,0.23 -0.26,0.38 -0.47,0.38z"/>
<path android:fillColor="#FFFFFF" android:pathData="M17.81,4.47c-0.08,0 -0.16,-0.02 -0.23,-0.06C15.66,3.42 14,3 12.01,3c-1.98,0 -3.86,0.47 -5.57,1.41 -0.24,0.13 -0.54,0.04 -0.68,-0.2 -0.13,-0.24 -0.04,-0.55 0.2,-0.68C7.82,2.52 9.86,2 12.01,2c2.13,0 3.99,0.47 6.03,1.52 0.25,0.13 0.34,0.43 0.21,0.67 -0.09,0.18 -0.26,0.28 -0.44,0.28zM3.5,9.72c-0.1,0 -0.2,-0.03 -0.29,-0.09 -0.23,-0.16 -0.28,-0.47 -0.12,-0.7 0.99,-1.4 2.25,-2.5 3.75,-3.27C9.98,4.04 14,4.03 17.15,5.65c1.5,0.77 2.76,1.86 3.75,3.25 0.16,0.22 0.11,0.54 -0.12,0.7 -0.23,0.16 -0.54,0.11 -0.7,-0.12 -0.9,-1.26 -2.04,-2.25 -3.39,-2.94 -2.87,-1.47 -6.54,-1.47 -9.4,0.01 -1.36,0.7 -2.5,1.7 -3.4,2.96 -0.08,0.14 -0.23,0.21 -0.39,0.21zM9.75,21.79c-0.13,0 -0.26,-0.05 -0.35,-0.15 -0.87,-0.87 -1.34,-1.43 -2.01,-2.64 -0.69,-1.23 -1.05,-2.73 -1.05,-4.34 0,-2.97 2.54,-5.39 5.66,-5.39s5.66,2.42 5.66,5.39c0,0.28 -0.22,0.5 -0.5,0.5s-0.5,-0.22 -0.5,-0.5c0,-2.42 -2.09,-4.39 -4.66,-4.39 -2.57,0 -4.66,1.97 -4.66,4.39 0,1.44 0.32,2.77 0.93,3.85 0.64,1.15 1.08,1.64 1.85,2.42 0.19,0.2 0.19,0.51 0,0.71 -0.11,0.1 -0.24,0.15 -0.37,0.15zM16.92,19.94c-1.19,0 -2.24,-0.3 -3.1,-0.89 -1.49,-1.01 -2.38,-2.65 -2.38,-4.39 0,-0.28 0.22,-0.5 0.5,-0.5s0.5,0.22 0.5,0.5c0,1.41 0.72,2.74 1.94,3.56 0.71,0.48 1.54,0.71 2.54,0.71 0.24,0 0.64,-0.03 1.04,-0.1 0.27,-0.05 0.53,0.13 0.58,0.41 0.05,0.27 -0.13,0.53 -0.41,0.58 -0.57,0.11 -1.07,0.12 -1.21,0.12zM14.91,22c-0.04,0 -0.09,-0.01 -0.13,-0.02 -1.59,-0.44 -2.63,-1.03 -3.72,-2.1 -1.4,-1.39 -2.17,-3.24 -2.17,-5.22 0,-1.62 1.38,-2.94 3.08,-2.94 1.7,0 3.08,1.32 3.08,2.94 0,1.07 0.93,1.94 2.08,1.94s2.08,-0.87 2.08,-1.94c0,-3.77 -3.25,-6.83 -7.25,-6.83 -2.84,0 -5.44,1.58 -6.61,4.03 -0.39,0.81 -0.59,1.76 -0.59,2.8 0,0.78 0.07,2.01 0.67,3.61 0.1,0.26 -0.03,0.55 -0.29,0.64 -0.26,0.1 -0.55,-0.04 -0.64,-0.29 -0.49,-1.31 -0.73,-2.61 -0.73,-3.96 0,-1.2 0.23,-2.29 0.68,-3.24 1.33,-2.79 4.28,-4.6 7.51,-4.6 4.55,0 8.25,3.51 8.25,7.83 0,1.62 -1.38,2.94 -3.08,2.94s-3.08,-1.32 -3.08,-2.94c0,-1.07 -0.93,-1.94 -2.08,-1.94s-2.08,0.87 -2.08,1.94c0,1.71 0.66,3.31 1.87,4.51 0.95,0.94 1.86,1.46 3.27,1.85 0.27,0.07 0.42,0.35 0.35,0.61 -0.05,0.23 -0.26,0.38 -0.47,0.38z"/>
</vector>

View File

@ -1,5 +1,5 @@
<vector android:height="24dp"
android:viewportHeight="24" android:viewportWidth="24"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@color/themeColor" android:pathData="M10,4H4c-1.1,0 -1.99,0.9 -1.99,2L2,18c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2V8c0,-1.1 -0.9,-2 -2,-2h-8l-2,-2z"/>
<path android:fillColor="#FFFFFF" android:pathData="M10,4H4c-1.1,0 -1.99,0.9 -1.99,2L2,18c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2V8c0,-1.1 -0.9,-2 -2,-2h-8l-2,-2z"/>
</vector>

View File

@ -1,4 +1,4 @@
<vector android:height="24dp" android:tint="@color/cyanea_accent"
<vector android:height="24dp" android:tint="#FFFFFF"
android:viewportHeight="24" android:viewportWidth="24"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M19,19H5V5h7V3H5c-1.11,0 -2,0.9 -2,2v14c0,1.1 0.89,2 2,2h14c1.1,0 2,-0.9 2,-2v-7h-2v7zM14,3v2h3.59l-9.83,9.83 1.41,1.41L19,6.41V10h2V3h-7z"/>

View File

@ -1,4 +1,4 @@
<vector android:height="24dp" android:tint="@color/cyanea_accent"
<vector android:height="24dp" android:tint="#FFFFFF"
android:viewportHeight="24" android:viewportWidth="24"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M12,3c-4.97,0 -9,4.03 -9,9s4.03,9 9,9c0.83,0 1.5,-0.67 1.5,-1.5 0,-0.39 -0.15,-0.74 -0.39,-1.01 -0.23,-0.26 -0.38,-0.61 -0.38,-0.99 0,-0.83 0.67,-1.5 1.5,-1.5L16,16c2.76,0 5,-2.24 5,-5 0,-4.42 -4.03,-8 -9,-8zM6.5,12c-0.83,0 -1.5,-0.67 -1.5,-1.5S5.67,9 6.5,9 8,9.67 8,10.5 7.33,12 6.5,12zM9.5,8C8.67,8 8,7.33 8,6.5S8.67,5 9.5,5s1.5,0.67 1.5,1.5S10.33,8 9.5,8zM14.5,8c-0.83,0 -1.5,-0.67 -1.5,-1.5S13.67,5 14.5,5s1.5,0.67 1.5,1.5S15.33,8 14.5,8zM17.5,12c-0.83,0 -1.5,-0.67 -1.5,-1.5S16.67,9 17.5,9s1.5,0.67 1.5,1.5 -0.67,1.5 -1.5,1.5z"/>

View File

@ -4,7 +4,7 @@
android:viewportHeight="512"
android:width="24dp"
android:height="24dp"
android:tint="@color/cyanea_accent">
android:tint="#FFFFFF">
<path
android:fillColor="#000000"

View File

@ -1,4 +1,4 @@
<vector android:height="24dp" android:tint="@color/cyanea_accent"
<vector android:height="24dp" android:tint="#FFFFFF"
android:viewportHeight="24" android:viewportWidth="24"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M18,16.08c-0.76,0 -1.44,0.3 -1.96,0.77L8.91,12.7c0.05,-0.23 0.09,-0.46 0.09,-0.7s-0.04,-0.47 -0.09,-0.7l7.05,-4.11c0.54,0.5 1.25,0.81 2.04,0.81 1.66,0 3,-1.34 3,-3s-1.34,-3 -3,-3 -3,1.34 -3,3c0,0.24 0.04,0.47 0.09,0.7L8.04,9.81C7.5,9.31 6.79,9 6,9c-1.66,0 -3,1.34 -3,3s1.34,3 3,3c0.79,0 1.5,-0.31 2.04,-0.81l7.12,4.16c-0.05,0.21 -0.08,0.43 -0.08,0.65 0,1.61 1.31,2.92 2.92,2.92 1.61,0 2.92,-1.31 2.92,-2.92s-1.31,-2.92 -2.92,-2.92z"/>

View File

@ -1,5 +1,5 @@
<vector android:height="24dp"
android:viewportHeight="24" android:viewportWidth="24"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@color/cyanea_accent" android:pathData="M3,18h6v-2L3,16v2zM3,6v2h18L21,6L3,6zM3,13h12v-2L3,11v2z"/>
<path android:fillColor="#FFFFFF" android:pathData="M3,18h6v-2L3,16v2zM3,6v2h18L21,6L3,6zM3,13h12v-2L3,11v2z"/>
</vector>

View File

@ -1,5 +1,5 @@
<vector android:height="24dp" android:tint="#FFFFFF"
android:viewportHeight="24" android:viewportWidth="24"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M6,6h12v12H6z"/>
<path android:fillColor="#FFFFFF" android:pathData="M6,6h12v12H6z"/>
</vector>

View File

@ -1,5 +1,5 @@
<vector android:height="24dp" android:tint="@color/cyanea_accent"
<vector android:height="24dp" android:tint="#FFFFFF"
android:viewportHeight="24" android:viewportWidth="24"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M1,21h22L12,2 1,21zM13,18h-2v-2h2v2zM13,14h-2v-4h2v4z"/>
<path android:fillColor="#FFFFFF" android:pathData="M1,21h22L12,2 1,21zM13,18h-2v-2h2v2zM13,14h-2v-4h2v4z"/>
</vector>

View File

@ -39,7 +39,7 @@
<sushi.hardcore.droidfs.widgets.ColoredImageButton
android:layout_width="40dp"
android:layout_height="40dp"
android:onClick="pick_directory"
android:onClick="pickDirectory"
android:scaleType="fitCenter"
android:background="#00000000"
android:src="@drawable/icon_folder" />

View File

@ -38,7 +38,7 @@
<sushi.hardcore.droidfs.widgets.ColoredImageButton
android:layout_width="40dp"
android:layout_height="40dp"
android:onClick="pick_directory"
android:onClick="pickDirectory"
android:scaleType="fitCenter"
android:background="#00000000"
android:src="@drawable/icon_folder" />

View File

@ -34,7 +34,8 @@
android:layout_marginHorizontal="@dimen/main_activity_button_hor_margin"
android:layout_marginVertical="@dimen/main_activity_button_ver_margin"
android:onClick="onClickOpen"
android:text="@string/open_volume" />
android:text="@string/open_volume"
style="@style/button"/>
<Button
android:layout_width="match_parent"
@ -42,7 +43,8 @@
android:layout_marginHorizontal="@dimen/main_activity_button_hor_margin"
android:layout_marginVertical="@dimen/main_activity_button_ver_margin"
android:onClick="onClickCreate"
android:text="@string/create_volume" />
android:text="@string/create_volume"
style="@style/button"/>
<Button
android:layout_width="match_parent"
@ -50,7 +52,8 @@
android:layout_marginHorizontal="@dimen/main_activity_button_hor_margin"
android:layout_marginVertical="@dimen/main_activity_button_ver_margin"
android:onClick="onClickChangePassword"
android:text="@string/change_volume_password" />
android:text="@string/change_volume_password"
style="@style/button"/>
</LinearLayout>

View File

@ -39,7 +39,7 @@
<sushi.hardcore.droidfs.widgets.ColoredImageButton
android:layout_width="40dp"
android:layout_height="40dp"
android:onClick="pick_directory"
android:onClick="pickDirectory"
android:scaleType="fitCenter"
android:background="#00000000"
android:src="@drawable/icon_folder"/>

View File

@ -9,12 +9,12 @@
<color name="cyanea_accent">@color/themeColor</color>
<color name="backgroundColor">#333333</color>
<color name="fullScreenBackgroundColor">#000000</color>
<color name="textColor">#ffffff</color>
<color name="textColor">#FFFFFF</color>
<color name="buttonBackgroundColor">#5B5A5C</color>
<color name="item_selected">#66666666</color>
<color name="menuIcon">#ffffff</color>
<color name="menuIcon">#FFFFFF</color>
<color name="infoBarBackgroundColor">#111111</color>
<color name="fingerprint_wait">#ffffff</color>
<color name="fingerprint_wait">#FFFFFF</color>
<color name="fingerprint_success">#6CC341</color>
<color name="fingerprint_failed">#ff0000</color>
</resources>

View File

@ -1,12 +1,12 @@
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.DayNight.NoActionBar">
<style name="AppTheme" parent="Theme.Cyanea.Dark.NoActionBar">
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<!--<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorAccent">@color/colorAccent</item>-->
<item name="android:colorBackground">@color/backgroundColor</item>
<item name="android:textColor">@color/textColor</item>
<item name="buttonStyle">@style/button</item>
<!--<item name="buttonStyle">@style/button</item>-->
<item name="checkboxStyle">@style/checkbox</item>
<!--<item name="actionOverflowMenuStyle">@style/menu_overflow</item>-->
</style>