Skip to content

Commit

Permalink
Update favorite icon #9
Browse files Browse the repository at this point in the history
  • Loading branch information
handnew04 committed Dec 27, 2020
1 parent fed3db7 commit 6438730
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 10 deletions.
10 changes: 10 additions & 0 deletions app/src/main/res/drawable/ic_favorite_off.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="19dp"
android:height="18dp"
android:viewportWidth="19"
android:viewportHeight="18">
<path
android:pathData="M9.5,18C9.3211,18 9.1504,17.9244 9.0288,17.7915L1.4352,9.4927C1.4332,9.4906 1.4312,9.4884 1.4294,9.4862C0.5076,8.4515 0,7.0801 0,5.6246C0,4.1691 0.5076,2.7977 1.4294,1.7629L1.5447,1.6334C2.483,0.5801 3.7358,0 5.0723,0C6.4088,0 7.6616,0.5801 8.5999,1.6335L9.5,2.644L10.4001,1.6335C11.3383,0.5802 12.5911,0.0001 13.9277,0.0001C15.2642,0.0001 16.5169,0.5802 17.4553,1.6336L17.5705,1.7628C18.4924,2.7979 19,4.1692 19,5.6247C19,7.0801 18.4924,8.4515 17.5707,9.4863C17.5687,9.4885 17.5668,9.4906 17.5648,9.4928L9.9712,17.7916C9.8496,17.9244 9.6789,18 9.5,18ZM2.3807,8.6094L9.5001,16.39L16.6195,8.6094C18.0843,6.9615 18.0834,4.2832 16.6167,2.6366L16.5016,2.5074C15.81,1.731 14.896,1.3035 13.9278,1.3035C12.9596,1.3035 12.0456,1.731 11.3542,2.5071L9.9772,4.0531C9.8553,4.1899 9.682,4.268 9.5002,4.268C9.3184,4.268 9.1451,4.1899 9.0232,4.0531L7.6461,2.5072C6.9547,1.731 6.0407,1.3035 5.0725,1.3035C4.1043,1.3035 3.1904,1.731 2.499,2.5071L2.3836,2.6367C0.9169,4.2832 0.9159,6.9616 2.3807,8.6094Z"
android:fillColor="#9D9D9D"
android:fillType="evenOdd"/>
</vector>
9 changes: 9 additions & 0 deletions app/src/main/res/drawable/ic_favorite_on.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="19dp"
android:height="18dp"
android:viewportWidth="19"
android:viewportHeight="18">
<path
android:pathData="M14.0521,0C11.9446,0 10.2039,2.0231 9.5,2.9779C8.7961,2.0231 7.0554,0 4.9479,0C2.2196,0 0,2.5924 0,5.7784C0,7.5167 0.6676,9.1367 1.8361,10.2453C1.8531,10.2756 1.874,10.3036 1.8984,10.3288L9.2205,17.8805C9.2978,17.96 9.3987,18 9.5,18C9.6013,18 9.7025,17.96 9.7799,17.8801L17.3456,10.0639L17.4236,9.9856C17.4855,9.9253 17.5466,9.8641 17.615,9.7858C17.6436,9.7567 17.6671,9.7239 17.6853,9.6883C18.5338,8.6145 19,7.2294 19,5.7784C19,2.5924 16.7804,0 14.0521,0Z"
android:fillColor="#FFD243"/>
</vector>
2 changes: 1 addition & 1 deletion app/src/main/res/drawable/ic_list_detail_arrow.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
android:viewportWidth="8" android:width="20dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#00000000" android:pathData="M1,13L7,7L1,1"
android:strokeColor="#D8D8D8" android:strokeLineCap="round"
android:strokeLineJoin="round" android:strokeWidth="2"/>
android:strokeLineJoin="round" android:strokeWidth="1.5"/>
</vector>
5 changes: 5 additions & 0 deletions app/src/main/res/drawable/selector_button_favorite.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_selected="true" android:drawable="@drawable/ic_favorite_on"/>
<item android:state_selected="false" android:drawable="@drawable/ic_favorite_off"/>
</selector>
8 changes: 6 additions & 2 deletions app/src/main/res/layout/item_restaurant_with_channels.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,18 @@
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toTopOf="@id/tv_address"/>

<Button
<ImageButton
style="@style/Widget.MukMap.Button.Base"
android:id="@+id/btn_favorite"
android:layout_width="40dp"
android:layout_height="40dp"
android:background="@android:color/transparent"
android:src="@drawable/selector_button_favorite"
app:layout_constraintBottom_toBottomOf="@id/tv_restaurant"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/tv_restaurant"
app:layout_constraintTop_toTopOf="@id/tv_restaurant" />
app:layout_constraintTop_toTopOf="@id/tv_restaurant"
android:contentDescription="@string/image_button" />

<TextView
android:id="@+id/tv_address"
Expand Down
16 changes: 9 additions & 7 deletions app/src/main/res/layout/item_search_results.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="55dp"
android:orientation="horizontal"
android:weightSum="3">
android:orientation="horizontal">

<TextView
style="@style/Widget.MukMap.TextView.ListTitle"
Expand All @@ -20,14 +19,17 @@
android:maxLines="1"
android:text="맛있는 고깃집" />

<Button
<ImageButton
style="@style/Widget.MukMap.Button.Base"
android:layout_width="18dp"
android:layout_height="18dp"
android:layout_width="60dp"
android:layout_height="40dp"
android:layout_gravity="center_vertical"
android:layout_weight="1"
android:background="@drawable/ic_list_detail_arrow"
android:contentDescription="@string/image_button" />
android:background="@android:color/transparent"
android:contentDescription="@string/image_button"
android:padding="10dp"
android:scaleType="fitCenter"
android:src="@drawable/ic_list_detail_arrow" />
</LinearLayout>

<View
Expand Down

0 comments on commit 6438730

Please sign in to comment.