diff --git a/CHANGELOG.md b/CHANGELOG.md index 539133a7..a73f382c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ * New feature: Turn tokens red if they are about to expire (Issue #311, PR #410 by @Ullas-Aithal) * New feature: Handle otpauth:// intents from other apps (Issue #324, PR #393 by @schwedenmut) * New feature: Create an encrypted backup every time the entries are changed (PR #397 and PR #421 by @RichyHBM) - * New feature: Different layouts for the entry cards + * New feature: Different layouts for the entry cards (compact, default and full) * New feature: New thumbnail size "Tiny" * New feature: Block accessibility services from seeing sensitive input fields via a new settings item * New feature: Import QR codes from image files (Issue #377, PR #425 by @Ullas-Aithal) diff --git a/app/src/main/java/org/shadowice/flocke/andotp/Utilities/Constants.java b/app/src/main/java/org/shadowice/flocke/andotp/Utilities/Constants.java index 2869beab..1d5bb6cd 100644 --- a/app/src/main/java/org/shadowice/flocke/andotp/Utilities/Constants.java +++ b/app/src/main/java/org/shadowice/flocke/andotp/Utilities/Constants.java @@ -57,7 +57,7 @@ public class Constants { } public enum CardLayouts { - DEFAULT, FULL + COMPACT, DEFAULT, FULL } public enum AutoBackup { diff --git a/app/src/main/java/org/shadowice/flocke/andotp/View/EntriesCardAdapter.java b/app/src/main/java/org/shadowice/flocke/andotp/View/EntriesCardAdapter.java index 67739f9a..6479bdc6 100644 --- a/app/src/main/java/org/shadowice/flocke/andotp/View/EntriesCardAdapter.java +++ b/app/src/main/java/org/shadowice/flocke/andotp/View/EntriesCardAdapter.java @@ -242,6 +242,8 @@ public class EntriesCardAdapter extends RecyclerView.Adapter if (layout == Constants.CardLayouts.DEFAULT) { cardLayout = R.layout.component_card_default; + } else if (layout == Constants.CardLayouts.COMPACT) { + cardLayout = R.layout.component_card_compact; } else if (layout == Constants.CardLayouts.FULL) { cardLayout = R.layout.component_card_full; } diff --git a/app/src/main/res/layout/component_card_compact.xml b/app/src/main/res/layout/component_card_compact.xml new file mode 100644 index 00000000..7d9f0342 --- /dev/null +++ b/app/src/main/res/layout/component_card_compact.xml @@ -0,0 +1,240 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml index ca7a6651..a2b1b0c6 100644 --- a/app/src/main/res/values/dimens.xml +++ b/app/src/main/res/values/dimens.xml @@ -1,5 +1,6 @@ + 1dp 4dp 8dp 16dp diff --git a/app/src/main/res/values/settings.xml b/app/src/main/res/values/settings.xml index 773706b4..5006d694 100644 --- a/app/src/main/res/values/settings.xml +++ b/app/src/main/res/values/settings.xml @@ -103,6 +103,7 @@ + compact default full diff --git a/app/src/main/res/values/strings_settings.xml b/app/src/main/res/values/strings_settings.xml index e5baf56e..85bafc25 100644 --- a/app/src/main/res/values/strings_settings.xml +++ b/app/src/main/res/values/strings_settings.xml @@ -171,6 +171,7 @@ + Compact Default Full