Skip to content

Commit

Permalink
For mozilla-mobile#9323 - Use android:background to set small search …
Browse files Browse the repository at this point in the history
…widget microphone icon
  • Loading branch information
Alexandru2909 committed Oct 19, 2022
1 parent 6a07c17 commit 42d5843
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 15 deletions.
18 changes: 13 additions & 5 deletions app/src/main/res/drawable/ic_microphone_widget.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
<!-- 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/. -->

<vector android:height="32dp" android:viewportHeight="24"
android:viewportWidth="24" android:width="32dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@color/fx_mobile_icon_color_primary" android:fillType="evenOdd" android:pathData="M17,11v-1a1,1 0,0 1,2 0v1a7,7 0,0 1,-6 6.93L13,21a1,1 0,0 1,-2 0v-3.07A7,7 0,0 1,5 11v-1a1,1 0,0 1,2 0v1a5,5 0,0 0,10 0zM12,2a3,3 0,0 1,3 3v6a3,3 0,0 1,-6 0L9,5a3,3 0,0 1,3 -3z"/>
</vector>
<inset xmlns:android="http://schemas.android.com/apk/res/android"
android:inset="8dp">
<vector
android:width="32dp"
android:height="32dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="@color/fx_mobile_icon_color_primary"
android:fillType="evenOdd"
android:pathData="M17,11v-1a1,1 0,0 1,2 0v1a7,7 0,0 1,-6 6.93L13,21a1,1 0,0 1,-2 0v-3.07A7,7 0,0 1,5 11v-1a1,1 0,0 1,2 0v1a5,5 0,0 0,10 0zM12,2a3,3 0,0 1,3 3v6a3,3 0,0 1,-6 0L9,5a3,3 0,0 1,3 -3z" />
</vector>
</inset>
6 changes: 0 additions & 6 deletions app/src/main/res/drawable/ic_microphone_widget_padded.xml

This file was deleted.

2 changes: 1 addition & 1 deletion app/src/main/res/layout/search_widget_large.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:layout_marginEnd="1dp"
android:background="@drawable/ic_microphone_widget_padded"
android:background="@drawable/ic_microphone_widget"
android:contentDescription="@string/search_widget_voice" />
</RelativeLayout>
2 changes: 1 addition & 1 deletion app/src/main/res/layout/search_widget_medium.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:layout_marginEnd="1dp"
android:background="@drawable/ic_microphone_widget_padded" />
android:background="@drawable/ic_microphone_widget" />
</RelativeLayout>
3 changes: 1 addition & 2 deletions app/src/main/res/layout/search_widget_small.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
- 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/. -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="100dp"
android:layout_height="50dp"
android:background="@drawable/rounded_search_widget_background"
Expand All @@ -23,5 +22,5 @@
android:contentDescription="@string/search_widget_voice"
android:padding="10dp"
android:scaleType="centerInside"
app:srcCompat="@drawable/ic_microphone_widget" />
android:background="@drawable/ic_microphone_widget" />
</LinearLayout>

0 comments on commit 42d5843

Please sign in to comment.