Major UI overhaul and the introduction of a new icon (#920)

Co-authored-by: Fabian Henneke <fabian@henneke.me>
This commit is contained in:
Harsh Shandilya 2020-07-07 19:18:24 +05:30 committed by GitHub
parent 035d3feaa4
commit 5d170249cd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
87 changed files with 333 additions and 371 deletions

View file

@ -4,11 +4,19 @@ All notable changes to this project will be documented in this file.
## [Unreleased] ## [Unreleased]
### Changed
- A brand new icon to go with our biggest update ever!
- Light theme is now a consistent white across the board with ample contrast
- XkPassword generator is now easier to use with less configuration options
### Fixed ### Fixed
- Folder names that were very long did not look right - Folder names that were very long did not look right
- Error message for wrong SSH/HTTPS password now looks cleaner - Error message for wrong SSH/HTTPS password now looks cleaner
- Fix authentication failure with usernames that contain the `@` character - Fix authentication failure with usernames that contain the `@` character
- Text input boxes were illegible on dark theme
- Top-level password names had inconsistent top margin making them look askew
### Added ### Added

View file

@ -1,31 +0,0 @@
<!--
~ Copyright © 2014-2020 The Android Password Store Authors. All Rights Reserved.
~ SPDX-License-Identifier: GPL-3.0-only
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="110.34687"
android:viewportHeight="110.34687">
<group
android:translateX="24.828047"
android:translateY="24.828047">
<path
android:fillColor="#00000000"
android:pathData="m18.8,30.2129v-11.546c0,-6.4144 5.1315,-11.546 11.546,-11.546 6.4144,0 11.546,5.1315 11.546,11.546v11.546"
android:strokeWidth="5.349"
android:strokeColor="#013e5b" />
<path
android:fillColor="#c74c00"
android:pathData="M15.4099,21.8429L45.2811,21.8429A2.2639,2.2639 0,0 1,47.545 24.1068L47.545,53.977A2.2639,2.2639 0,0 1,45.2811 56.2409L15.4099,56.2409A2.2639,2.2639 0,0 1,13.146 53.977L13.146,24.1068A2.2639,2.2639 0,0 1,15.4099 21.8429z" />
<path
android:fillColor="#fff"
android:pathData="m44.8267,37.6961 l-13.1408,-13.1393c-0.7569,-0.7566 -1.9838,-0.7566 -2.7408,0l-13.08,13.0785c-0.7567,0.7573 -0.7567,1.9846 0,2.7419l13.1415,13.14c0.7572,0.7567 1.9842,0.7567 2.7414,0l13.0778,-13.0785c0.7572,-0.7572 0.7572,-1.9849 0,-2.7421"
android:strokeWidth=".35344" />
<path
android:fillColor="#f47a68"
android:pathData="m30.3156,23.9881c-0.496,0 -0.992,0.1893 -1.3705,0.5676l-2.7282,2.7288 3.4612,3.4606c0.8044,-0.2715 1.727,-0.0892 2.368,0.5517 0.6237,0.624 0.8361,1.5493 0.5471,2.3828l3.3357,3.3357c0.8076,-0.2777 1.738,-0.098 2.3828,0.5476 0.9008,0.9005 0.9008,2.361 0,3.2615 -1.7823,1.7848 -4.7253,-0.1767 -3.7641,-2.5087l-3.1111,-3.1106c-2.2315,0.5285 -3.8934,-1.2655 -3.149,-3.1674l-0.6863,-0.6863l0,15.9165l5.4913,0l0,-5.8608c-0.0315,-0.7566 1.1201,-0.7566 1.0886,0l0,6.4043c0.0005,0.3013 -0.2438,0.5457 -0.545,0.5455l-6.5804,0c-0.3015,0.0005 -0.546,-0.2441 -0.5456,-0.5455l0,-17.4333c-0.0005,-0.0363 0.0029,-0.0728 0.0097,-0.1085l-1.6444,-1.6444 -9.0106,9.0084c-0.7567,0.7573 -0.7567,1.9848 0,2.7421l13.1415,13.14c0.7572,0.7567 1.9844,0.7567 2.7416,0l13.0778,-13.0785c0.7572,-0.7572 0.7572,-1.9849 0,-2.7421l-13.14,-13.1393c-0.3785,-0.3783 -0.8746,-0.5676 -1.3705,-0.5676zM29.9512,39.1825c0.1001,0 0.1808,0.0381 0.2426,0.1146 0.0648,0.0736 0.1326,0.1975 0.2032,0.371 0.0705,0.1706 0.1089,0.2615 0.1146,0.2733 0.0059,-0.0119 0.0424,-0.1026 0.11,-0.2733 0.0707,-0.1705 0.1401,-0.2946 0.2078,-0.371 0.0677,-0.0765 0.1513,-0.1146 0.2513,-0.1146 0.1412,0 0.2646,0.047 0.3705,0.1412 0.1059,0.0941 0.1592,0.2103 0.1592,0.3485 0,0.0676 -0.0179,0.1368 -0.0532,0.2073 -0.0323,0.0707 -0.0777,0.1444 -0.1366,0.2211 -0.056,0.0734 -0.1164,0.1571 -0.1812,0.2513 0.0648,-0.0089 0.1589,-0.0251 0.2825,-0.0486 0.1265,-0.0236 0.2268,-0.0354 0.3004,-0.0354 0.0969,0 0.1762,0.0224 0.238,0.0666 0.0648,0.0442 0.1118,0.1042 0.1413,0.1807 0.0294,0.0734 0.044,0.1544 0.044,0.2426 0,0.1384 -0.0337,0.2544 -0.1013,0.3485 -0.0677,0.0912 -0.1749,0.1372 -0.3219,0.1372 -0.0472,0 -0.14,-0.0119 -0.2784,-0.0354 -0.1382,-0.0236 -0.2397,-0.0386 -0.3045,-0.0446 0.1531,0.2177 0.2534,0.3652 0.3004,0.4417 0.047,0.0736 0.0706,0.1544 0.0706,0.2426 0,0.1412 -0.0533,0.2556 -0.1592,0.3439 -0.1028,0.0853 -0.2264,0.1279 -0.3705,0.1279 -0.1028,0 -0.1882,-0.0366 -0.2559,-0.11 -0.0646,-0.0767 -0.1309,-0.1955 -0.1986,-0.3572 -0.0646,-0.1647 -0.1028,-0.259 -0.1146,-0.2825 -0.0117,0.0235 -0.0516,0.1178 -0.1192,0.2825 -0.0648,0.1646 -0.1281,0.2836 -0.1899,0.3572 -0.0617,0.0735 -0.1454,0.11 -0.2513,0.11 -0.15,0 -0.2779,-0.0427 -0.3838,-0.1279 -0.1059,-0.0883 -0.1587,-0.2027 -0.1587,-0.3439 0,-0.0618 0.0156,-0.1263 0.0481,-0.194 0.0323,-0.0707 0.0665,-0.1311 0.1018,-0.1812 0.0382,-0.0499 0.1118,-0.1532 0.2206,-0.3091 -0.0736,0.0059 -0.1751,0.021 -0.3045,0.0446 -0.1294,0.0236 -0.2176,0.0354 -0.2646,0.0354 -0.1472,0 -0.2577,-0.046 -0.3311,-0.1372 -0.0707,-0.0941 -0.1059,-0.2101 -0.1059,-0.3485 0,-0.1411 0.0352,-0.2573 0.1059,-0.3485 0.0734,-0.0942 0.184,-0.1412 0.3311,-0.1412 0.0736,0 0.1628,0.0107 0.2687,0.0312 0.1059,0.0206 0.2062,0.038 0.3004,0.0527 -0.0824,-0.1177 -0.1648,-0.2366 -0.2472,-0.3572 -0.0824,-0.1206 -0.1233,-0.2282 -0.1233,-0.3224 0,-0.1382 0.0543,-0.2544 0.1633,-0.3485 0.1088,-0.0942 0.2351,-0.1412 0.3792,-0.1412zM29.9512,43.2235c0.1001,0 0.1808,0.0383 0.2426,0.1146 0.0648,0.0735 0.1326,0.197 0.2032,0.3705 0.0705,0.1707 0.1089,0.262 0.1146,0.2738 0.0059,-0.0119 0.0424,-0.1031 0.11,-0.2738 0.0707,-0.1705 0.1401,-0.2941 0.2078,-0.3705 0.0677,-0.0765 0.1513,-0.1146 0.2513,-0.1146 0.1412,0 0.2646,0.047 0.3705,0.1412 0.1059,0.0941 0.1592,0.2102 0.1592,0.3485 0,0.0675 -0.0179,0.1366 -0.0532,0.2073 -0.0323,0.0705 -0.0777,0.1441 -0.1366,0.2206 -0.056,0.0735 -0.1164,0.1576 -0.1812,0.2518 0.0648,-0.0089 0.1589,-0.0251 0.2825,-0.0486 0.1265,-0.0236 0.2268,-0.0353 0.3004,-0.0353 0.0969,0 0.1762,0.0219 0.238,0.0661 0.0648,0.0442 0.1118,0.1047 0.1413,0.1812 0.0294,0.0736 0.044,0.1542 0.044,0.2426 0,0.1382 -0.0337,0.2544 -0.1013,0.3485 -0.0677,0.0912 -0.1749,0.1366 -0.3219,0.1366 -0.0472,0 -0.14,-0.0119 -0.2784,-0.0354 -0.1382,-0.0236 -0.2397,-0.038 -0.3045,-0.044 0.1531,0.2177 0.2534,0.3647 0.3004,0.4411 0.047,0.0736 0.0706,0.1549 0.0706,0.2431 0,0.1411 -0.0533,0.2558 -0.1592,0.3439 -0.1028,0.0854 -0.2264,0.1279 -0.3705,0.1279 -0.1028,0 -0.1882,-0.0371 -0.2559,-0.1105 -0.0646,-0.0765 -0.1309,-0.1955 -0.1986,-0.3572 -0.0646,-0.1647 -0.1028,-0.259 -0.1146,-0.2825 -0.0117,0.0236 -0.0516,0.1178 -0.1192,0.2825 -0.0648,0.1648 -0.1281,0.2836 -0.1899,0.3572 -0.0617,0.0735 -0.1454,0.1105 -0.2513,0.1105 -0.15,0 -0.2779,-0.0425 -0.3838,-0.1279 -0.1059,-0.0881 -0.1587,-0.2028 -0.1587,-0.3439 0,-0.0617 0.0156,-0.1268 0.0481,-0.1945 0.0323,-0.0705 0.0665,-0.1311 0.1018,-0.1812 0.0382,-0.0499 0.1118,-0.1527 0.2206,-0.3086 -0.0736,0.0059 -0.1751,0.0205 -0.3045,0.044 -0.1294,0.0236 -0.2176,0.0354 -0.2646,0.0354 -0.1472,0 -0.2577,-0.0454 -0.3311,-0.1366 -0.0707,-0.0941 -0.1059,-0.2103 -0.1059,-0.3485 0,-0.1412 0.0352,-0.2573 0.1059,-0.3485 0.0734,-0.0942 0.184,-0.1412 0.3311,-0.1412 0.0736,0 0.1628,0.0101 0.2687,0.0307 0.1059,0.0204 0.2062,0.0384 0.3004,0.0532 -0.0824,-0.1177 -0.1648,-0.2371 -0.2472,-0.3577 -0.0824,-0.1206 -0.1233,-0.2278 -0.1233,-0.3219 0,-0.1384 0.0543,-0.2544 0.1633,-0.3485 0.1088,-0.0942 0.2351,-0.1412 0.3792,-0.1412z"
android:strokeWidth="1.3358" />
</group>
</vector>

View file

@ -9,7 +9,6 @@ import android.content.IntentSender
import android.os.Build import android.os.Build
import androidx.annotation.RequiresApi import androidx.annotation.RequiresApi
import androidx.appcompat.app.AppCompatActivity import androidx.appcompat.app.AppCompatActivity
import com.zeapo.pwdstore.autofill.oreo.FormOrigin
@RequiresApi(Build.VERSION_CODES.O) @RequiresApi(Build.VERSION_CODES.O)
@Suppress("UNUSED_PARAMETER") @Suppress("UNUSED_PARAMETER")

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

View file

@ -3,6 +3,7 @@
* SPDX-License-Identifier: GPL-3.0-only * SPDX-License-Identifier: GPL-3.0-only
*/ */
@file:Suppress("Deprecation") @file:Suppress("Deprecation")
package com.zeapo.pwdstore.autofill package com.zeapo.pwdstore.autofill
import android.app.PendingIntent import android.app.PendingIntent

View file

@ -3,6 +3,7 @@
* SPDX-License-Identifier: GPL-3.0-only * SPDX-License-Identifier: GPL-3.0-only
*/ */
@file:Suppress("Deprecation") @file:Suppress("Deprecation")
package com.zeapo.pwdstore.autofill package com.zeapo.pwdstore.autofill
import android.annotation.SuppressLint import android.annotation.SuppressLint

View file

@ -3,6 +3,7 @@
* SPDX-License-Identifier: GPL-3.0-only * SPDX-License-Identifier: GPL-3.0-only
*/ */
@file:Suppress("Deprecation") @file:Suppress("Deprecation")
package com.zeapo.pwdstore.autofill package com.zeapo.pwdstore.autofill
import android.content.Context import android.content.Context

View file

@ -3,6 +3,7 @@
* SPDX-License-Identifier: GPL-3.0-only * SPDX-License-Identifier: GPL-3.0-only
*/ */
@file:Suppress("Deprecation") @file:Suppress("Deprecation")
package com.zeapo.pwdstore.autofill package com.zeapo.pwdstore.autofill
import android.content.Context import android.content.Context

View file

@ -3,6 +3,7 @@
* SPDX-License-Identifier: GPL-3.0-only * SPDX-License-Identifier: GPL-3.0-only
*/ */
@file:Suppress("Deprecation") @file:Suppress("Deprecation")
package com.zeapo.pwdstore.autofill package com.zeapo.pwdstore.autofill
import android.accessibilityservice.AccessibilityService import android.accessibilityservice.AccessibilityService

View file

@ -104,7 +104,11 @@ class PasswordCreationActivity : BasePgpActivity(), OpenPgpServiceConnection.OnB
oldCategory = path oldCategory = path
} }
} }
suggestedName?.let { filename.setText(it) } if (suggestedName != null) {
filename.setText(suggestedName)
} else {
filename.requestFocus()
}
// Allow the user to quickly switch between storing the username as the filename or // Allow the user to quickly switch between storing the username as the filename or
// in the encrypted extras. This only makes sense if the directory structure is // in the encrypted extras. This only makes sense if the directory structure is
// FileBased. // FileBased.
@ -164,7 +168,7 @@ class PasswordCreationActivity : BasePgpActivity(), OpenPgpServiceConnection.OnB
override fun onOptionsItemSelected(item: MenuItem): Boolean { override fun onOptionsItemSelected(item: MenuItem): Boolean {
when (item.itemId) { when (item.itemId) {
android.R.id.home, R.id.cancel_password_add -> { android.R.id.home -> {
setResult(RESULT_CANCELED) setResult(RESULT_CANCELED)
finish() finish()
} }

View file

@ -65,7 +65,11 @@ open class PasswordItemRecyclerAdapter :
} else { } else {
typeImage.setImageResource(R.drawable.ic_action_secure_24dp) typeImage.setImageResource(R.drawable.ic_action_secure_24dp)
val parentPath = item.fullPathToParent.replace("(^/)|(/$)".toRegex(), "") val parentPath = item.fullPathToParent.replace("(^/)|(/$)".toRegex(), "")
val source = "$parentPath\n$item" val source = if (parentPath.isNotEmpty()) {
"$parentPath\n$item"
} else {
"$item"
}
val spannable = SpannableString(source) val spannable = SpannableString(source)
spannable.setSpan(RelativeSizeSpan(0.7f), 0, parentPath.length, 0) spannable.setSpan(RelativeSizeSpan(0.7f), 0, parentPath.length, 0)
name.text = spannable name.text = spannable

View file

@ -9,18 +9,16 @@ import android.content.Context
import android.content.SharedPreferences import android.content.SharedPreferences
import android.graphics.Typeface import android.graphics.Typeface
import android.os.Bundle import android.os.Bundle
import android.widget.CheckBox
import android.widget.EditText import android.widget.EditText
import android.widget.Spinner
import android.widget.Toast import android.widget.Toast
import androidx.appcompat.app.AlertDialog import androidx.appcompat.app.AlertDialog
import androidx.appcompat.widget.AppCompatEditText
import androidx.appcompat.widget.AppCompatTextView import androidx.appcompat.widget.AppCompatTextView
import androidx.core.content.edit import androidx.core.content.edit
import androidx.fragment.app.DialogFragment import androidx.fragment.app.DialogFragment
import com.github.ajalt.timberkt.Timber.tag import com.github.ajalt.timberkt.Timber.tag
import com.google.android.material.dialog.MaterialAlertDialogBuilder import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.zeapo.pwdstore.R import com.zeapo.pwdstore.R
import com.zeapo.pwdstore.databinding.FragmentXkpwgenBinding
import com.zeapo.pwdstore.pwgen.PasswordGenerator import com.zeapo.pwdstore.pwgen.PasswordGenerator
import com.zeapo.pwdstore.pwgenxkpwd.CapsType import com.zeapo.pwdstore.pwgenxkpwd.CapsType
import com.zeapo.pwdstore.pwgenxkpwd.PasswordBuilder import com.zeapo.pwdstore.pwgenxkpwd.PasswordBuilder
@ -28,72 +26,45 @@ import com.zeapo.pwdstore.pwgenxkpwd.PasswordBuilder
/** A placeholder fragment containing a simple view. */ /** A placeholder fragment containing a simple view. */
class XkPasswordGeneratorDialogFragment : DialogFragment() { class XkPasswordGeneratorDialogFragment : DialogFragment() {
private lateinit var editSeparator: AppCompatEditText
private lateinit var editNumWords: AppCompatEditText
private lateinit var cbSymbols: CheckBox
private lateinit var spinnerCapsType: Spinner
private lateinit var cbNumbers: CheckBox
private lateinit var prefs: SharedPreferences private lateinit var prefs: SharedPreferences
private lateinit var spinnerNumbersCount: Spinner private lateinit var binding: FragmentXkpwgenBinding
private lateinit var spinnerSymbolsCount: Spinner
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog { override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
val builder = MaterialAlertDialogBuilder(requireContext()) val builder = MaterialAlertDialogBuilder(requireContext())
val callingActivity = requireActivity() val callingActivity = requireActivity()
val inflater = callingActivity.layoutInflater val inflater = callingActivity.layoutInflater
val view = inflater.inflate(R.layout.fragment_xkpwgen, null) binding = FragmentXkpwgenBinding.inflate(inflater)
val monoTypeface = Typeface.createFromAsset(callingActivity.assets, "fonts/sourcecodepro.ttf") val monoTypeface = Typeface.createFromAsset(callingActivity.assets, "fonts/sourcecodepro.ttf")
builder.setView(view) builder.setView(binding.root)
prefs = callingActivity.getSharedPreferences("PasswordGenerator", Context.MODE_PRIVATE) prefs = callingActivity.getSharedPreferences("PasswordGenerator", Context.MODE_PRIVATE)
cbNumbers = view.findViewById(R.id.xknumerals)
cbNumbers.isChecked = prefs.getBoolean(PREF_KEY_USE_NUMERALS, false)
spinnerNumbersCount = view.findViewById(R.id.xk_numbers_count)
val storedNumbersCount = prefs.getInt(PREF_KEY_NUMBERS_COUNT, 0)
spinnerNumbersCount.setSelection(storedNumbersCount)
cbSymbols = view.findViewById(R.id.xksymbols)
cbSymbols.isChecked = prefs.getBoolean(PREF_KEY_USE_SYMBOLS, false) != false
spinnerSymbolsCount = view.findViewById(R.id.xk_symbols_count)
val symbolsCount = prefs.getInt(PREF_KEY_SYMBOLS_COUNT, 0)
spinnerSymbolsCount.setSelection(symbolsCount)
val previousStoredCapStyle: String = try { val previousStoredCapStyle: String = try {
prefs.getString(PREF_KEY_CAPITALS_STYLE, DEFAULT_CAPS_STYLE)!! prefs.getString(PREF_KEY_CAPITALS_STYLE, DEFAULT_CAPS_STYLE)!!
} catch (e: Exception) { } catch (e: Exception) {
tag("xkpw").e(e) tag("xkpw").e(e)
DEFAULT_CAPS_STYLE DEFAULT_CAPS_STYLE
} }
spinnerCapsType = view.findViewById(R.id.xkCapType)
val lastCapitalsStyleIndex: Int val lastCapitalsStyleIndex: Int = try {
lastCapitalsStyleIndex = try {
CapsType.valueOf(previousStoredCapStyle).ordinal CapsType.valueOf(previousStoredCapStyle).ordinal
} catch (e: Exception) { } catch (e: Exception) {
tag("xkpw").e(e) tag("xkpw").e(e)
DEFAULT_CAPS_INDEX DEFAULT_CAPS_INDEX
} }
spinnerCapsType.setSelection(lastCapitalsStyleIndex) binding.xkCapType.setSelection(lastCapitalsStyleIndex)
binding.xkNumWords.setText(prefs.getString(PREF_KEY_NUM_WORDS, DEFAULT_NUMBER_OF_WORDS))
editNumWords = view.findViewById(R.id.xk_num_words) binding.xkSeparator.setText(prefs.getString(PREF_KEY_SEPARATOR, DEFAULT_WORD_SEPARATOR))
editNumWords.setText(prefs.getString(PREF_KEY_NUM_WORDS, DEFAULT_NUMBER_OF_WORDS))
editSeparator = view.findViewById(R.id.xk_separator) binding.xkPasswordText.typeface = monoTypeface
editSeparator.setText(prefs.getString(PREF_KEY_SEPARATOR, DEFAULT_WORD_SEPARATOR))
val passwordText: AppCompatTextView = view.findViewById(R.id.xkPasswordText)
passwordText.typeface = monoTypeface
builder.setPositiveButton(resources.getString(R.string.dialog_ok)) { _, _ -> builder.setPositiveButton(resources.getString(R.string.dialog_ok)) { _, _ ->
setPreferences() setPreferences()
val edit = callingActivity.findViewById<EditText>(R.id.password) val edit = callingActivity.findViewById<EditText>(R.id.password)
edit.setText(passwordText.text) edit.setText(binding.xkPasswordText.text)
} }
// flip neutral and negative buttons // flip neutral and negative buttons
@ -104,11 +75,11 @@ class XkPasswordGeneratorDialogFragment : DialogFragment() {
dialog.setOnShowListener { dialog.setOnShowListener {
setPreferences() setPreferences()
makeAndSetPassword(passwordText) makeAndSetPassword(binding.xkPasswordText)
dialog.getButton(AlertDialog.BUTTON_NEGATIVE).setOnClickListener { dialog.getButton(AlertDialog.BUTTON_NEGATIVE).setOnClickListener {
setPreferences() setPreferences()
makeAndSetPassword(passwordText) makeAndSetPassword(binding.xkPasswordText)
} }
} }
return dialog return dialog
@ -117,13 +88,11 @@ class XkPasswordGeneratorDialogFragment : DialogFragment() {
private fun makeAndSetPassword(passwordText: AppCompatTextView) { private fun makeAndSetPassword(passwordText: AppCompatTextView) {
try { try {
passwordText.text = PasswordBuilder(requireContext()) passwordText.text = PasswordBuilder(requireContext())
.setNumberOfWords(Integer.valueOf(editNumWords.text.toString())) .setNumberOfWords(Integer.valueOf(binding.xkNumWords.text.toString()))
.setMinimumWordLength(DEFAULT_MIN_WORD_LENGTH) .setMinimumWordLength(DEFAULT_MIN_WORD_LENGTH)
.setMaximumWordLength(DEFAULT_MAX_WORD_LENGTH) .setMaximumWordLength(DEFAULT_MAX_WORD_LENGTH)
.setSeparator(editSeparator.text.toString()) .setSeparator(binding.xkSeparator.text.toString())
.appendNumbers(if (cbNumbers.isChecked) Integer.parseInt(spinnerNumbersCount.selectedItem as String) else 0) .setCapitalization(CapsType.valueOf(binding.xkCapType.selectedItem.toString())).create()
.appendSymbols(if (cbSymbols.isChecked) Integer.parseInt(spinnerSymbolsCount.selectedItem as String) else 0)
.setCapitalization(CapsType.valueOf(spinnerCapsType.selectedItem.toString())).create()
} catch (e: PasswordGenerator.PasswordGeneratorException) { } catch (e: PasswordGenerator.PasswordGeneratorException) {
Toast.makeText(requireActivity(), e.message, Toast.LENGTH_SHORT).show() Toast.makeText(requireActivity(), e.message, Toast.LENGTH_SHORT).show()
tag("xkpw").e(e, "failure generating xkpasswd") tag("xkpw").e(e, "failure generating xkpasswd")
@ -133,24 +102,16 @@ class XkPasswordGeneratorDialogFragment : DialogFragment() {
private fun setPreferences() { private fun setPreferences() {
prefs.edit { prefs.edit {
putBoolean(PREF_KEY_USE_NUMERALS, cbNumbers.isChecked) putString(PREF_KEY_CAPITALS_STYLE, binding.xkCapType.selectedItem.toString())
putBoolean(PREF_KEY_USE_SYMBOLS, cbSymbols.isChecked) putString(PREF_KEY_NUM_WORDS, binding.xkNumWords.text.toString())
putString(PREF_KEY_CAPITALS_STYLE, spinnerCapsType.selectedItem.toString()) putString(PREF_KEY_SEPARATOR, binding.xkSeparator.text.toString())
putString(PREF_KEY_NUM_WORDS, editNumWords.text.toString())
putString(PREF_KEY_SEPARATOR, editSeparator.text.toString())
putInt(PREF_KEY_NUMBERS_COUNT, Integer.parseInt(spinnerNumbersCount.selectedItem as String) - 1)
putInt(PREF_KEY_SYMBOLS_COUNT, Integer.parseInt(spinnerSymbolsCount.selectedItem as String) - 1)
} }
} }
companion object { companion object {
const val PREF_KEY_USE_NUMERALS = "pref_key_use_numerals"
const val PREF_KEY_USE_SYMBOLS = "pref_key_use_symbols"
const val PREF_KEY_CAPITALS_STYLE = "pref_key_capitals_style" const val PREF_KEY_CAPITALS_STYLE = "pref_key_capitals_style"
const val PREF_KEY_NUM_WORDS = "pref_key_num_words" const val PREF_KEY_NUM_WORDS = "pref_key_num_words"
const val PREF_KEY_SEPARATOR = "pref_key_separator" const val PREF_KEY_SEPARATOR = "pref_key_separator"
const val PREF_KEY_NUMBERS_COUNT = "pref_key_xkpwgen_numbers_count"
const val PREF_KEY_SYMBOLS_COUNT = "pref_key_symbols_count"
val DEFAULT_CAPS_STYLE = CapsType.Sentencecase.name val DEFAULT_CAPS_STYLE = CapsType.Sentencecase.name
val DEFAULT_CAPS_INDEX = CapsType.Sentencecase.ordinal val DEFAULT_CAPS_INDEX = CapsType.Sentencecase.ordinal
const val DEFAULT_NUMBER_OF_WORDS = "3" const val DEFAULT_NUMBER_OF_WORDS = "3"

View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="@color/secondary_color" android:state_focused="true" />
<item android:color="@color/secondary_color" android:state_hovered="true" />
<item android:color="@color/secondary_color" />
</selector>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

View file

@ -0,0 +1,152 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<group
android:scaleX="0.25"
android:scaleY="0.25">
<group>
<clip-path android:pathData="M0,0h432v432h-432z" />
<path android:pathData="M0,0h432v432h-432z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="216"
android:endY="432"
android:startX="216"
android:startY="0"
android:type="linear">
<item
android:color="#FF66BFFF"
android:offset="0" />
<item
android:color="#FF3C5CCE"
android:offset="1" />
</gradient>
</aapt:attr>
</path>
<path android:pathData="M0,0h432v432h-432z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="216"
android:endY="432"
android:startX="216"
android:startY="0"
android:type="linear">
<item
android:color="#E5212121"
android:offset="0" />
<item
android:color="#FF212121"
android:offset="1" />
</gradient>
</aapt:attr>
</path>
<path android:pathData="M0,0.5h432v432h-432z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="216"
android:endY="432.5"
android:startX="216"
android:startY="0.5"
android:type="linear">
<item
android:color="#FF3895EB"
android:offset="0" />
<item
android:color="#FF3545D8"
android:offset="1" />
</gradient>
</aapt:attr>
</path>
<path android:pathData="M0,0.366h432v432h-432z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="216"
android:endY="432.366"
android:startX="216"
android:startY="0.365753"
android:type="linear">
<item
android:color="#FFFFD56A"
android:offset="0" />
<item
android:color="#FFE47140"
android:offset="1" />
</gradient>
</aapt:attr>
</path>
<path
android:fillColor="#EEEEEE"
android:pathData="M0,0h432v432h-432z" />
<path android:pathData="M0,0h432v432h-432z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="216"
android:endY="432"
android:startX="216"
android:startY="0"
android:type="linear">
<item
android:color="#FF66BFFF"
android:offset="0" />
<item
android:color="#FF3C5CCE"
android:offset="1" />
</gradient>
</aapt:attr>
</path>
<path android:pathData="M0,0h432v432h-432z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="219.872"
android:endY="0.0346945"
android:startX="216"
android:startY="432"
android:type="linear">
<item
android:color="#FF212121"
android:offset="0" />
<item
android:color="#FF2C2C2C"
android:offset="1" />
</gradient>
</aapt:attr>
</path>
<path android:pathData="M0,0h432v432h-432z">
<aapt:attr name="android:fillColor">
<gradient
android:centerX="57.9512"
android:centerY="44.7805"
android:gradientRadius="516.521"
android:type="radial">
<item
android:color="#FF673BB7"
android:offset="0" />
<item
android:color="#FF43249F"
android:offset="1" />
</gradient>
</aapt:attr>
</path>
<path android:pathData="M0,0h432v432h-432z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="216"
android:endY="432"
android:startX="216"
android:startY="0"
android:type="linear">
<item
android:color="#FF00596C"
android:offset="0" />
<item
android:color="#FF002249"
android:offset="1" />
</gradient>
</aapt:attr>
</path>
</group>
</group>
</vector>

View file

@ -9,6 +9,6 @@
android:viewportWidth="24" android:viewportWidth="24"
android:viewportHeight="24"> android:viewportHeight="24">
<path <path
android:fillColor="#FFFFFFFF" android:fillColor="?attr/colorOnPrimary"
android:pathData="M20,18H4V8H20M20,6H12L10,4H4C2.89,4 2,4.89 2,6V18A2,2 0,0 0,4 20H20A2,2 0,0 0,22 18V8C22,6.89 21.1,6 20,6Z" /> android:pathData="M20,18H4V8H20M20,6H12L10,4H4C2.89,4 2,4.89 2,6V18A2,2 0,0 0,4 20H20A2,2 0,0 0,22 18V8C22,6.89 21.1,6 20,6Z" />
</vector> </vector>

View file

@ -9,6 +9,6 @@
android:viewportWidth="24" android:viewportWidth="24"
android:viewportHeight="24"> android:viewportHeight="24">
<path <path
android:fillColor="#FFFFFFFF" android:fillColor="?attr/colorOnPrimary"
android:pathData="M14,2H6A2,2 0,0 0,4 4V20A2,2 0,0 0,6 22H18A2,2 0,0 0,20 20V8L14,2M18,20H6V4H13V9H18M12.83,15A3,3 0,1 0,12.83 17H14V19H16V17H17V15M10,17A1,1 0,1 1,11 16A1,1 0,0 1,10 17Z" /> android:pathData="M14,2H6A2,2 0,0 0,4 4V20A2,2 0,0 0,6 22H18A2,2 0,0 0,20 20V8L14,2M18,20H6V4H13V9H18M12.83,15A3,3 0,1 0,12.83 17H14V19H16V17H17V15M10,17A1,1 0,1 1,11 16A1,1 0,0 1,10 17Z" />
</vector> </vector>

View file

@ -9,6 +9,6 @@
android:viewportWidth="24" android:viewportWidth="24"
android:viewportHeight="24"> android:viewportHeight="24">
<path <path
android:fillColor="#FFFFFFFF" android:fillColor="?attr/colorOnPrimary"
android:pathData="M19,13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z" /> android:pathData="M19,13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z" />
</vector> </vector>

View file

@ -1,14 +0,0 @@
<!--
~ Copyright © 2014-2020 The Android Password Store Authors. All Rights Reserved.
~ SPDX-License-Identifier: GPL-3.0-only
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="#FFFFFFFF"
android:pathData="M12,2C6.47,2 2,6.47 2,12s4.47,10 10,10 10,-4.47 10,-10S17.53,2 12,2zM12,20c-4.41,0 -8,-3.59 -8,-8s3.59,-8 8,-8 8,3.59 8,8 -3.59,8 -8,8zM15.59,7L12,10.59 8.41,7 7,8.41 10.59,12 7,15.59 8.41,17 12,13.41 15.59,17 17,15.59 13.41,12 17,8.41z" />
</vector>

View file

@ -9,6 +9,6 @@
android:viewportWidth="24" android:viewportWidth="24"
android:viewportHeight="24"> android:viewportHeight="24">
<path <path
android:fillColor="#FF000000" android:fillColor="?attr/colorOnPrimary"
android:pathData="M16,1L4,1c-1.1,0 -2,0.9 -2,2v14h2L4,3h12L16,1zM15,5L8,5c-1.1,0 -1.99,0.9 -1.99,2L6,21c0,1.1 0.89,2 1.99,2L19,23c1.1,0 2,-0.9 2,-2L21,11l-6,-6zM8,21L8,7h6v5h5v9L8,21z" /> android:pathData="M16,1L4,1c-1.1,0 -2,0.9 -2,2v14h2L4,3h12L16,1zM15,5L8,5c-1.1,0 -1.99,0.9 -1.99,2L6,21c0,1.1 0.89,2 1.99,2L19,23c1.1,0 2,-0.9 2,-2L21,11l-6,-6zM8,21L8,7h6v5h5v9L8,21z" />
</vector> </vector>

View file

@ -1,14 +0,0 @@
<!--
~ Copyright © 2014-2020 The Android Password Store Authors. All Rights Reserved.
~ SPDX-License-Identifier: GPL-3.0-only
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="#FFFFFFFF"
android:pathData="M16,1L4,1c-1.1,0 -2,0.9 -2,2v14h2L4,3h12L16,1zM15,5L8,5c-1.1,0 -1.99,0.9 -1.99,2L6,21c0,1.1 0.89,2 1.99,2L19,23c1.1,0 2,-0.9 2,-2L21,11l-6,-6zM8,21L8,7h6v5h5v9L8,21z" />
</vector>

View file

@ -9,6 +9,6 @@
android:viewportWidth="24" android:viewportWidth="24"
android:viewportHeight="24"> android:viewportHeight="24">
<path <path
android:fillColor="#FFFFFFFF" android:fillColor="?attr/colorOnPrimary"
android:pathData="M16,9v10H8V9h8m-1.5,-6h-5l-1,1H5v2h14V4h-3.5l-1,-1zM18,7H6v12c0,1.1 0.9,2 2,2h8c1.1,0 2,-0.9 2,-2V7z" /> android:pathData="M16,9v10H8V9h8m-1.5,-6h-5l-1,1H5v2h14V4h-3.5l-1,-1zM18,7H6v12c0,1.1 0.9,2 2,2h8c1.1,0 2,-0.9 2,-2V7z" />
</vector> </vector>

View file

@ -9,6 +9,6 @@
android:viewportWidth="24" android:viewportWidth="24"
android:viewportHeight="24"> android:viewportHeight="24">
<path <path
android:fillColor="#FFFFFFFF" android:fillColor="?attr/colorOnPrimary"
android:pathData="M9,16.2L4.8,12l-1.4,1.4L9,19 21,7l-1.4,-1.4L9,16.2z" /> android:pathData="M9,16.2L4.8,12l-1.4,1.4L9,19 21,7l-1.4,-1.4L9,16.2z" />
</vector> </vector>

View file

@ -9,6 +9,6 @@
android:viewportWidth="24" android:viewportWidth="24"
android:viewportHeight="24"> android:viewportHeight="24">
<path <path
android:fillColor="#FFFFFFFF" android:fillColor="?attr/colorOnPrimary"
android:pathData="M14.06,9.02l0.92,0.92L5.92,19L5,19v-0.92l9.06,-9.06M17.66,3c-0.25,0 -0.51,0.1 -0.7,0.29l-1.83,1.83 3.75,3.75 1.83,-1.83c0.39,-0.39 0.39,-1.02 0,-1.41l-2.34,-2.34c-0.2,-0.2 -0.45,-0.29 -0.71,-0.29zM14.06,6.19L3,17.25L3,21h3.75L17.81,9.94l-3.75,-3.75z" /> android:pathData="M14.06,9.02l0.92,0.92L5.92,19L5,19v-0.92l9.06,-9.06M17.66,3c-0.25,0 -0.51,0.1 -0.7,0.29l-1.83,1.83 3.75,3.75 1.83,-1.83c0.39,-0.39 0.39,-1.02 0,-1.41l-2.34,-2.34c-0.2,-0.2 -0.45,-0.29 -0.71,-0.29zM14.06,6.19L3,17.25L3,21h3.75L17.81,9.94l-3.75,-3.75z" />
</vector> </vector>

View file

@ -1,31 +0,0 @@
<!--
~ Copyright © 2014-2020 The Android Password Store Authors. All Rights Reserved.
~ SPDX-License-Identifier: GPL-3.0-only
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="110.34687"
android:viewportHeight="110.34687">
<group
android:translateX="24.828047"
android:translateY="24.828047">
<path
android:fillColor="#00000000"
android:pathData="m18.8,30.2129v-11.546c0,-6.4144 5.1315,-11.546 11.546,-11.546 6.4144,0 11.546,5.1315 11.546,11.546v11.546"
android:strokeWidth="5.349"
android:strokeColor="#013e5b" />
<path
android:fillColor="#00c7a0"
android:pathData="M15.4099,21.8429L45.2811,21.8429A2.2639,2.2639 0,0 1,47.545 24.1068L47.545,53.977A2.2639,2.2639 0,0 1,45.2811 56.2409L15.4099,56.2409A2.2639,2.2639 0,0 1,13.146 53.977L13.146,24.1068A2.2639,2.2639 0,0 1,15.4099 21.8429z" />
<path
android:fillColor="#fff"
android:pathData="m44.8267,37.6961 l-13.1408,-13.1393c-0.7569,-0.7566 -1.9838,-0.7566 -2.7408,0l-13.08,13.0785c-0.7567,0.7573 -0.7567,1.9846 0,2.7419l13.1415,13.14c0.7572,0.7567 1.9842,0.7567 2.7414,0l13.0778,-13.0785c0.7572,-0.7572 0.7572,-1.9849 0,-2.7421"
android:strokeWidth=".35344" />
<path
android:fillColor="#3bdbbc"
android:pathData="m30.3156,23.9881c-0.496,0 -0.992,0.1893 -1.3705,0.5676l-2.7282,2.7288 3.4612,3.4606c0.8044,-0.2715 1.727,-0.0892 2.368,0.5517 0.6237,0.624 0.8361,1.5493 0.5471,2.3828l3.3357,3.3357c0.8076,-0.2777 1.738,-0.098 2.3828,0.5476 0.9008,0.9005 0.9008,2.361 0,3.2615 -1.7823,1.7848 -4.7253,-0.1767 -3.7641,-2.5087l-3.1111,-3.1106c-2.2315,0.5285 -3.8934,-1.2655 -3.149,-3.1674l-0.6863,-0.6863l0,15.9165l5.4913,0l0,-5.8608c-0.0315,-0.7566 1.1201,-0.7566 1.0886,0l0,6.4043c0.0005,0.3013 -0.2438,0.5457 -0.545,0.5455l-6.5804,0c-0.3015,0.0005 -0.546,-0.2441 -0.5456,-0.5455l0,-17.4333c-0.0005,-0.0363 0.0029,-0.0728 0.0097,-0.1085l-1.6444,-1.6444 -9.0106,9.0084c-0.7567,0.7573 -0.7567,1.9848 0,2.7421l13.1415,13.14c0.7572,0.7567 1.9844,0.7567 2.7416,0l13.0778,-13.0785c0.7572,-0.7572 0.7572,-1.9849 0,-2.7421l-13.14,-13.1393c-0.3785,-0.3783 -0.8746,-0.5676 -1.3705,-0.5676zM29.9512,39.1825c0.1001,0 0.1808,0.0381 0.2426,0.1146 0.0648,0.0736 0.1326,0.1975 0.2032,0.371 0.0705,0.1706 0.1089,0.2615 0.1146,0.2733 0.0059,-0.0119 0.0424,-0.1026 0.11,-0.2733 0.0707,-0.1705 0.1401,-0.2946 0.2078,-0.371 0.0677,-0.0765 0.1513,-0.1146 0.2513,-0.1146 0.1412,0 0.2646,0.047 0.3705,0.1412 0.1059,0.0941 0.1592,0.2103 0.1592,0.3485 0,0.0676 -0.0179,0.1368 -0.0532,0.2073 -0.0323,0.0707 -0.0777,0.1444 -0.1366,0.2211 -0.056,0.0734 -0.1164,0.1571 -0.1812,0.2513 0.0648,-0.0089 0.1589,-0.0251 0.2825,-0.0486 0.1265,-0.0236 0.2268,-0.0354 0.3004,-0.0354 0.0969,0 0.1762,0.0224 0.238,0.0666 0.0648,0.0442 0.1118,0.1042 0.1413,0.1807 0.0294,0.0734 0.044,0.1544 0.044,0.2426 0,0.1384 -0.0337,0.2544 -0.1013,0.3485 -0.0677,0.0912 -0.1749,0.1372 -0.3219,0.1372 -0.0472,0 -0.14,-0.0119 -0.2784,-0.0354 -0.1382,-0.0236 -0.2397,-0.0386 -0.3045,-0.0446 0.1531,0.2177 0.2534,0.3652 0.3004,0.4417 0.047,0.0736 0.0706,0.1544 0.0706,0.2426 0,0.1412 -0.0533,0.2556 -0.1592,0.3439 -0.1028,0.0853 -0.2264,0.1279 -0.3705,0.1279 -0.1028,0 -0.1882,-0.0366 -0.2559,-0.11 -0.0646,-0.0767 -0.1309,-0.1955 -0.1986,-0.3572 -0.0646,-0.1647 -0.1028,-0.259 -0.1146,-0.2825 -0.0117,0.0235 -0.0516,0.1178 -0.1192,0.2825 -0.0648,0.1646 -0.1281,0.2836 -0.1899,0.3572 -0.0617,0.0735 -0.1454,0.11 -0.2513,0.11 -0.15,0 -0.2779,-0.0427 -0.3838,-0.1279 -0.1059,-0.0883 -0.1587,-0.2027 -0.1587,-0.3439 0,-0.0618 0.0156,-0.1263 0.0481,-0.194 0.0323,-0.0707 0.0665,-0.1311 0.1018,-0.1812 0.0382,-0.0499 0.1118,-0.1532 0.2206,-0.3091 -0.0736,0.0059 -0.1751,0.021 -0.3045,0.0446 -0.1294,0.0236 -0.2176,0.0354 -0.2646,0.0354 -0.1472,0 -0.2577,-0.046 -0.3311,-0.1372 -0.0707,-0.0941 -0.1059,-0.2101 -0.1059,-0.3485 0,-0.1411 0.0352,-0.2573 0.1059,-0.3485 0.0734,-0.0942 0.184,-0.1412 0.3311,-0.1412 0.0736,0 0.1628,0.0107 0.2687,0.0312 0.1059,0.0206 0.2062,0.038 0.3004,0.0527 -0.0824,-0.1177 -0.1648,-0.2366 -0.2472,-0.3572 -0.0824,-0.1206 -0.1233,-0.2282 -0.1233,-0.3224 0,-0.1382 0.0543,-0.2544 0.1633,-0.3485 0.1088,-0.0942 0.2351,-0.1412 0.3792,-0.1412zM29.9512,43.2235c0.1001,0 0.1808,0.0383 0.2426,0.1146 0.0648,0.0735 0.1326,0.197 0.2032,0.3705 0.0705,0.1707 0.1089,0.262 0.1146,0.2738 0.0059,-0.0119 0.0424,-0.1031 0.11,-0.2738 0.0707,-0.1705 0.1401,-0.2941 0.2078,-0.3705 0.0677,-0.0765 0.1513,-0.1146 0.2513,-0.1146 0.1412,0 0.2646,0.047 0.3705,0.1412 0.1059,0.0941 0.1592,0.2102 0.1592,0.3485 0,0.0675 -0.0179,0.1366 -0.0532,0.2073 -0.0323,0.0705 -0.0777,0.1441 -0.1366,0.2206 -0.056,0.0735 -0.1164,0.1576 -0.1812,0.2518 0.0648,-0.0089 0.1589,-0.0251 0.2825,-0.0486 0.1265,-0.0236 0.2268,-0.0353 0.3004,-0.0353 0.0969,0 0.1762,0.0219 0.238,0.0661 0.0648,0.0442 0.1118,0.1047 0.1413,0.1812 0.0294,0.0736 0.044,0.1542 0.044,0.2426 0,0.1382 -0.0337,0.2544 -0.1013,0.3485 -0.0677,0.0912 -0.1749,0.1366 -0.3219,0.1366 -0.0472,0 -0.14,-0.0119 -0.2784,-0.0354 -0.1382,-0.0236 -0.2397,-0.038 -0.3045,-0.044 0.1531,0.2177 0.2534,0.3647 0.3004,0.4411 0.047,0.0736 0.0706,0.1549 0.0706,0.2431 0,0.1411 -0.0533,0.2558 -0.1592,0.3439 -0.1028,0.0854 -0.2264,0.1279 -0.3705,0.1279 -0.1028,0 -0.1882,-0.0371 -0.2559,-0.1105 -0.0646,-0.0765 -0.1309,-0.1955 -0.1986,-0.3572 -0.0646,-0.1647 -0.1028,-0.259 -0.1146,-0.2825 -0.0117,0.0236 -0.0516,0.1178 -0.1192,0.2825 -0.0648,0.1648 -0.1281,0.2836 -0.1899,0.3572 -0.0617,0.0735 -0.1454,0.1105 -0.2513,0.1105 -0.15,0 -0.2779,-0.0425 -0.3838,-0.1279 -0.1059,-0.0881 -0.1587,-0.2028 -0.1587,-0.3439 0,-0.0617 0.0156,-0.1268 0.0481,-0.1945 0.0323,-0.0705 0.0665,-0.1311 0.1018,-0.1812 0.0382,-0.0499 0.1118,-0.1527 0.2206,-0.3086 -0.0736,0.0059 -0.1751,0.0205 -0.3045,0.044 -0.1294,0.0236 -0.2176,0.0354 -0.2646,0.0354 -0.1472,0 -0.2577,-0.0454 -0.3311,-0.1366 -0.0707,-0.0941 -0.1059,-0.2103 -0.1059,-0.3485 0,-0.1412 0.0352,-0.2573 0.1059,-0.3485 0.0734,-0.0942 0.184,-0.1412 0.3311,-0.1412 0.0736,0 0.1628,0.0101 0.2687,0.0307 0.1059,0.0204 0.2062,0.0384 0.3004,0.0532 -0.0824,-0.1177 -0.1648,-0.2371 -0.2472,-0.3577 -0.0824,-0.1206 -0.1233,-0.2278 -0.1233,-0.3219 0,-0.1384 0.0543,-0.2544 0.1633,-0.3485 0.1088,-0.0942 0.2351,-0.1412 0.3792,-0.1412z"
android:strokeWidth="1.3358" />
</group>
</vector>

View file

@ -9,6 +9,6 @@
android:viewportWidth="24" android:viewportWidth="24"
android:viewportHeight="24"> android:viewportHeight="24">
<path <path
android:fillColor="#FFFFFFFF" android:fillColor="?attr/colorOnPrimary"
android:pathData="M20,6L12,6L10,4L4,4A2,2 0,0 0,2 6L2,18a2,2 0,0 0,2 2L20,20a2,2 0,0 0,2 -2L22,8A2,2 0,0 0,20 6ZM20,18L4,18L4,8L20,8ZM13,12L7,12v2h6v2l4,-3 -4,-3Z" /> android:pathData="M20,6L12,6L10,4L4,4A2,2 0,0 0,2 6L2,18a2,2 0,0 0,2 2L20,20a2,2 0,0 0,2 -2L22,8A2,2 0,0 0,20 6ZM20,18L4,18L4,8L20,8ZM13,12L7,12v2h6v2l4,-3 -4,-3Z" />
</vector> </vector>

View file

@ -9,6 +9,6 @@
android:viewportWidth="24" android:viewportWidth="24"
android:viewportHeight="24"> android:viewportHeight="24">
<path <path
android:fillColor="#FFFFFFFF" android:fillColor="?attr/colorOnPrimary"
android:pathData="M17,3L5,3c-1.11,0 -2,0.9 -2,2v14c0,1.1 0.89,2 2,2h14c1.1,0 2,-0.9 2,-2L21,7l-4,-4zM19,19L5,19L5,5h11.17L19,7.83L19,19zM12,12c-1.66,0 -3,1.34 -3,3s1.34,3 3,3 3,-1.34 3,-3 -1.34,-3 -3,-3zM6,6h9v4L6,10z" /> android:pathData="M17,3L5,3c-1.11,0 -2,0.9 -2,2v14c0,1.1 0.89,2 2,2h14c1.1,0 2,-0.9 2,-2L21,7l-4,-4zM19,19L5,19L5,5h11.17L19,7.83L19,19zM12,12c-1.66,0 -3,1.34 -3,3s1.34,3 3,3 3,-1.34 3,-3 -1.34,-3 -3,-3zM6,6h9v4L6,10z" />
</vector> </vector>

View file

@ -9,6 +9,6 @@
android:viewportWidth="24" android:viewportWidth="24"
android:viewportHeight="24"> android:viewportHeight="24">
<path <path
android:fillColor="#FFFFFFFF" android:fillColor="?attr/colorOnPrimary"
android:pathData="M19,5L7,5A2,2 0,0 0,5 7L5,21a2,2 0,0 0,2 2L21,23a2,2 0,0 0,2 -2L23,9ZM21,21L7,21L7,7L18.17,7L21,9.83ZM14,14a3,3 0,1 0,3 3A3,3 0,0 0,14 14ZM8,8h9v4L8,12ZM15,1L3,1A2,2 0,0 0,1 3L1,17L3,17L3,3L15,3Z" /> android:pathData="M19,5L7,5A2,2 0,0 0,5 7L5,21a2,2 0,0 0,2 2L21,23a2,2 0,0 0,2 -2L23,9ZM21,21L7,21L7,7L18.17,7L21,9.83ZM14,14a3,3 0,1 0,3 3A3,3 0,0 0,14 14ZM8,8h9v4L8,12ZM15,1L3,1A2,2 0,0 0,1 3L1,17L3,17L3,3L15,3Z" />
</vector> </vector>

View file

@ -9,6 +9,6 @@
android:viewportWidth="24" android:viewportWidth="24"
android:viewportHeight="24"> android:viewportHeight="24">
<path <path
android:fillColor="#FFFFFFFF" android:fillColor="?attr/colorOnPrimary"
android:pathData="M15.5,14h-0.79l-0.28,-0.27C15.41,12.59 16,11.11 16,9.5 16,5.91 13.09,3 9.5,3S3,5.91 3,9.5 5.91,16 9.5,16c1.61,0 3.09,-0.59 4.23,-1.57l0.27,0.28v0.79l5,4.99L20.49,19l-4.99,-5zM9.5,14C7.01,14 5,11.99 5,9.5S7.01,5 9.5,5 14,7.01 14,9.5 11.99,14 9.5,14z" /> android:pathData="M15.5,14h-0.79l-0.28,-0.27C15.41,12.59 16,11.11 16,9.5 16,5.91 13.09,3 9.5,3S3,5.91 3,9.5 5.91,16 9.5,16c1.61,0 3.09,-0.59 4.23,-1.57l0.27,0.28v0.79l5,4.99L20.49,19l-4.99,-5zM9.5,14C7.01,14 5,11.99 5,9.5S7.01,5 9.5,5 14,7.01 14,9.5 11.99,14 9.5,14z" />
</vector> </vector>

View file

@ -9,6 +9,6 @@
android:viewportWidth="24" android:viewportWidth="24"
android:viewportHeight="24"> android:viewportHeight="24">
<path <path
android:fillColor="#FFFFFFFF" android:fillColor="?attr/colorOnPrimary"
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.92s2.92,-1.31 2.92,-2.92c0,-1.61 -1.31,-2.92 -2.92,-2.92zM18,4c0.55,0 1,0.45 1,1s-0.45,1 -1,1 -1,-0.45 -1,-1 0.45,-1 1,-1zM6,13c-0.55,0 -1,-0.45 -1,-1s0.45,-1 1,-1 1,0.45 1,1 -0.45,1 -1,1zM18,20.02c-0.55,0 -1,-0.45 -1,-1s0.45,-1 1,-1 1,0.45 1,1 -0.45,1 -1,1z" /> 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.92s2.92,-1.31 2.92,-2.92c0,-1.61 -1.31,-2.92 -2.92,-2.92zM18,4c0.55,0 1,0.45 1,1s-0.45,1 -1,1 -1,-0.45 -1,-1 0.45,-1 1,-1zM6,13c-0.55,0 -1,-0.45 -1,-1s0.45,-1 1,-1 1,0.45 1,1 -0.45,1 -1,1zM18,20.02c-0.55,0 -1,-0.45 -1,-1s0.45,-1 1,-1 1,0.45 1,1 -0.45,1 -1,1z" />
</vector> </vector>

View file

@ -17,7 +17,7 @@
android:layout_height="50dp" android:layout_height="50dp"
android:background="@color/primary_color" android:background="@color/primary_color"
android:contentDescription="@string/app_name" android:contentDescription="@string/app_name"
android:src="@drawable/ic_launcher_foreground" android:src="@mipmap/ic_launcher_foreground"
app:layout_constraintBottom_toTopOf="@id/searchLayout" app:layout_constraintBottom_toTopOf="@id/searchLayout"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
@ -76,7 +76,7 @@
</ViewSwitcher> </ViewSwitcher>
<Switch <com.google.android.material.switchmaterial.SwitchMaterial
android:id="@+id/strictDomainSearch" android:id="@+id/strictDomainSearch"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -91,7 +91,7 @@
app:layout_constraintVertical_bias="1.0" app:layout_constraintVertical_bias="1.0"
tools:text="Phishing-resistant search" /> tools:text="Phishing-resistant search" />
<Switch <com.google.android.material.switchmaterial.SwitchMaterial
android:id="@+id/shouldMatch" android:id="@+id/shouldMatch"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -106,7 +106,7 @@
app:layout_constraintVertical_bias="1.0" app:layout_constraintVertical_bias="1.0"
tools:text="Match with example.org" /> tools:text="Match with example.org" />
<Switch <com.google.android.material.switchmaterial.SwitchMaterial
android:id="@+id/shouldClear" android:id="@+id/shouldClear"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"

View file

@ -19,7 +19,7 @@
android:layout_height="50dp" android:layout_height="50dp"
android:background="@color/primary_color" android:background="@color/primary_color"
android:contentDescription="@string/app_name" android:contentDescription="@string/app_name"
android:src="@drawable/ic_launcher_foreground" android:src="@mipmap/ic_launcher_foreground"
app:layout_constraintBottom_toTopOf="@id/warningSign" app:layout_constraintBottom_toTopOf="@id/warningSign"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
@ -31,7 +31,6 @@
android:id="@+id/warningSign" android:id="@+id/warningSign"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="50dp" android:layout_height="50dp"
android:background="@color/window_background"
android:contentDescription="@string/oreo_autofill_warning_publisher_warning_sign_description" android:contentDescription="@string/oreo_autofill_warning_publisher_warning_sign_description"
android:src="@drawable/ic_warning_red_24dp" android:src="@drawable/ic_warning_red_24dp"
app:layout_constraintBottom_toTopOf="@id/warningHeader" app:layout_constraintBottom_toTopOf="@id/warningHeader"
@ -46,7 +45,6 @@
android:layout_marginStart="@dimen/activity_horizontal_margin" android:layout_marginStart="@dimen/activity_horizontal_margin"
android:layout_marginEnd="@dimen/activity_horizontal_margin" android:layout_marginEnd="@dimen/activity_horizontal_margin"
android:layout_marginBottom="@dimen/activity_vertical_margin" android:layout_marginBottom="@dimen/activity_vertical_margin"
android:background="@color/window_background"
android:text="@string/oreo_autofill_warning_publisher_header" android:text="@string/oreo_autofill_warning_publisher_header"
android:textSize="12sp" android:textSize="12sp"
app:layout_constraintBottom_toTopOf="@id/warningAppName" app:layout_constraintBottom_toTopOf="@id/warningAppName"
@ -60,7 +58,6 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="@dimen/activity_horizontal_margin" android:layout_marginStart="@dimen/activity_horizontal_margin"
android:layout_marginEnd="@dimen/activity_horizontal_margin" android:layout_marginEnd="@dimen/activity_horizontal_margin"
android:background="@color/window_background"
android:gravity="center_horizontal" android:gravity="center_horizontal"
android:textSize="12sp" android:textSize="12sp"
app:layout_constraintBottom_toTopOf="@id/warningAppInstallDate" app:layout_constraintBottom_toTopOf="@id/warningAppInstallDate"
@ -75,7 +72,6 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="@dimen/activity_horizontal_margin" android:layout_marginStart="@dimen/activity_horizontal_margin"
android:layout_marginEnd="@dimen/activity_horizontal_margin" android:layout_marginEnd="@dimen/activity_horizontal_margin"
android:background="@color/window_background"
android:gravity="center_horizontal" android:gravity="center_horizontal"
android:textSize="12sp" android:textSize="12sp"
app:layout_constraintBottom_toTopOf="@id/warningAppFooter" app:layout_constraintBottom_toTopOf="@id/warningAppFooter"
@ -92,7 +88,6 @@
android:layout_marginTop="@dimen/activity_vertical_margin" android:layout_marginTop="@dimen/activity_vertical_margin"
android:layout_marginEnd="@dimen/activity_horizontal_margin" android:layout_marginEnd="@dimen/activity_horizontal_margin"
android:layout_marginBottom="@dimen/activity_vertical_margin" android:layout_marginBottom="@dimen/activity_vertical_margin"
android:background="@color/window_background"
android:text="@string/oreo_autofill_warning_publisher_footer" android:text="@string/oreo_autofill_warning_publisher_footer"
android:textSize="12sp" android:textSize="12sp"
app:layout_constraintBottom_toTopOf="@id/okButton" app:layout_constraintBottom_toTopOf="@id/okButton"
@ -136,7 +131,6 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="@dimen/activity_horizontal_margin" android:layout_marginStart="@dimen/activity_horizontal_margin"
android:layout_marginEnd="@dimen/activity_horizontal_margin" android:layout_marginEnd="@dimen/activity_horizontal_margin"
android:background="@color/window_background"
android:fontFamily="monospace" android:fontFamily="monospace"
android:gravity="center_horizontal" android:gravity="center_horizontal"
android:textIsSelectable="true" android:textIsSelectable="true"

View file

@ -15,21 +15,21 @@
android:id="@+id/cover" android:id="@+id/cover"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="50dp" android:layout_height="50dp"
android:layout_margin="10dp"
android:contentDescription="@string/app_name" android:contentDescription="@string/app_name"
android:src="@drawable/ic_launcher_foreground" android:src="@mipmap/ic_launcher_foreground"
app:layout_constraintBottom_toTopOf="@id/text" app:layout_constraintBottom_toTopOf="@id/text"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
android:layout_margin="10dp"
app:layout_constraintVertical_bias="0.0" /> app:layout_constraintVertical_bias="0.0" />
<TextView <TextView
android:id="@+id/text" android:id="@+id/text"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/oreo_autofill_waiting_for_sms"
android:layout_margin="10dp" android:layout_margin="10dp"
android:text="@string/oreo_autofill_waiting_for_sms"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/cover" /> app:layout_constraintTop_toBottomOf="@id/cover" />
@ -48,9 +48,9 @@
<Button <Button
android:id="@+id/cancelButton" android:id="@+id/cancelButton"
style="@style/Widget.MaterialComponents.Button.TextButton" style="@style/Widget.MaterialComponents.Button.TextButton"
android:layout_margin="10dp"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="10dp"
android:text="@string/dialog_cancel" android:text="@string/dialog_cancel"
android:textColor="?attr/colorSecondary" android:textColor="?attr/colorSecondary"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"

View file

@ -34,7 +34,7 @@
android:layout_alignParentBottom="true" android:layout_alignParentBottom="true"
android:layout_gravity="bottom|end" android:layout_gravity="bottom|end"
android:layout_margin="@dimen/fab_compat_margin" android:layout_margin="@dimen/fab_compat_margin"
android:src="@drawable/ic_add_white_48dp" android:src="@drawable/ic_add_48dp"
app:backgroundTint="?attr/colorSecondary" app:backgroundTint="?attr/colorSecondary"
app:borderWidth="0dp" app:borderWidth="0dp"
app:elevation="6dp" app:elevation="6dp"

View file

@ -10,7 +10,7 @@
android:padding="16dp"> android:padding="16dp">
<com.google.android.material.textfield.TextInputLayout <com.google.android.material.textfield.TextInputLayout
style="@style/TextInputLayoutBase" style="@style/AppTheme.TextInputLayout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:hint="@string/crypto_name_hint"> android:hint="@string/crypto_name_hint">

View file

@ -30,7 +30,7 @@
android:layout_centerHorizontal="true" android:layout_centerHorizontal="true"
android:text="@string/app_name" android:text="@string/app_name"
android:textAppearance="?android:attr/textAppearanceLarge" android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="@android:color/white" android:textColor="?attr/colorOnPrimary"
android:textStyle="bold" android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
@ -45,7 +45,7 @@
android:layout_alignParentEnd="true" android:layout_alignParentEnd="true"
android:layout_marginEnd="@dimen/activity_horizontal_margin" android:layout_marginEnd="@dimen/activity_horizontal_margin"
android:text="@string/action_settings" android:text="@string/action_settings"
android:textColor="@android:color/white" android:textColor="?attr/colorOnPrimary"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />

View file

@ -4,144 +4,78 @@
--> -->
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<LinearLayout <androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" android:paddingStart="24dp"
android:paddingLeft="24dp"
android:paddingTop="20dp" android:paddingTop="20dp"
android:paddingRight="24dp" android:paddingEnd="24dp"
android:paddingBottom="20dp" android:paddingBottom="20dp">
tools:context=".MainActivityFragment">
<androidx.appcompat.widget.AppCompatTextView <androidx.appcompat.widget.AppCompatTextView
android:id="@+id/xkPasswordText" android:id="@+id/xkPasswordText"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="8dp" android:paddingBottom="8dp"
android:textAppearance="?android:attr/textAppearanceMedium" android:textAppearance="?android:attr/textAppearanceMedium"
android:textIsSelectable="true" /> android:textIsSelectable="true"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="horisticia.tockmendprost" />
<LinearLayout <com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent" android:id="@+id/total_words"
android:layout_height="match_parent" android:layout_width="0dp"
android:baselineAligned="false"
android:orientation="horizontal"
android:weightSum="2">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight=".6"
android:orientation="vertical">
<androidx.appcompat.widget.AppCompatTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="8dp" android:layout_marginEnd="8dp"
android:text="@string/pwgen_include" android:hint="@string/xkpwgen_length"
android:textAppearance="?android:attr/textAppearanceSmall" /> android:labelFor="@id/xk_num_words"
app:layout_constraintEnd_toStartOf="@id/separator"
app:layout_constraintHorizontal_weight="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/xkPasswordText">
<LinearLayout <com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<CheckBox
android:id="@+id/xknumerals"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:text="@string/xkpwgen_numbers" />
<Spinner
android:id="@+id/xk_numbers_count"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:dropDownWidth="40dp"
android:entries="@array/xk_range_1_10"
android:entryValues="@array/xk_range_1_10"
android:gravity="center_vertical"
android:minWidth="40dp"
android:spinnerMode="dropdown" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<CheckBox
android:id="@+id/xksymbols"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:text="@string/xkpwgen_symbols" />
<Spinner
android:id="@+id/xk_symbols_count"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:dropDownWidth="40dp"
android:entries="@array/xk_range_1_10"
android:entryValues="@array/xk_range_1_10"
android:gravity="center_vertical"
android:minWidth="40dp"
android:spinnerMode="dropdown" />
</LinearLayout>
<Spinner
android:id="@+id/xkCapType"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:entries="@array/capitalization_type_values"
android:entryValues="@array/capitalization_type_values"
android:spinnerMode="dropdown" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1.4"
android:orientation="vertical">
<androidx.appcompat.widget.AppCompatTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:text="@string/xkpwgen_length"
android:textAppearance="?android:attr/textAppearanceSmall" />
<EditText
android:id="@+id/xk_num_words" android:id="@+id/xk_num_words"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:ems="10"
android:inputType="number" android:inputType="number"
android:maxLength="2" /> android:maxLength="2" />
</com.google.android.material.textfield.TextInputLayout>
<androidx.appcompat.widget.AppCompatTextView <com.google.android.material.textfield.TextInputLayout
android:layout_width="wrap_content" android:id="@+id/separator"
android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="8dp" android:layout_marginStart="8dp"
android:text="@string/xkpwgen_separator" android:hint="@string/xkpwgen_separator"
android:textAppearance="?android:attr/textAppearanceSmall" /> app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_weight="0.5"
app:layout_constraintStart_toEndOf="@id/total_words"
app:layout_constraintTop_toTopOf="@id/total_words">
<EditText <com.google.android.material.textfield.TextInputEditText
android:id="@+id/xk_separator" android:id="@+id/xk_separator"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:autofillHints="" android:autofillHints=""
android:ems="10"
android:hint="@string/xkpwgen_separator_character"
android:inputType="text" /> android:inputType="text" />
</LinearLayout> </com.google.android.material.textfield.TextInputLayout>
</LinearLayout>
</LinearLayout> <Spinner
android:id="@+id/xkCapType"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:entries="@array/capitalization_type_values"
android:entryValues="@array/capitalization_type_values"
android:spinnerMode="dropdown"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/separator" />
</androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView> </ScrollView>

View file

@ -37,7 +37,10 @@
<com.google.android.material.textfield.TextInputEditText <com.google.android.material.textfield.TextInputEditText
android:id="@+id/filename" android:id="@+id/filename"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" /> android:layout_height="wrap_content"
android:imeOptions="actionNext"
android:inputType="textNoSuggestions"
android:nextFocusForward="@id/password" />
</com.google.android.material.textfield.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout <com.google.android.material.textfield.TextInputLayout
@ -54,6 +57,7 @@
android:id="@+id/password" android:id="@+id/password"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:imeOptions="actionDone"
android:inputType="textVisiblePassword" /> android:inputType="textVisiblePassword" />
</com.google.android.material.textfield.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>

View file

@ -35,7 +35,7 @@
android:layout_alignParentBottom="true" android:layout_alignParentBottom="true"
android:layout_gravity="bottom|end" android:layout_gravity="bottom|end"
android:layout_margin="@dimen/fab_compat_margin" android:layout_margin="@dimen/fab_compat_margin"
android:src="@drawable/ic_add_white_48dp" android:src="@drawable/ic_add_48dp"
app:backgroundTint="?attr/colorSecondary" app:backgroundTint="?attr/colorSecondary"
app:rippleColor="?attr/colorSecondary" /> app:rippleColor="?attr/colorSecondary" />
</androidx.coordinatorlayout.widget.CoordinatorLayout> </androidx.coordinatorlayout.widget.CoordinatorLayout>

View file

@ -9,7 +9,7 @@
tools:context=".pwdstore.autofill.AutofillPreferenceActivity"> tools:context=".pwdstore.autofill.AutofillPreferenceActivity">
<item <item
android:id="@+id/action_search" android:id="@+id/action_search"
android:icon="@drawable/ic_search_white_24dp" android:icon="@drawable/ic_search_24dp"
android:title="@string/action_search" android:title="@string/action_search"
pwstore:actionViewClass="androidx.appcompat.widget.SearchView" pwstore:actionViewClass="androidx.appcompat.widget.SearchView"
pwstore:showAsAction="ifRoom|collapseActionView" /> pwstore:showAsAction="ifRoom|collapseActionView" />

View file

@ -10,19 +10,19 @@
<item <item
android:id="@+id/menu_move_password" android:id="@+id/menu_move_password"
android:icon="@drawable/ic_move_folder_white_24dp" android:icon="@drawable/ic_move_folder_24dp"
android:title="@string/move" android:title="@string/move"
app:showAsAction="ifRoom" /> app:showAsAction="ifRoom" />
<item <item
android:id="@+id/menu_delete_password" android:id="@+id/menu_delete_password"
android:icon="@drawable/ic_delete_white_24dp" android:icon="@drawable/ic_delete_24dp"
android:title="@string/delete" android:title="@string/delete"
app:showAsAction="ifRoom" /> app:showAsAction="ifRoom" />
<item <item
android:id="@+id/menu_edit_password" android:id="@+id/menu_edit_password"
android:icon="@drawable/ic_edit_white_24dp" android:icon="@drawable/ic_edit_24dp"
android:title="@string/edit" android:title="@string/edit"
app:showAsAction="ifRoom" /> app:showAsAction="ifRoom" />
</menu> </menu>

View file

@ -8,7 +8,7 @@
<item <item
android:id="@+id/action_search" android:id="@+id/action_search"
android:icon="@drawable/ic_search_white_24dp" android:icon="@drawable/ic_search_24dp"
android:title="@string/action_search" android:title="@string/action_search"
app:actionViewClass="androidx.appcompat.widget.SearchView" app:actionViewClass="androidx.appcompat.widget.SearchView"
app:showAsAction="always|collapseActionView" /> app:showAsAction="always|collapseActionView" />

View file

@ -8,7 +8,7 @@
<item <item
android:id="@+id/action_search" android:id="@+id/action_search"
android:icon="@drawable/ic_search_white_24dp" android:icon="@drawable/ic_search_24dp"
android:title="@string/action_search" android:title="@string/action_search"
app:actionViewClass="androidx.appcompat.widget.SearchView" app:actionViewClass="androidx.appcompat.widget.SearchView"
app:showAsAction="always|collapseActionView" /> app:showAsAction="always|collapseActionView" />

View file

@ -8,7 +8,7 @@
<item <item
android:id="@+id/action_search" android:id="@+id/action_search"
android:icon="@drawable/ic_search_white_24dp" android:icon="@drawable/ic_search_24dp"
android:title="@string/action_search" android:title="@string/action_search"
app:actionViewClass="androidx.appcompat.widget.SearchView" app:actionViewClass="androidx.appcompat.widget.SearchView"
app:showAsAction="always|collapseActionView" /> app:showAsAction="always|collapseActionView" />

View file

@ -9,17 +9,17 @@
tools:context="com.zeapo.pwdstore.crypto.PgpActivity"> tools:context="com.zeapo.pwdstore.crypto.PgpActivity">
<item <item
android:id="@+id/share_password_as_plaintext" android:id="@+id/share_password_as_plaintext"
android:icon="@drawable/ic_share_white_24dp" android:icon="@drawable/ic_share_24dp"
android:title="@string/share_as_plaintext" android:title="@string/share_as_plaintext"
pwstore:showAsAction="ifRoom" /> pwstore:showAsAction="ifRoom" />
<item <item
android:id="@+id/copy_password" android:id="@+id/copy_password"
android:icon="@drawable/ic_content_copy_white_24dp" android:icon="@drawable/ic_content_copy"
android:title="@string/copy_password" android:title="@string/copy_password"
pwstore:showAsAction="ifRoom" /> pwstore:showAsAction="ifRoom" />
<item <item
android:id="@+id/edit_password" android:id="@+id/edit_password"
android:icon="@drawable/ic_edit_white_24dp" android:icon="@drawable/ic_edit_24dp"
android:title="@string/edit_password" android:title="@string/edit_password"
pwstore:showAsAction="ifRoom" /> pwstore:showAsAction="ifRoom" />
</menu> </menu>

View file

@ -7,19 +7,14 @@
xmlns:pwstore="http://schemas.android.com/apk/res-auto" xmlns:pwstore="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
tools:context="com.zeapo.pwdstore.crypto.PgpActivity"> tools:context="com.zeapo.pwdstore.crypto.PgpActivity">
<item
android:id="@+id/cancel_password_add"
android:icon="@drawable/ic_clear_white_24dp"
android:title="@string/crypto_cancel"
pwstore:showAsAction="ifRoom" />
<item <item
android:id="@+id/save_password" android:id="@+id/save_password"
android:icon="@drawable/ic_save_white_24dp" android:icon="@drawable/ic_save_24dp"
android:title="@string/crypto_save" android:title="@string/crypto_save"
pwstore:showAsAction="ifRoom" /> pwstore:showAsAction="ifRoom" />
<item <item
android:id="@+id/save_and_copy_password" android:id="@+id/save_and_copy_password"
android:icon="@drawable/ic_save_copy_white_24dp" android:icon="@drawable/ic_save_copy_24dp"
android:title="@string/crypto_save_and_copy" android:title="@string/crypto_save_and_copy"
pwstore:showAsAction="ifRoom" /> pwstore:showAsAction="ifRoom" />
</menu> </menu>

View file

@ -9,7 +9,7 @@
tools:context="com.zeapo.pwdstore.SelectFolderActivity"> tools:context="com.zeapo.pwdstore.SelectFolderActivity">
<item <item
android:id="@+id/crypto_select" android:id="@+id/crypto_select"
android:icon="@drawable/ic_done_white_24dp" android:icon="@drawable/ic_done_24dp"
android:title="@string/crypto_select" android:title="@string/crypto_select"
pwstore:showAsAction="ifRoom" /> pwstore:showAsAction="ifRoom" />
</menu> </menu>

View file

@ -1,9 +1,5 @@
<?xml version="1.0" encoding="utf-8"?><!-- <?xml version="1.0" encoding="utf-8"?>
~ Copyright © 2014-2020 The Android Password Store Authors. All Rights Reserved.
~ SPDX-License-Identifier: GPL-3.0-only
-->
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> <adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background" /> <background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" /> <foreground android:drawable="@mipmap/ic_launcher_foreground" />
</adaptive-icon> </adaptive-icon>

View file

@ -1,9 +1,5 @@
<?xml version="1.0" encoding="utf-8"?><!-- <?xml version="1.0" encoding="utf-8"?>
~ Copyright © 2014-2020 The Android Password Store Authors. All Rights Reserved.
~ SPDX-License-Identifier: GPL-3.0-only
-->
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> <adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background" /> <background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" /> <foreground android:drawable="@mipmap/ic_launcher_foreground" />
</adaptive-icon> </adaptive-icon>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View file

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<bool name="light_status_bar">false</bool>
</resources>

View file

@ -12,10 +12,9 @@
<color name="primary_text_color">#FFFFFFFF</color> <color name="primary_text_color">#FFFFFFFF</color>
<!-- Theme variables --> <!-- Theme variables -->
<color name="window_background">@color/primary_color</color>
<color name="navigation_bar_color">@color/primary_color</color> <color name="navigation_bar_color">@color/primary_color</color>
<color name="list_multiselect_background">#66EEEEEE</color> <color name="list_multiselect_background">#66EEEEEE</color>
<color name="status_bar_color">@color/window_background</color> <color name="status_bar_color">@color/primary_color</color>
<color name="ripple_color">#aaff7539</color> <color name="ripple_color">#aaff7539</color>
<color name="button_color">#44ff7539</color> <color name="button_color">#44ff7539</color>
</resources> </resources>

View file

@ -2,4 +2,5 @@
<resources> <resources>
<bool name="leak_canary_allow_in_non_debuggable_build">true</bool> <bool name="leak_canary_allow_in_non_debuggable_build">true</bool>
<bool name="enable_accessibility_autofill">true</bool> <bool name="enable_accessibility_autofill">true</bool>
<bool name="light_status_bar">true</bool>
</resources> </resources>

View file

@ -3,27 +3,21 @@
~ SPDX-License-Identifier: GPL-3.0-only ~ SPDX-License-Identifier: GPL-3.0-only
--> -->
<resources xmlns:tools="http://schemas.android.com/tools"> <resources>
<!-- Base palette --> <!-- Base palette -->
<color name="primary_color">#607d8b</color> <color name="primary_color">@color/white</color>
<color name="primary_light_color">#8eacbb</color> <color name="primary_light_color">@color/white</color>
<color name="primary_dark_color">#34515e</color> <color name="primary_dark_color">@color/white</color>
<color name="secondary_color">#ff7043</color> <color name="secondary_color">#ff7043</color>
<color name="primary_text_color">#212121</color> <color name="primary_text_color">#212121</color>
<color name="white">#ffffffff</color> <color name="white">#ffffffff</color>
<!-- Theme variables --> <!-- Theme variables -->
<color name="window_background">#eceff1</color>
<color name="ic_launcher_background">#D4F1EA</color> <color name="ic_launcher_background">#D4F1EA</color>
<color name="color_control_normal">@color/primary_text_color</color> <color name="color_control_normal">@color/primary_text_color</color>
<color name="list_multiselect_background">#668eacbb</color> <color name="list_multiselect_background">#668eacbb</color>
<color name="navigation_bar_color">#000000</color> <color name="navigation_bar_color">@color/primary_color</color>
<color name="status_bar_color">@color/primary_dark_color</color> <color name="status_bar_color">@color/primary_dark_color</color>
<color name="ripple_color">#aaff7043</color> <color name="ripple_color">#aaff7043</color>
<color name="button_color">#44ff7043</color> <color name="button_color">#44ff7043</color>
<!-- Override TextInputEditText stroke color like a boss -->
<color name="mtrl_textinput_default_box_stroke_color" tools:override="true">
@color/secondary_color
</color>
</resources> </resources>

View file

@ -194,8 +194,8 @@
<string name="xkpwgen_separator">Separator</string> <string name="xkpwgen_separator">Separator</string>
<string name="xkpwgen_custom_dict_imported">Custom wordlist: %1$s</string> <string name="xkpwgen_custom_dict_imported">Custom wordlist: %1$s</string>
<string name="xkpwgen_separator_character">separator character</string> <string name="xkpwgen_separator_character">separator character</string>
<string name="xkpwgen_numbers">numbers:</string> <string name="xkpwgen_numbers">Numbers</string>
<string name="xkpwgen_symbols">symbols:</string> <string name="xkpwgen_symbols">Symbols</string>
<string name="xkpwgen_builder_error">Selected dictionary does not contain enough words of given length %1$d..%2$d</string> <string name="xkpwgen_builder_error">Selected dictionary does not contain enough words of given length %1$d..%2$d</string>
<!-- XKPWD prefs --> <!-- XKPWD prefs -->

View file

@ -6,28 +6,39 @@
<resources> <resources>
<!-- Base application theme. --> <!-- Base application theme. -->
<style name="AppTheme" parent="Theme.MaterialComponents.DayNight.DarkActionBar"> <style name="AppTheme" parent="Theme.MaterialComponents.DayNight">
<item name="colorPrimary">@color/primary_color</item> <item name="colorPrimary">@color/primary_color</item>
<item name="colorOnPrimary">@color/color_control_normal</item> <item name="colorOnPrimary">@color/color_control_normal</item>
<item name="colorPrimaryDark">@color/primary_color</item> <item name="colorPrimaryDark">@color/primary_color</item>
<item name="colorPrimaryVariant">@color/primary_light_color</item> <item name="colorPrimaryVariant">@color/primary_light_color</item>
<item name="colorSecondary">@color/secondary_color</item> <item name="colorSecondary">@color/secondary_color</item>
<item name="colorOnSecondary">@color/white</item> <item name="colorOnSecondary">@color/white</item>
<item name="colorSurface">@color/window_background</item> <item name="colorSurface">@color/primary_color</item>
<item name="android:textColor">@color/primary_text_color</item> <item name="android:textColor">@color/primary_text_color</item>
<item name="colorOnSurface">@color/color_control_normal</item> <item name="colorOnSurface">@color/color_control_normal</item>
<item name="colorControlNormal">@color/color_control_normal</item> <item name="colorControlNormal">@color/color_control_normal</item>
<item name="android:colorBackgroundFloating">@color/primary_color</item> <item name="android:colorBackgroundFloating">@color/primary_color</item>
<item name="android:statusBarColor">@color/status_bar_color</item> <item name="android:statusBarColor">@color/status_bar_color</item>
<item name="android:navigationBarColor">@color/navigation_bar_color</item> <item name="android:navigationBarColor">@color/navigation_bar_color</item>
<item name="android:windowBackground">@color/window_background</item> <item name="android:windowLightStatusBar">@bool/light_status_bar</item>
<item name="actionModeStyle">@style/ActionMode</item> <item name="actionModeStyle">@style/ActionMode</item>
<item name="alertDialogTheme">@style/AppTheme.Dialog</item>
<item name="materialAlertDialogTheme">@style/AppTheme.Dialog</item> <item name="materialAlertDialogTheme">@style/AppTheme.Dialog</item>
<item name="materialButtonStyle">@style/AppTheme.MaterialButton</item> <item name="materialButtonStyle">@style/AppTheme.MaterialButton</item>
<item name="materialButtonOutlinedStyle">@style/AppTheme.OutlinedButton</item> <item name="materialButtonOutlinedStyle">@style/AppTheme.OutlinedButton</item>
<item name="textInputStyle">@style/TextInputLayoutBase</item>
<item name="bottomSheetDialogTheme">@style/BottomSheetDialogTheme</item> <item name="bottomSheetDialogTheme">@style/BottomSheetDialogTheme</item>
<item name="textInputStyle">@style/AppTheme.TextInputLayout</item>
</style>
<style name="AppTheme.TextInputLayout" parent="Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense">
<item name="boxStrokeColor">@color/outlined_box_selector</item>
<item name="hintTextColor">?attr/colorSecondary</item>
<item name="materialThemeOverlay">
@style/ThemeOverlay.AppTheme.TextInputEditText.OutlinedBox
</item>
</style>
<style name="ThemeOverlay.AppTheme.TextInputEditText.OutlinedBox" parent="ThemeOverlay.MaterialComponents.TextInputEditText.OutlinedBox">
<item name="colorControlActivated">@color/color_control_normal</item>
</style> </style>
<style name="AppTheme.MaterialButton" parent="Widget.MaterialComponents.Button"> <style name="AppTheme.MaterialButton" parent="Widget.MaterialComponents.Button">
@ -46,7 +57,6 @@
<style name="AppTheme.Dialog" parent="Theme.MaterialComponents.DayNight.Dialog.Alert"> <style name="AppTheme.Dialog" parent="Theme.MaterialComponents.DayNight.Dialog.Alert">
<item name="colorPrimary">@color/secondary_color</item> <item name="colorPrimary">@color/secondary_color</item>
<item name="colorSecondary">@color/secondary_color</item> <item name="colorSecondary">@color/secondary_color</item>
<item name="android:windowBackground">@color/window_background</item>
</style> </style>
<style name="ActionMode" parent="@style/Widget.AppCompat.ActionMode"> <style name="ActionMode" parent="@style/Widget.AppCompat.ActionMode">
@ -55,7 +65,6 @@
<style name="BottomSheetDialogTheme" parent="ThemeOverlay.MaterialComponents.BottomSheetDialog"> <style name="BottomSheetDialogTheme" parent="ThemeOverlay.MaterialComponents.BottomSheetDialog">
<item name="android:windowIsFloating">false</item> <item name="android:windowIsFloating">false</item>
<item name="android:navigationBarColor">@android:color/transparent</item>
<item name="android:statusBarColor">@android:color/transparent</item> <item name="android:statusBarColor">@android:color/transparent</item>
<item name="android:windowTranslucentNavigation">false</item> <item name="android:windowTranslucentNavigation">false</item>
<item name="android:windowIsTranslucent">false</item> <item name="android:windowIsTranslucent">false</item>
@ -80,19 +89,6 @@
<item name="windowNoTitle">true</item> <item name="windowNoTitle">true</item>
</style> </style>
<style name="ThemeOverlay.AppTheme.TextInputEditText.OutlinedBox" parent="ThemeOverlay.MaterialComponents.TextInputEditText.OutlinedBox">
<item name="colorControlActivated">@color/color_control_normal</item>
</style>
<style name="TextInputLayoutBase" parent="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox">
<item name="boxStrokeColor">@color/secondary_color</item>
<item name="hintTextColor">@color/color_control_normal</item>
<item name="hintEnabled">true</item>
<item name="materialThemeOverlay">
@style/ThemeOverlay.AppTheme.TextInputEditText.OutlinedBox
</item>
</style>
<style name="DialogLikeTheme" parent="AppTheme"> <style name="DialogLikeTheme" parent="AppTheme">
<item name="android:windowActionBar">false</item> <item name="android:windowActionBar">false</item>
<item name="android:windowIsFloating">true</item> <item name="android:windowIsFloating">true</item>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 365 KiB