mirror of
https://github.com/Kunzisoft/KeePassDX.git
synced 2026-11-26 03:46:46 -08:00
Better file manager installation description
This commit is contained in:
1 parent
b75475d785
commit
2e5220fa8a
33 files changed
+49
-47
No files matched your search
@@ -213,7 +213,6 @@ class FileDatabaseSelectActivity : StylishActivity(),
|
||||
private fun createNewFile() {
|
||||
try {
|
||||
startActivityForResult(Intent(
|
||||
// TODO orientation change
|
||||
Intent.ACTION_CREATE_DOCUMENT).apply {
|
||||
addCategory(Intent.CATEGORY_OPENABLE)
|
||||
type = "application/x-keepass"
|
||||
@@ -222,13 +221,7 @@ class FileDatabaseSelectActivity : StylishActivity(),
|
||||
},
|
||||
CREATE_FILE_REQUEST_CODE)
|
||||
} catch (e: Exception) {
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.KITKAT) {
|
||||
// Do the historic action to create a new database file
|
||||
|
||||
} else {
|
||||
// TODO show dialog
|
||||
BrowserDialogFragment().show(supportFragmentManager, "browserDialog")
|
||||
}
|
||||
BrowserDialogFragment().show(supportFragmentManager, "browserDialog")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@ import android.os.Bundle
|
||||
import android.support.v4.app.DialogFragment
|
||||
import android.support.v7.app.AlertDialog
|
||||
import android.widget.Button
|
||||
import android.widget.TextView
|
||||
import com.kunzisoft.keepass.R
|
||||
import com.kunzisoft.keepass.utils.Util
|
||||
|
||||
@@ -37,13 +38,16 @@ class BrowserDialogFragment : DialogFragment() {
|
||||
builder.setView(root)
|
||||
.setNegativeButton(R.string.cancel) { _, _ -> }
|
||||
|
||||
val market = root.findViewById<Button>(R.id.install_market)
|
||||
val textDescription = root.findViewById<TextView>(R.id.file_manager_install_description)
|
||||
textDescription.text = getString(R.string.file_manager_install_description)
|
||||
|
||||
val market = root.findViewById<Button>(R.id.file_manager_install_play_store)
|
||||
market.setOnClickListener {
|
||||
Util.gotoUrl(context!!, R.string.filemanager_play_store)
|
||||
dismiss()
|
||||
}
|
||||
|
||||
val web = root.findViewById<Button>(R.id.install_web)
|
||||
val web = root.findViewById<Button>(R.id.file_manager_install_f_droid)
|
||||
web.setOnClickListener {
|
||||
Util.gotoUrl(context!!, R.string.filemanager_f_droid)
|
||||
dismiss()
|
||||
|
||||
Reference in new issue
Block a user