Skip to content

Commit

Permalink
FIX #134 : [UI] Use vector image for icon 'star' ⭐
Browse files Browse the repository at this point in the history
  • Loading branch information
ghusta authored and Guillaume Husta committed Mar 27, 2020
1 parent 828fc0d commit 00a0463
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 9 deletions.
6 changes: 3 additions & 3 deletions app/src/main/res/drawable-night/ic_official_image.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
android:viewportHeight="7">
<path
android:fillColor="@android:color/white"
android:fillAlpha="0.8"
android:fillAlpha="1.0"
android:pathData="m0.07635,6.32073 l0.93353,-0.39065 0.40693,0.8962 0.95747,-2.41282c-0.50268,-0.02297 -0.98141,-0.18383 -1.34046,-0.45958z" />
<path
android:fillColor="@android:color/white"
android:fillAlpha="0.8"
android:fillAlpha="1.0"
android:pathData="m3.71473,3.95387c-0.38299,0.27575 -0.83779,0.43661 -1.34046,0.45958l0.95747,2.41282 0.40693,-0.8962 0.93353,0.39065z" />
<path
android:fillColor="@android:color/white"
android:fillAlpha="0.8"
android:fillAlpha="1.0"
android:pathData="m4.38496,2.23043c0,-1.11705 -0.89364,-2.01068 -2.01068,-2.01068 -1.11705,0 -2.01068,0.89364 -2.01068,2.01068 0,1.11705 0.89364,2.01068 2.01068,2.01068 1.11705,0 2.01068,-0.89364 2.01068,-2.01068zM3.1562,3.34747 L2.37426,2.83364 1.59234,3.34747 1.92745,2.45384c-0.22341,-0.14894 -0.44682,-0.29788 -0.67023,-0.44682l0.78194,0l0.33512,-0.89364 0.33512,0.89364l0.78194,0l-0.67023,0.44682z" />
</vector>
10 changes: 10 additions & 0 deletions app/src/main/res/drawable-night/ic_star_24dp.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="@android:color/white"
android:fillAlpha="1.0"
android:pathData="M12,17.27L18.18,21l-1.64,-7.03L22,9.24l-7.19,-0.61L12,2 9.19,8.63 2,9.24l5.46,4.73L5.82,21z"/>
</vector>
6 changes: 3 additions & 3 deletions app/src/main/res/drawable/ic_official_image.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
android:viewportHeight="7">
<path
android:fillColor="@android:color/black"
android:fillAlpha="0.8"
android:fillAlpha="1.0"
android:pathData="m0.07635,6.32073 l0.93353,-0.39065 0.40693,0.8962 0.95747,-2.41282c-0.50268,-0.02297 -0.98141,-0.18383 -1.34046,-0.45958z" />
<path
android:fillColor="@android:color/black"
android:fillAlpha="0.8"
android:fillAlpha="1.0"
android:pathData="m3.71473,3.95387c-0.38299,0.27575 -0.83779,0.43661 -1.34046,0.45958l0.95747,2.41282 0.40693,-0.8962 0.93353,0.39065z" />
<path
android:fillColor="@android:color/black"
android:fillAlpha="0.8"
android:fillAlpha="1.0"
android:pathData="m4.38496,2.23043c0,-1.11705 -0.89364,-2.01068 -2.01068,-2.01068 -1.11705,0 -2.01068,0.89364 -2.01068,2.01068 0,1.11705 0.89364,2.01068 2.01068,2.01068 1.11705,0 2.01068,-0.89364 2.01068,-2.01068zM3.1562,3.34747 L2.37426,2.83364 1.59234,3.34747 1.92745,2.45384c-0.22341,-0.14894 -0.44682,-0.29788 -0.67023,-0.44682l0.78194,0l0.33512,-0.89364 0.33512,0.89364l0.78194,0l-0.67023,0.44682z" />
</vector>
10 changes: 10 additions & 0 deletions app/src/main/res/drawable/ic_star_24dp.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="@android:color/black"
android:fillAlpha="1.0"
android:pathData="M12,17.27L18.18,21l-1.64,-7.03L22,9.24l-7.19,-0.61L12,2 9.19,8.63 2,9.24l5.46,4.73L5.82,21z"/>
</vector>
17 changes: 14 additions & 3 deletions app/src/main/res/layout/list_docker_image_group_item.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,23 @@
android:orientation="vertical"
android:paddingEnd="2dp">

<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:minHeight="24dp"
android:paddingBottom="2dp"
android:tint="@color/secondaryTextColor"
android:tintMode="src_in"
app:srcCompat="@drawable/ic_star_24dp"
tools:ignore="ContentDescription"
tools:layout_gravity="center"/>

<TextView
android:id="@+id/listitem_image_stars"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="1dp"
android:drawablePadding="0dp"
android:drawableTop="@android:drawable/star_off"
android:gravity="center"
android:minWidth="30dp"
android:text="1234"
Expand All @@ -39,9 +49,10 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:alpha="0.4"
android:minHeight="24dp"
android:paddingBottom="2dp"
android:tint="@color/secondaryTextColor"
android:tintMode="src_in"
app:srcCompat="@drawable/ic_official_image"
tools:ignore="ContentDescription"
tools:layout_gravity="center"/>
Expand Down

0 comments on commit 00a0463

Please sign in to comment.