For #225 - Adds icons for list items

nightly-build-test
Jeff Boek 5 years ago
parent 3006b21508
commit e9c7943fe8

@ -26,7 +26,7 @@ class DeleteBrowsingDataItem @JvmOverloads constructor(
attrs.let {
context.theme.obtainStyledAttributes(
it,
R.styleable.LibraryListItem,
R.styleable.DeleteBrowsingDataItem,
0, 0
).apply {
try {

@ -0,0 +1,32 @@
<?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/. -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="oval">
<size
android:width="40dp"
android:height="40dp" />
<solid android:color="@color/collection_circle_icon_background" />
</shape>
</item>
<item
android:bottom="8dp"
android:left="8dp"
android:right="8dp"
android:top="8dp">
<vector
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="@color/collection_circle_icon_foreground"
android:fillType="evenOdd"
android:pathData="M13,14.6449L14.2772,13.309C14.6588,12.9098 15.2918,12.8955 15.691,13.2772C16.0902,13.6588 16.1045,14.2918 15.7228,14.691L12.7903,17.7585C12.4026,18.1641 11.7571,18.1713 11.3604,17.7746L8.2929,14.7071C7.9024,14.3166 7.9024,13.6834 8.2929,13.2929C8.6834,12.9024 9.3166,12.9024 9.7071,13.2929L11,14.5858L11,11C11,10.4477 11.4477,10 12,10C12.5523,10 13,10.4477 13,11L13,14.6449ZM20,8L4,8L4,19C4,19.5523 4.4477,20 5,20L19,20C19.5523,20 20,19.5523 20,19L20,8ZM18.7908,6L17.333,4.3401C17.1432,4.1239 16.8694,4 16.5817,4L7.8284,4C7.5632,4 7.3089,4.1054 7.1213,4.2929L5.4142,6L18.7908,6ZM2,19L2,7.8284C2,7.0328 2.3161,6.2697 2.8787,5.7071L5.7071,2.8787C6.2697,2.3161 7.0328,2 7.8284,2L16.5817,2C17.4448,2 18.2662,2.3718 18.8358,3.0203L21.2541,5.7739C21.7349,6.3213 22,7.025 22,7.7536L22,19C22,20.6569 20.6569,22 19,22L5,22C3.3431,22 2,20.6569 2,19Z"
android:strokeWidth="1"
android:strokeColor="#00000000" />
</vector>
</item>
</layer-list>

@ -0,0 +1,32 @@
<?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/. -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="oval">
<size
android:width="40dp"
android:height="40dp" />
<solid android:color="@color/tab_circle_icon_background" />
</shape>
</item>
<item
android:bottom="8dp"
android:left="8dp"
android:right="8dp"
android:top="8dp">
<vector
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="@color/tab_circle_icon_foreground"
android:fillType="evenOdd"
android:pathData="M15.2222,22L5.7778,22C3.6914,22 2,20.3086 2,18.2222L2,8.7778C2,6.6914 3.6914,5 5.7778,5L15.2222,5C17.3086,5 19,6.6914 19,8.7778L19,18.2222C19,20.3086 17.3086,22 15.2222,22ZM5.8571,7C4.8315,7 4,7.8315 4,8.8571L4,18.1429C4,19.1685 4.8315,20 5.8571,20L15.1429,20C16.1685,20 17,19.1685 17,18.1429L17,8.8571C17,7.8315 16.1685,7 15.1429,7L5.8571,7ZM6,4C6,2.8954 6.8954,2 8,2L15.9866,2C19.3004,2 21.9866,4.6863 21.9866,8C21.9866,8.008 21.9866,8.008 21.9866,8.016L21.9632,16.0027C21.96,17.1073 21.062,18.0003 19.9573,17.9973L19.9866,8.0107L19.9866,8C19.9866,5.7909 18.1958,4 15.9866,4L6,4Z"
android:strokeWidth="1"
android:strokeColor="#00000000" />
</vector>
</item>
</layer-list>

@ -20,8 +20,9 @@
android:clickable="true"
android:contentDescription="@string/library_bookmarks"
android:focusable="true"
app:listItemIcon="@drawable/bookmarks_circle_background_outline"
app:listItemTitle="@string/library_bookmarks" />
app:deleteBrowsingDataItemIcon="@drawable/ic_tab_circle_background"
app:deleteBrowsingDataItemTitle="@string/preferences_delete_browsing_data_tabs_title"
app:deleteBrowsingDataItemSubtitle="@string/preferences_delete_browsing_data_tabs_subtitle" />
<org.mozilla.fenix.settings.DeleteBrowsingDataItem
android:id="@+id/browsingDataItem"
android:layout_width="match_parent"
@ -30,8 +31,9 @@
android:clickable="true"
android:contentDescription="@string/library_bookmarks"
android:focusable="true"
app:listItemIcon="@drawable/bookmarks_circle_background_outline"
app:listItemTitle="@string/library_bookmarks" />
app:deleteBrowsingDataItemIcon="@drawable/library_icon_history_circle_background"
app:deleteBrowsingDataItemTitle="@string/preferences_delete_browsing_data_browsing_data_title"
app:deleteBrowsingDataItemSubtitle="@string/preferences_delete_browsing_data_browsing_data_subtitle" />
<org.mozilla.fenix.settings.DeleteBrowsingDataItem
android:id="@+id/collectionsItem"
android:layout_width="match_parent"
@ -40,11 +42,8 @@
android:clickable="true"
android:contentDescription="@string/library_bookmarks"
android:focusable="true"
app:listItemIcon="@drawable/bookmarks_circle_background_outline"
app:listItemTitle="@string/library_bookmarks" />
app:deleteBrowsingDataItemIcon="@drawable/ic_collections_circle_background"
app:deleteBrowsingDataItemTitle="@string/preferences_delete_browsing_data_collections_title"
app:deleteBrowsingDataItemSubtitle="@string/preferences_delete_browsing_data_collections_subtitle" />
</LinearLayout>
</ScrollView>

@ -102,6 +102,12 @@
<color name="library_reading_list_icon_background">#FCE98F</color>
<color name="library_reading_list_icon">#8A201F</color>
<color name="tab_circle_icon_background">#FFDDBD</color>
<color name="tab_circle_icon_foreground">#7C1504</color>
<color name="collection_circle_icon_background">#D1FFEE</color>
<color name="collection_circle_icon_foreground">#084036</color>
<!-- Quick action buttons-->
<color name="quick_action_share_icon">#174291</color>
<color name="quick_action_share_icon_background">#b9f0fd</color>

@ -565,4 +565,18 @@
<!-- Title for the Delete browsing data preference -->
<string name="preferences_delete_browsing_data">Delete browsing data</string>
<!-- Title for the tabs item in Delete browsing data -->
<string name="preferences_delete_browsing_data_tabs_title">Open Tabs</string>
<!-- Subtitle for the tabs item in Delete browsing data, parameter will be replaced with the number of open tabs -->
<string name="preferences_delete_browsing_data_tabs_subtitle">%s tabs</string>
<!-- Title for the data and history items in Delete browsing data -->
<string name="preferences_delete_browsing_data_browsing_data_title">Browsing history and site data</string>
<!-- Subtitle for the data and history items item in Delete browsing data, parameter will be replaced with the
number of history items the user has -->
<string name="preferences_delete_browsing_data_browsing_data_subtitle">%s addresses</string>
<!-- Title for the collections item in Delete browsing data -->
<string name="preferences_delete_browsing_data_collections_title">Collections</string>
<!-- Subtitle for the collections item in Delete browsing data, parameter will be replaced with the
number of collections that will be deleted -->
<string name="preferences_delete_browsing_data_collections_subtitle">%s collections</string>
</resources>

Loading…
Cancel
Save