Skip to content

Commit

Permalink
Update map buttons style
Browse files Browse the repository at this point in the history
  • Loading branch information
avazirna committed Dec 11, 2024
1 parent 2e275f5 commit 9e87ddb
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 83 deletions.
9 changes: 3 additions & 6 deletions app/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -339,14 +339,12 @@
<activity android:name="org.commcare.gis.EntityMapActivity">
</activity>

<activity android:name="org.commcare.gis.EntityMapboxActivity"
android:theme="@style/Theme.AppCompat.Light.NoActionBar">
<activity android:name="org.commcare.gis.EntityMapboxActivity">
</activity>

<activity
android:name="org.commcare.gis.DrawingBoundaryActivity"
android:exported="false"
android:theme="@style/Theme.AppCompat.Light.NoActionBar">
android:exported="false">
<intent-filter>
<action android:name="org.commcare.dalvik.action.DrawBoundary"/>

Expand All @@ -362,8 +360,7 @@
</activity>
<activity android:name="org.commcare.activities.InstallFromListActivity">
</activity>
<activity android:name="org.commcare.gis.MapboxLocationPickerActivity"
android:theme="@style/Theme.AppCompat.Light.NoActionBar"/>
<activity android:name="org.commcare.gis.MapboxLocationPickerActivity" />

<uses-library
android:name="com.google.android.maps"
Expand Down
10 changes: 10 additions & 0 deletions app/res/color/button_green_background.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Disabled state -->
<item android:state_enabled="false" android:color="@color/green_700" />
<!-- Pressed state -->
<item android:state_pressed="true" android:color="@color/green_900" />
<!-- Default state -->
<item android:color="@color/green_500" />
</selector>

9 changes: 9 additions & 0 deletions app/res/color/button_orange_background.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Disabled state -->
<item android:state_enabled="false" android:color="@color/orange_700" />
<!-- Pressed state -->
<item android:state_pressed="true" android:color="@color/orange_900" />
<!-- Default state -->
<item android:color="@color/orange_500" />
</selector>
9 changes: 9 additions & 0 deletions app/res/color/button_red_background.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Disabled state -->
<item android:state_enabled="false" android:color="@color/red_700" />
<!-- Pressed state -->
<item android:state_pressed="true" android:color="@color/red_900" />
<!-- Default state -->
<item android:color="@color/red_500" />
</selector>
25 changes: 0 additions & 25 deletions app/res/drawable/button_green_background.xml

This file was deleted.

24 changes: 0 additions & 24 deletions app/res/drawable/button_orange_background.xml

This file was deleted.

24 changes: 0 additions & 24 deletions app/res/drawable/button_red_background.xml

This file was deleted.

10 changes: 6 additions & 4 deletions app/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -270,24 +270,26 @@
</style>

<style name="MapButton">
<item name="backgroundTint">@null</item>
<item name="android:minWidth">@dimen/map_button_min_width</item>
<item name="cornerRadius">@dimen/rounded_button_corner_radius</item>
<item name="android:insetBottom">0dp</item>
<item name="android:insetTop">0dp</item>
</style>

<style name="MapButtonColored" parent="MapButton">
<item name="android:textColor">@color/button_colored_text</item>
</style>

<style name="MapButtonGreen" parent="MapButtonColored">
<item name="android:background">@drawable/button_green_background</item>
<item name="android:backgroundTint">@color/button_green_background</item>
</style>

<style name="MapButtonRed" parent="MapButtonColored">
<item name="android:background">@drawable/button_red_background</item>
<item name="android:backgroundTint">@color/button_red_background</item>
</style>

<style name="MapButtonOrange" parent="MapButtonColored">
<item name="android:background">@drawable/button_orange_background</item>
<item name="android:backgroundTint">@color/button_orange_background</item>
</style>

<color name="login_edit_text_color">@color/cc_core_text</color>
Expand Down

0 comments on commit 9e87ddb

Please sign in to comment.