From ff9a839ebd3c3269efd41e4795c39beccbdc08ea Mon Sep 17 00:00:00 2001 From: 4f77616973 <0x4f@tuta.io> Date: Sun, 29 Jan 2023 23:56:33 +0530 Subject: [PATCH 1/5] made settings UI match Android 13 spec even more --- .../kotlin/cloud/keyspace/android/Settings.kt | 9 +- app/src/main/res/layout/settings.xml | 97 +++++++++++-------- 2 files changed, 61 insertions(+), 45 deletions(-) diff --git a/app/src/main/kotlin/cloud/keyspace/android/Settings.kt b/app/src/main/kotlin/cloud/keyspace/android/Settings.kt index edc97fd..3f192a3 100644 --- a/app/src/main/kotlin/cloud/keyspace/android/Settings.kt +++ b/app/src/main/kotlin/cloud/keyspace/android/Settings.kt @@ -27,6 +27,9 @@ class Settings : AppCompatActivity() { val configData = getSharedPreferences (applicationContext.packageName + "_configuration_data", MODE_PRIVATE) + val backButton: ImageView = findViewById(R.id.backButton) + backButton.setOnClickListener { onBackPressed() } + val keyspaceAccountPicture: ImageView = findViewById(R.id.keyspaceAccountPicture) keyspaceAccountPicture.setImageDrawable(MiscUtilities(applicationContext).generateProfilePicture(configData.getString("userEmail", null)!!)) @@ -59,14 +62,14 @@ class Settings : AppCompatActivity() { val strongBoxIcon: ImageView = findViewById(R.id.strongBoxTypeIcon) if (applicationContext.packageManager.hasSystemFeature(PackageManager.FEATURE_STRONGBOX_KEYSTORE)) { // Check if strongbox / hardware keystore exists - strongBoxText.text = "Keyspace is encrypting your keys and tokens using tamper-resistant Strongbox hardware on your phone." + strongBoxText.text = "Keys are encrypted using tamper-resistant Strongbox hardware." strongBoxIcon.setImageDrawable(getDrawable(R.drawable.ic_baseline_chip_24)) } else { if (applicationContext.packageManager.hasSystemFeature(PackageManager.FEATURE_HARDWARE_KEYSTORE)) { - strongBoxText.text = "Your phone doesn't contain Strongbox hardware. Using Hardware Abstraction Layer (HAL) based Keystore." + strongBoxText.text = "Keys are encrypted using Hardware Abstraction Layer (HAL) Keystore." strongBoxIcon.setImageDrawable(getDrawable(R.drawable.ic_baseline_code_24)) } else { - strongBoxText.text = "Your phone doesn't contain strongbox hardware. Using container-based Keystore." + strongBoxText.text = "Keys are encrypted using container-based Keystore." strongBoxIcon.setImageDrawable(getDrawable(R.drawable.ic_baseline_insert_drive_file_24)) } } diff --git a/app/src/main/res/layout/settings.xml b/app/src/main/res/layout/settings.xml index 9ed4cd6..85d8ebf 100644 --- a/app/src/main/res/layout/settings.xml +++ b/app/src/main/res/layout/settings.xml @@ -20,12 +20,21 @@ android:layout_height="match_parent" android:paddingBottom="50dp" android:orientation="vertical" - android:paddingTop="55dp"> + android:paddingTop="15dp" > + + + android:textSize="35sp" />