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)
|
@RequiresApi(api = Build.VERSION_CODES.O)
|
||||||
class AutofillLauncherActivity : DatabaseActivity() {
|
class AutofillLauncherActivity : DatabaseActivity() {
|
||||||
|
|
||||||
|
override fun applyCustomStyle(): Boolean {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
override fun onDatabaseRetrieved(database: Database?) {
|
override fun onDatabaseRetrieved(database: Database?) {
|
||||||
super.onDatabaseRetrieved(database)
|
super.onDatabaseRetrieved(database)
|
||||||
|
|
||||||
|
|||||||
@@ -43,6 +43,10 @@ import com.kunzisoft.keepass.settings.PreferencesUtil
|
|||||||
*/
|
*/
|
||||||
class EntrySelectionLauncherActivity : DatabaseActivity() {
|
class EntrySelectionLauncherActivity : DatabaseActivity() {
|
||||||
|
|
||||||
|
override fun applyCustomStyle(): Boolean {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
override fun onDatabaseRetrieved(database: Database?) {
|
override fun onDatabaseRetrieved(database: Database?) {
|
||||||
super.onDatabaseRetrieved(database)
|
super.onDatabaseRetrieved(database)
|
||||||
var sharedWebDomain: String? = null
|
var sharedWebDomain: String? = null
|
||||||
|
|||||||
@@ -28,6 +28,10 @@ import com.kunzisoft.keepass.database.search.SearchHelper
|
|||||||
*/
|
*/
|
||||||
class MagikeyboardLauncherActivity : DatabaseActivity() {
|
class MagikeyboardLauncherActivity : DatabaseActivity() {
|
||||||
|
|
||||||
|
override fun applyCustomStyle(): Boolean {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
override fun onDatabaseRetrieved(database: Database?) {
|
override fun onDatabaseRetrieved(database: Database?) {
|
||||||
super.onDatabaseRetrieved(database)
|
super.onDatabaseRetrieved(database)
|
||||||
val readOnly = database?.isReadOnly != false
|
val readOnly = database?.isReadOnly != false
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ abstract class StylishActivity : AppCompatActivity() {
|
|||||||
|
|
||||||
@StyleRes
|
@StyleRes
|
||||||
private var themeId: Int = 0
|
private var themeId: Int = 0
|
||||||
|
private var customStyle = true
|
||||||
|
|
||||||
/* (non-Javadoc) Workaround for HTC Linkify issues
|
/* (non-Javadoc) Workaround for HTC Linkify issues
|
||||||
* @see android.app.Activity#startActivity(android.content.Intent)
|
* @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?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
|
|
||||||
|
customStyle = applyCustomStyle()
|
||||||
|
if (customStyle) {
|
||||||
this.themeId = Stylish.getThemeId(this)
|
this.themeId = Stylish.getThemeId(this)
|
||||||
setTheme(themeId)
|
setTheme(themeId)
|
||||||
|
}
|
||||||
|
|
||||||
// Several gingerbread devices have problems with FLAG_SECURE
|
// Several gingerbread devices have problems with FLAG_SECURE
|
||||||
window.setFlags(WindowManager.LayoutParams.FLAG_SECURE, WindowManager.LayoutParams.FLAG_SECURE)
|
window.setFlags(WindowManager.LayoutParams.FLAG_SECURE, WindowManager.LayoutParams.FLAG_SECURE)
|
||||||
@@ -63,7 +72,8 @@ abstract class StylishActivity : AppCompatActivity() {
|
|||||||
|
|
||||||
override fun onResume() {
|
override fun onResume() {
|
||||||
super.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")
|
Log.d(this.javaClass.name, "Theme change detected, restarting activity")
|
||||||
this.recreate()
|
this.recreate()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user