mirror of
https://github.com/Kunzisoft/KeePassDX.git
synced 2025-12-04 15:49:33 +01:00
Fix cardview margin
This commit is contained in:
@@ -56,8 +56,8 @@ class TemplateView @JvmOverloads constructor(context: Context,
|
||||
entryIconView = findViewById(R.id.entry_edit_icon_button)
|
||||
templateContainerView = findViewById(R.id.template_fields_container)
|
||||
// To fix card view margin in KitKat-
|
||||
val paddingVertical = resources.getDimensionPixelSize(R.dimen.card_view_margin_vertical)
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
|
||||
val paddingVertical = resources.getDimensionPixelSize(R.dimen.card_view_margin_vertical)
|
||||
val paddingHorizontal = resources.getDimensionPixelSize(R.dimen.card_view_margin_horizontal)
|
||||
templateContainerView.setPadding(paddingHorizontal, paddingVertical, paddingHorizontal, paddingVertical)
|
||||
}
|
||||
|
||||
@@ -30,8 +30,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@+id/entry_attachments_container"
|
||||
android:layout_marginBottom="4dp"/>
|
||||
app:layout_constraintBottom_toTopOf="@+id/entry_attachments_container"/>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/entry_attachments_container"
|
||||
|
||||
@@ -69,6 +69,8 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="?attr/cardViewStyle"
|
||||
app:layout_constraintTop_toBottomOf="@+id/template_fields_container" />
|
||||
android:layout_marginBottom="@dimen/card_view_margin_vertical"
|
||||
app:layout_constraintTop_toBottomOf="@+id/template_fields_container"
|
||||
app:layout_constraintBottom_toBottomOf="parent"/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
Reference in New Issue
Block a user