For #4434 - made close button for collections more accessible. (#4443)

* fixes #4434 - made close button for collections more accessible.

set recommended minimum size for accessibility 48x48, while keeping image size the same
removed margin from button as it was not needed anymore
aligned close button in center of tab to be visual consistent with alignment of favicon and more visual accessible
implemented same visual solution as for #4193 - close button for tabs

* fixes #4434 - made buttons for collection home list row more accessible and aligned 3 dot menu with individual tabs close button

set buttons sizes to recommended minimum size for accessibility 48x48, while keeping image size the same
removed margins from buttons as they were not needed anymore
aligned center of menu buttons with center of collection icon
constrained description top to bottom of title, instead of share button to reduce empty space. (overlap with share button is already prevented by end constraint of description)
This commit is contained in:
Mihai Adrian 2019-08-14 20:12:39 +03:00 committed by Sawyer Blatz
parent 12371ca9c1
commit 1a4ef1535c
2 changed files with 13 additions and 15 deletions

View File

@ -78,32 +78,30 @@
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/collection_share_button"
app:layout_constraintStart_toStartOf="@id/collection_title"
app:layout_constraintTop_toBottomOf="@id/collection_share_button"
app:layout_constraintTop_toBottomOf="@id/collection_title"
tools:text="@tools:sample/lorem/random" />
<ImageButton
android:id="@+id/collection_share_button"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginStart="16dp"
android:layout_marginEnd="30dp"
android:layout_width="48dp"
android:layout_height="48dp"
android:background="?android:attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/share_button_content_description"
android:src="@drawable/ic_hollow_share"
app:layout_constraintEnd_toStartOf="@id/collection_overflow_button"
app:layout_constraintBottom_toBottomOf="@id/collection_icon"
app:layout_constraintTop_toTopOf="@id/collection_icon" />
<ImageButton
android:id="@+id/collection_overflow_button"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginTop="16dp"
android:layout_marginEnd="4.5dp"
android:layout_width="48dp"
android:layout_height="48dp"
android:background="?android:attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/collection_menu_button_content_description"
android:src="@drawable/ic_menu"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
app:layout_constraintTop_toTopOf="@id/collection_icon"
app:layout_constraintBottom_toBottomOf="@id/collection_icon"/>
<View
android:id="@+id/selected_border"

View File

@ -21,6 +21,7 @@
<ImageView
android:id="@+id/collection_tab_icon"
android:importantForAccessibility="no"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginTop="23dp"
@ -62,16 +63,15 @@
<ImageButton
android:id="@+id/collection_tab_close_button"
android:layout_width="8dp"
android:layout_height="8dp"
android:layout_width="48dp"
android:layout_height="48dp"
android:background="?android:attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/close_tab"
android:src="@drawable/ic_close"
android:layout_marginTop="13dp"
android:layout_marginEnd="13dp"
android:alpha="0.8"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"/>
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"/>
<View
android:id="@+id/divider_line"