2
0
mirror of https://github.com/fork-maintainers/iceraven-browser synced 2024-11-19 09:25:34 +00:00

[fenix] Closes https://github.com/mozilla-mobile/fenix/issues/484 -Library Screen UI remove divider, add selectable background

This commit is contained in:
Emily Kager 2019-02-20 11:14:26 -08:00 committed by Colin Lee
parent 3aeaac9459
commit b924df54f5
4 changed files with 32 additions and 29 deletions

View File

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/photonGrey30"/>
</shape>

View File

@ -14,7 +14,10 @@
android:id="@+id/librarySessions"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?android:attr/selectableItemBackground"
android:clickable="true"
android:contentDescription="@string/library_sessions"
android:focusable="true"
app:listItemIcon="@drawable/library_icon_sessions_circle_background"
app:listItemTitle="@string/library_sessions" />
@ -22,7 +25,10 @@
android:id="@+id/libraryScreenshots"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?android:attr/selectableItemBackground"
android:clickable="true"
android:contentDescription="@string/library_screenshots"
android:focusable="true"
app:listItemIcon="@drawable/library_icon_screenshots_circle_background"
app:listItemTitle="@string/library_screenshots" />
@ -30,7 +36,10 @@
android:id="@+id/libraryDownloads"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?android:attr/selectableItemBackground"
android:clickable="true"
android:contentDescription="@string/library_downloads"
android:focusable="true"
app:listItemIcon="@drawable/library_icon_downloads_circle_background"
app:listItemTitle="@string/library_downloads" />
@ -38,7 +47,10 @@
android:id="@+id/libraryFavorites"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?android:attr/selectableItemBackground"
android:clickable="true"
android:contentDescription="@string/library_favorites"
android:focusable="true"
app:listItemIcon="@drawable/library_icon_favorites_circle_background"
app:listItemTitle="@string/library_favorites" />
@ -46,6 +58,9 @@
android:id="@+id/libraryHistory"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?android:attr/selectableItemBackground"
android:clickable="true"
android:focusable="true"
app:listItemIcon="@drawable/library_icon_history_circle_background"
app:listItemTitle="@string/library_history" />
@ -53,7 +68,10 @@
android:id="@+id/libraryLogins"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?android:attr/selectableItemBackground"
android:clickable="true"
android:contentDescription="@string/library_logins"
android:focusable="true"
app:listItemIcon="@drawable/library_icon_logins_circle_background"
app:listItemTitle="@string/library_logins" />

View File

@ -5,19 +5,18 @@
<merge 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"
tools:parentTag="androidx.constraintlayout.widget.ConstraintLayout"
android:layout_width="match_parent"
android:layout_height="@dimen/library_item_height"
android:background="?android:attr/selectableItemBackground"
android:clickable="true"
android:focusable="true">
tools:parentTag="androidx.constraintlayout.widget.ConstraintLayout">
<ImageView
android:id="@+id/libraryIcon"
android:layout_width="@dimen/library_item_icon_height"
android:layout_height="@dimen/library_item_icon_height"
android:layout_margin="8dp"
android:layout_marginStart="16dp"
android:layout_marginStart="@dimen/library_item_icon_margin_horizontal"
android:layout_marginTop="@dimen/library_item_icon_margin_vertical"
android:layout_marginEnd="@dimen/library_item_icon_margin_horizontal"
android:layout_marginBottom="@dimen/library_item_icon_margin_vertical"
android:background="@drawable/library_icon_logins_circle_background"
android:clickable="false"
app:layout_constraintBottom_toBottomOf="parent"
@ -27,20 +26,12 @@
<TextView
android:id="@+id/libraryItemTitle"
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_marginStart="16dp"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/library_item_icon_margin_horizontal"
android:clickable="false"
android:gravity="center_vertical"
android:textAppearance="@style/TextAppearance.MaterialComponents.Subtitle1"
android:clickable="false"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@id/libraryIcon" />
<View
android:layout_width="0dp"
android:layout_height="1dp"
android:background="@drawable/library_separator"
android:clickable="false"
app:layout_constraintStart_toStartOf="@id/libraryItemTitle"
app:layout_constraintTop_toBottomOf="@id/libraryIcon" />
</merge>
app:layout_constraintStart_toEndOf="@id/libraryIcon"
app:layout_constraintTop_toTopOf="parent" />
</merge>

View File

@ -8,7 +8,8 @@
<dimen name="mozac_browser_menu_corner_radius">14dp</dimen>
<dimen name="toolbar_elevation">7dp</dimen>
<dimen name="library_item_height">56dp</dimen>
<dimen name="library_item_icon_height">40dp</dimen>
<dimen name="library_item_icon_margin">16dp</dimen>
<dimen name="library_item_icon_height">48dp</dimen>
<dimen name="library_item_icon_margin_horizontal">16dp</dimen>
<dimen name="library_item_icon_margin_vertical">8dp</dimen>
<dimen name="history_favicon_width_height">40dp</dimen>
</resources>