mirror of
https://github.com/Kunzisoft/KeePassDX.git
synced 2025-12-04 15:49:33 +01:00
Fix autofill style
This commit is contained in:
@@ -45,6 +45,10 @@ import com.kunzisoft.keepass.utils.LOCK_ACTION
|
||||
@RequiresApi(api = Build.VERSION_CODES.O)
|
||||
class AutofillLauncherActivity : DatabaseActivity() {
|
||||
|
||||
override fun applyCustomStyle(): Boolean {
|
||||
return false
|
||||
}
|
||||
|
||||
override fun onDatabaseRetrieved(database: Database?) {
|
||||
super.onDatabaseRetrieved(database)
|
||||
|
||||
|
||||
@@ -43,6 +43,10 @@ import com.kunzisoft.keepass.settings.PreferencesUtil
|
||||
*/
|
||||
class EntrySelectionLauncherActivity : DatabaseActivity() {
|
||||
|
||||
override fun applyCustomStyle(): Boolean {
|
||||
return false
|
||||
}
|
||||
|
||||
override fun onDatabaseRetrieved(database: Database?) {
|
||||
super.onDatabaseRetrieved(database)
|
||||
var sharedWebDomain: String? = null
|
||||
|
||||
@@ -28,6 +28,10 @@ import com.kunzisoft.keepass.database.search.SearchHelper
|
||||
*/
|
||||
class MagikeyboardLauncherActivity : DatabaseActivity() {
|
||||
|
||||
override fun applyCustomStyle(): Boolean {
|
||||
return false
|
||||
}
|
||||
|
||||
override fun onDatabaseRetrieved(database: Database?) {
|
||||
super.onDatabaseRetrieved(database)
|
||||
val readOnly = database?.isReadOnly != false
|
||||
|
||||
@@ -35,6 +35,7 @@ abstract class StylishActivity : AppCompatActivity() {
|
||||
|
||||
@StyleRes
|
||||
private var themeId: Int = 0
|
||||
private var customStyle = true
|
||||
|
||||
/* (non-Javadoc) Workaround for HTC Linkify issues
|
||||
* @see android.app.Activity#startActivity(android.content.Intent)
|
||||
@@ -52,10 +53,18 @@ abstract class StylishActivity : AppCompatActivity() {
|
||||
}
|
||||
}
|
||||
|
||||
open fun applyCustomStyle(): Boolean {
|
||||
return true
|
||||
}
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
this.themeId = Stylish.getThemeId(this)
|
||||
setTheme(themeId)
|
||||
|
||||
customStyle = applyCustomStyle()
|
||||
if (customStyle) {
|
||||
this.themeId = Stylish.getThemeId(this)
|
||||
setTheme(themeId)
|
||||
}
|
||||
|
||||
// Several gingerbread devices have problems with FLAG_SECURE
|
||||
window.setFlags(WindowManager.LayoutParams.FLAG_SECURE, WindowManager.LayoutParams.FLAG_SECURE)
|
||||
@@ -63,7 +72,8 @@ abstract class StylishActivity : AppCompatActivity() {
|
||||
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
if (Stylish.getThemeId(this) != this.themeId) {
|
||||
|
||||
if (customStyle && Stylish.getThemeId(this) != this.themeId) {
|
||||
Log.d(this.javaClass.name, "Theme change detected, restarting activity")
|
||||
this.recreate()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user