Skip to content

Commit

Permalink
Give unique names to some styles
Browse files Browse the repository at this point in the history
Signed-off-by: Rafael Chagas <[email protected]>
  • Loading branch information
rtchagas committed Mar 1, 2020
1 parent b9683fe commit bf2824a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions library/src/main/res/layout/activity_place_picker.xml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@

<ImageView
android:id="@+id/ivMarkerSelect"
style="@style/Icon.Secondary"
style="@style/PingIcon.Secondary"
android:layout_marginStart="@dimen/guide_start_margin"
android:layout_marginBottom="@dimen/selector_margin"
android:contentDescription="@string/picker_select_this"
Expand Down Expand Up @@ -121,7 +121,7 @@

<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
style="@style/ToolbarStyle"
style="@style/PingToolbarStyle"
android:theme="@style/PingTheme.AppBarOverlay"
app:layout_collapseMode="pin"
app:title="@string/picker_title" />
Expand All @@ -139,7 +139,7 @@
app:rippleColor="@android:color/transparent">

<ImageView
style="@style/Icon.OnSurface"
style="@style/PingIcon.OnSurface"
android:layout_gravity="center_vertical"
android:layout_marginStart="@dimen/card_search_content_start_margin"
android:contentDescription="@android:string/search_go"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

<ImageButton
android:id="@+id/places_autocomplete_back_button"
style="@style/Icon.OnSurface"
style="@style/PingIcon.OnSurface"
android:layout_gravity="center_vertical"
android:layout_marginStart="@dimen/card_search_content_start_margin"
android:layout_marginEnd="20dp"
Expand All @@ -52,7 +52,7 @@

<ImageButton
android:id="@+id/places_autocomplete_clear_button"
style="@style/Icon.OnSurface"
style="@style/PingIcon.OnSurface"
android:layout_gravity="center_vertical"
android:layout_marginEnd="16dp"
android:background="?attr/selectableItemBackgroundBorderless"
Expand Down
12 changes: 6 additions & 6 deletions library/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,33 +41,33 @@
<item name="android:windowTranslucentStatus">true</item>
</style>

<style name="ToolbarStyle" parent="Widget.MaterialComponents.Toolbar.Surface">
<style name="PingToolbarStyle" parent="Widget.MaterialComponents.Toolbar.Surface">
<!-- Toolbar should always be within an AppBarLayout which provides the background. -->
<item name="android:background">@null</item>
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">?attr/actionBarSize</item>
<item name="titleTextColor">?attr/colorOnPrimarySurface</item>
</style>

<style name="Icon">
<style name="PingIcon">
<item name="android:layout_width">@dimen/icon_size_small</item>
<item name="android:layout_height">@dimen/icon_size_small</item>
<item name="android:alpha">0.54</item>
</style>

<style name="Icon.OnPrimary">
<style name="PingIcon.OnPrimary">
<item name="android:tint">?attr/colorOnPrimary</item>
</style>

<style name="Icon.OnSurface">
<style name="PingIcon.OnSurface">
<item name="android:tint">?attr/colorOnSurface</item>
</style>

<style name="Icon.OnPrimarySurface">
<style name="PingIcon.OnPrimarySurface">
<item name="android:tint">?attr/colorOnPrimarySurface</item>
</style>

<style name="Icon.Secondary">
<style name="PingIcon.Secondary">
<item name="android:alpha">1</item>
<item name="android:tint">?attr/colorSecondary</item>
</style>
Expand Down

0 comments on commit bf2824a

Please sign in to comment.