[android] size vertically based on children (#8978)

* size vertically based on children, fixes #8600

Signed-off-by: Nic Pottier <nicpottier@gmail.com>

* align to top instead of center

Signed-off-by: Nic Pottier <nicpottier@gmail.com>

* center all items in bookmark list

Signed-off-by: Nic Pottier <nicpottier@gmail.com>

---------

Signed-off-by: Nic Pottier <nicpottier@gmail.com>
This commit is contained in:
Nic Pottier 2024-08-16 08:17:04 -07:00 committed by GitHub
parent d24eb11dad
commit d41181d043
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 15 additions and 12 deletions

View file

@ -14,8 +14,9 @@
android:id="@+id/image"
android:layout_width="@dimen/nav_icon_size"
android:layout_height="wrap_content"
tools:srcCompat="@drawable/ic_import"
app:tint="?colorAccent"/>
android:layout_gravity="center_vertical"
app:tint="?colorAccent"
tools:srcCompat="@drawable/ic_import" />
<TextView
android:id="@+id/text"
android:layout_width="wrap_content"

View file

@ -4,16 +4,17 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="@dimen/height_item_edit_bookmark"
android:layout_height="wrap_content"
android:background="?clickableBackground">
<CheckBox
android:id="@+id/checkbox"
android:layout_width="@dimen/margin_double_plus"
android:layout_height="match_parent"
android:layout_marginStart="@dimen/margin_quarter"
android:button="@drawable/button_visibility_centre_inset"
android:background="@null"
android:buttonTint="?accentColorSelector" />
android:id="@+id/checkbox"
android:layout_width="@dimen/margin_double_plus"
android:layout_height="match_parent"
android:layout_centerVertical="true"
android:layout_marginStart="@dimen/margin_quarter"
android:background="@null"
android:button="@drawable/button_visibility_centre_inset"
android:buttonTint="?accentColorSelector" />
<TextView
android:id="@+id/name"
android:layout_width="wrap_content"
@ -49,9 +50,10 @@
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:background="?selectableItemBackgroundBorderless"
android:importantForAccessibility="no"
android:paddingHorizontal="@dimen/margin_half"
app:srcCompat="@drawable/ic_more"
app:tint="?secondary"
android:importantForAccessibility="no" />
app:tint="?secondary" />
</RelativeLayout>