Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pm rounded button #2897

Merged
merged 51 commits into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
e850fbb
Merge remote-tracking branch 'origin/master'
pm-dimagi Nov 15, 2024
06e6611
-ui changes for rounded button
pm-dimagi Nov 15, 2024
2b46881
-ui changes for rounded button
pm-dimagi Nov 15, 2024
eeab8d2
-ui changes for rounded button
pm-dimagi Nov 15, 2024
573ca4d
- pr request changes
pm-dimagi Nov 19, 2024
6cc54e7
-title bar color changes
pm-dimagi Nov 19, 2024
b7156c8
Merge branch 'master' of https://github.com/dimagi/commcare-android i…
pm-dimagi Nov 20, 2024
10eadc6
-pr requested changes
pm-dimagi Nov 20, 2024
3ae3643
-pr requested changes
pm-dimagi Nov 22, 2024
ad7c456
-pr requested changes
pm-dimagi Nov 22, 2024
a3af6b6
-added launch icon and title bar icon in commcare
pm-dimagi Nov 22, 2024
8e070fd
-requested pr changes
pm-dimagi Nov 22, 2024
9f15541
-requested pr changes
pm-dimagi Nov 22, 2024
99bc8f8
-requested change for activity_drawing_boundary
pm-dimagi Nov 22, 2024
ccf96c2
-changes of button color
pm-dimagi Nov 27, 2024
1754bda
-changes of date widget
pm-dimagi Nov 28, 2024
42a347b
-changes of date widget
pm-dimagi Nov 28, 2024
e7cd5e8
Merge branch 'pm_rounded_button' into pm_CCCT_534
pm-dimagi Nov 29, 2024
29eb7f7
Merge pull request #2899 from dimagi/pm_CCCT_534
pm-dimagi Nov 29, 2024
affabbf
-changes for home button text size
pm-dimagi Nov 29, 2024
1d4a933
-changes for home button text size and old icons
pm-dimagi Dec 1, 2024
cfe8594
-text size change in square box
pm-dimagi Dec 3, 2024
ed3c688
Update square button icons
avazirna Dec 3, 2024
7ea3cf6
Update square tile font size
avazirna Dec 3, 2024
b79797c
Update square tile layout
avazirna Dec 3, 2024
2c5eefe
-button spacing in the dialog box
pm-dimagi Dec 3, 2024
2182e23
Merge branch 'master' into pm_rounded_button
avazirna Dec 4, 2024
063e95c
Update primary colour
avazirna Dec 4, 2024
53befeb
Update repeat group control dialog
avazirna Dec 4, 2024
5f33c64
Change dialog negative action style
avazirna Dec 4, 2024
732c706
Use positive button style in negative button
avazirna Dec 4, 2024
1def181
Update primary colour
avazirna Dec 4, 2024
322e1aa
Update Wifi direct UI tiles
avazirna Dec 4, 2024
4ac0f10
Make dialog buttons rounded cornered
avazirna Dec 6, 2024
3dcb2f1
Refactor
avazirna Dec 6, 2024
1e5f9d8
Change active controls colour to primary colour
avazirna Dec 6, 2024
5f22c1a
-ui overview design changes
pm-dimagi Dec 8, 2024
6c9ba8c
Update audio recorging widget buttons
avazirna Dec 8, 2024
3ea45c8
Update style
avazirna Dec 9, 2024
9365782
Update notification icon
avazirna Dec 9, 2024
c06692c
Refactor
avazirna Dec 9, 2024
67d2919
Refactor
avazirna Dec 9, 2024
44c763e
Update rounded buttons style
avazirna Dec 10, 2024
edbc979
Optimize map buttons styles
avazirna Dec 10, 2024
13ae017
Merge remote-tracking branch 'origin/pm_rounded_button' into pm_round…
pm-dimagi Dec 10, 2024
180db27
-- change of negative button style
pm-dimagi Dec 11, 2024
dde40f5
-change in the date picker color
pm-dimagi Dec 11, 2024
2e275f5
Revert "Optimize map buttons styles"
avazirna Dec 11, 2024
9e87ddb
Update map buttons style
avazirna Dec 11, 2024
4ef0149
Use selector to set rounded button background
avazirna Dec 11, 2024
eb6ce41
Improve RTL support
avazirna Dec 11, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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>
2 changes: 1 addition & 1 deletion app/res/color/primary_button_background.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="@color/button_disabled" android:state_enabled="false" />
<item android:color="@color/button_primary" />
<item android:color="@color/button_primary_color" />
</selector>
Binary file removed app/res/drawable-hdpi-v14/notification.png
Binary file not shown.
Binary file removed app/res/drawable-hdpi/icon_app_white.png
Binary file not shown.
Binary file removed app/res/drawable-hdpi/notification.png
Binary file not shown.
Binary file modified app/res/drawable-hdpi/pause_question_audio.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/res/drawable-hdpi/play_question_audio.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed app/res/drawable-ldpi-v14/notification.png
Binary file not shown.
Binary file removed app/res/drawable-ldpi/icon_app_white.png
Binary file not shown.
Binary file removed app/res/drawable-ldpi/notification.png
Binary file not shown.
Binary file removed app/res/drawable-mdpi-v14/notification.png
Binary file not shown.
Binary file removed app/res/drawable-mdpi/icon_app_white.png
Binary file not shown.
Binary file removed app/res/drawable-mdpi/notification.png
Binary file not shown.
Binary file modified app/res/drawable-mdpi/pause_question_audio.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/res/drawable-mdpi/play_question_audio.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed app/res/drawable-xhdpi/icon_app_white.png
Binary file not shown.
Binary file modified app/res/drawable-xhdpi/pause_question_audio.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/res/drawable-xhdpi/play_question_audio.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/res/drawable-xxxhdpi/pause_question_audio.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/res/drawable-xxxhdpi/play_question_audio.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 0 additions & 7 deletions app/res/drawable/actionbar_modern_spacing.xml

This file was deleted.

2 changes: 1 addition & 1 deletion app/res/drawable/btn_finish_background.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
android:state_pressed="true"
android:drawable="@color/cc_attention_positive_text"/>
<item
android:drawable="@color/cc_attention_positive_color"/>
android:drawable="@color/start_home_button"/>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Color inconsistency detected with design system

The current implementation uses @color/start_home_button (#6AB849), but this doesn't align with the design system's rounded button specifications. The design system (CustomButtonStyle) uses @color/cc_brand_color as the standard background color for primary rounded buttons.

  • btn_finish_background.xml should use @color/cc_brand_color instead of @color/start_home_button to maintain consistency with the design system
  • Consider applying the CustomButtonStyle directly instead of managing colors separately
🔗 Analysis chain

Ensure color consistency with design system

The button's default state now uses @color/start_home_button. Please verify this aligns with the Figma design specifications for rounded buttons.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for other usages of start_home_button to ensure consistency
rg -t xml "start_home_button" app/res/

Length of output: 473


Script:

#!/bin/bash
# Search for rounded button styles and their color definitions
rg -t xml "RoundedButton|rounded.*button" app/res/

# Also check for any button style definitions that might show the design system
rg -t xml "style.*=.*Button" app/res/values/

Length of output: 2704


Script:

#!/bin/bash
# Let's check the actual implementation of RoundedButtonStyle and CustomButtonStyle
rg -A 10 "RoundedButtonStyle|CustomButtonStyle" app/res/values/styles.xml

# Also check if there are any specific color definitions for rounded buttons
rg "start_home_button|rounded.*button.*color" app/res/values/colors.xml

Length of output: 1636

</selector>
8 changes: 8 additions & 0 deletions app/res/drawable/button_background_white.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/white" /> <!-- Background color -->
<corners android:radius="22dp" /> <!-- Rounded corners -->
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Corner radius of 22dp is inconsistent with app's button styling

Based on the search results, most rounded elements in the app use a 12dp radius (seen in multiple files like blue_tabbed_box.xml, grey_bordered_box.xml, info_bubble.xml, bubble.xml). The 22dp radius in button_background_white.xml is significantly larger and inconsistent with this pattern. Only border_dashed_edges.xml uses a similar larger radius of 18dp, but it's not a button element.

  • Consider adjusting the corner radius to 12dp to maintain consistency with other UI elements
  • If a different radius is required by design, document the reason for deviation
🔗 Analysis chain

Verify corner radius consistency with Figma design

The corner radius of 22dp should be verified against the Figma design specifications to ensure consistency across all rounded buttons in the app.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for other corner radius definitions in drawable files
rg -l "android:radius" --type xml

Length of output: 869


Script:

#!/bin/bash
# Search for corner radius values in drawable files
rg "android:radius=\"\d+dp\"" --type xml -A 1

Length of output: 3306


Script:

#!/bin/bash
# Search for button-specific drawables with corner radius
rg "android:radius=\"\d+dp\"" --type xml -A 2 -B 2 "*button*.xml"

Length of output: 118


Script:

#!/bin/bash
# Search for button-specific drawables with corner radius, using full paths
rg "android:radius=\"\d+dp\"" --type xml -A 2 -B 2 "button_background_white.xml|rounded_button_shape.xml|map_button_base_background.xml"

Length of output: 260

<stroke
android:width="2dp"
android:color="@color/cc_brand_color" /> <!-- Optional border -->
</shape>
8 changes: 0 additions & 8 deletions app/res/drawable/button_green_background.xml

This file was deleted.

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

This file was deleted.

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

This file was deleted.

Binary file removed app/res/drawable/ccbanner.png
Binary file not shown.
2 changes: 1 addition & 1 deletion app/res/drawable/check_update.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
android:viewportHeight="232.5">
<path
android:pathData="M238.1,74.1l-117.2,109.2l-0.8,-0.9l-23,-24.6l-34,-36.6l25.2,-23.4l34,36.4l91.9,-85.7z"
android:fillColor="#BCDEFF"/>
android:fillColor="@color/square_button_icon_color"/>
</vector>
12 changes: 12 additions & 0 deletions app/res/drawable/commcare_actionbar_logo.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="20dp"
android:height="20dp"
android:viewportWidth="20"
android:viewportHeight="20">
<path
android:pathData="M10,10m-10,0a10,10 0,1 1,20 0a10,10 0,1 1,-20 0"
android:fillColor="#000000"/>
<path
android:pathData="M17.591,8.821C17.286,7.737 16.584,6.836 15.611,6.287C15.111,6.005 14.57,5.834 14.018,5.775C13.992,5.539 13.95,5.304 13.886,5.071C13.582,3.987 12.879,3.086 11.907,2.537C10.934,1.987 9.809,1.854 8.738,2.162C7.667,2.47 6.777,3.181 6.235,4.166C5.956,4.672 5.788,5.22 5.729,5.779C5.496,5.805 5.264,5.847 5.034,5.912C3.963,6.22 3.073,6.931 2.53,7.916C1.988,8.9 1.856,10.039 2.16,11.124C2.465,12.208 3.167,13.108 4.14,13.658C4.639,13.94 5.181,14.11 5.733,14.17C5.759,14.405 5.801,14.641 5.865,14.873C6.169,15.958 6.872,16.858 7.844,17.408C8.817,17.957 9.942,18.09 11.013,17.782C12.084,17.474 12.974,16.763 13.516,15.778C13.795,15.273 13.963,14.725 14.022,14.165C14.255,14.139 14.487,14.097 14.717,14.032C15.788,13.724 16.678,13.013 17.221,12.029C17.762,11.044 17.893,9.905 17.591,8.821ZM7.498,4.88C7.853,4.238 8.432,3.773 9.132,3.572C9.832,3.371 10.566,3.458 11.201,3.816C11.837,4.175 12.295,4.762 12.494,5.47C12.532,5.606 12.557,5.743 12.574,5.882C12.634,6.365 12.569,6.852 12.378,7.303C12.341,7.391 12.3,7.479 12.252,7.565C12.145,7.76 11.948,8.091 11.711,8.481C10.755,7.868 8.835,6.644 8.203,6.287C7.875,6.102 7.53,5.969 7.176,5.879C7.217,5.532 7.326,5.194 7.498,4.88ZM10.946,9.973C10.946,10.571 10.466,11.057 9.875,11.057C9.284,11.057 8.804,10.571 8.804,9.973C8.804,9.374 9.284,8.889 9.875,8.889C10.466,8.889 10.946,9.374 10.946,9.973ZM6.233,11.666C6.05,11.997 5.919,12.347 5.831,12.705C5.488,12.662 5.154,12.552 4.844,12.377C4.21,12.019 3.75,11.432 3.551,10.723C3.353,10.015 3.438,9.272 3.793,8.629C4.147,7.985 4.727,7.521 5.426,7.32C5.561,7.281 5.696,7.257 5.833,7.239C6.31,7.179 6.792,7.244 7.237,7.437C7.324,7.475 7.411,7.518 7.496,7.566C7.688,7.674 8.015,7.874 8.401,8.114C7.796,9.082 6.587,11.027 6.233,11.666ZM12.251,15.064C11.897,15.706 11.317,16.172 10.617,16.373C9.918,16.574 9.184,16.487 8.548,16.128C7.913,15.77 7.454,15.183 7.256,14.475C7.217,14.339 7.193,14.201 7.176,14.063C7.116,13.58 7.18,13.093 7.37,12.642C7.407,12.553 7.448,12.465 7.497,12.38C7.604,12.185 7.801,11.854 8.038,11.463C8.995,12.076 10.914,13.301 11.547,13.658C11.874,13.843 12.22,13.976 12.574,14.066C12.532,14.412 12.424,14.751 12.251,15.064ZM15.955,11.314C15.601,11.958 15.021,12.422 14.322,12.623C14.188,12.662 14.052,12.686 13.915,12.704C13.438,12.764 12.957,12.699 12.511,12.506C12.424,12.468 12.337,12.426 12.252,12.377C12.06,12.269 11.733,12.069 11.347,11.829C11.953,10.861 13.162,8.918 13.515,8.277C13.698,7.946 13.829,7.596 13.918,7.238C14.26,7.281 14.594,7.391 14.904,7.566C15.538,7.925 15.998,8.511 16.197,9.22C16.395,9.928 16.31,10.673 15.955,11.314Z"
android:fillColor="#ffffff"/>
Comment on lines +9 to +11
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

🛠️ Refactor suggestion

Add accessibility description and ensure theme compatibility

The logo needs accessibility support and theme compatibility improvements:

  1. Add a new string resource for the logo's content description since none exists:
<string name="commcare_logo_description">CommCare Logo</string>
  1. Use theme-aware colors for both paths:
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:contentDescription="@string/commcare_logo_description"
     android:width="20dp"
     android:height="20dp"
     android:viewportWidth="20"
     android:viewportHeight="20">
   <path
       android:pathData="M10,10m-10,0a10,10 0,1 1,20 0a10,10 0,1 1,-20 0"
-      android:fillColor="#000000"/>
+      android:fillColor="?attr/colorPrimary"/>
   <path
       android:pathData="M17.591,8.821C17.286,7.737..."
-      android:fillColor="#ffffff"/>
+      android:fillColor="?attr/colorOnPrimary"/>

The codebase shows usage of theme attributes (e.g., ?attr/colorControlNormal in ic_tts.xml), confirming this is the correct approach for theme-aware colors.

🔗 Analysis chain

Add accessibility description and improve theme compatibility.

The logo needs accessibility support and better theme compatibility:

  1. Add a content description for screen readers
  2. Use theme-aware colors for the foreground
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:contentDescription="@string/commcare_logo"
     android:width="20dp"
     android:height="20dp"
     android:viewportWidth="20"
     android:viewportHeight="20">
   <path
       android:pathData="M10,10m-10,0a10,10 0,1 1,20 0a10,10 0,1 1,-20 0"
       android:fillColor="?attr/colorPrimary"/>
   <path
       android:pathData="M17.591,8.821C17.286,7.737 16.584,6.836 15.611,6.287C15.111,6.005 14.57,5.834 14.018,5.775C13.992,5.539 13.95,5.304 13.886,5.071C13.582,3.987 12.879,3.086 11.907,2.537C10.934,1.987 9.809,1.854 8.738,2.162C7.667,2.47 6.777,3.181 6.235,4.166C5.956,4.672 5.788,5.22 5.729,5.779C5.496,5.805 5.264,5.847 5.034,5.912C3.963,6.22 3.073,6.931 2.53,7.916C1.988,8.9 1.856,10.039 2.16,11.124C2.465,12.208 3.167,13.108 4.14,13.658C4.639,13.94 5.181,14.11 5.733,14.17C5.759,14.405 5.801,14.641 5.865,14.873C6.169,15.958 6.872,16.858 7.844,17.408C8.817,17.957 9.942,18.09 11.013,17.782C12.084,17.474 12.974,16.763 13.516,15.778C13.795,15.273 13.963,14.725 14.022,14.165C14.255,14.139 14.487,14.097 14.717,14.032C15.788,13.724 16.678,13.013 17.221,12.029C17.762,11.044 17.893,9.905 17.591,8.821ZM7.498,4.88C7.853,4.238 8.432,3.773 9.132,3.572C9.832,3.371 10.566,3.458 11.201,3.816C11.837,4.175 12.295,4.762 12.494,5.47C12.532,5.606 12.557,5.743 12.574,5.882C12.634,6.365 12.569,6.852 12.378,7.303C12.341,7.391 12.3,7.479 12.252,7.565C12.145,7.76 11.948,8.091 11.711,8.481C10.755,7.868 8.835,6.644 8.203,6.287C7.875,6.102 7.53,5.969 7.176,5.879C7.217,5.532 7.326,5.194 7.498,4.88ZM10.946,9.973C10.946,10.571 10.466,11.057 9.875,11.057C9.284,11.057 8.804,10.571 8.804,9.973C8.804,9.374 9.284,8.889 9.875,8.889C10.466,8.889 10.946,9.374 10.946,9.973ZM6.233,11.666C6.05,11.997 5.919,12.347 5.831,12.705C5.488,12.662 5.154,12.552 4.844,12.377C4.21,12.019 3.75,11.432 3.551,10.723C3.353,10.015 3.438,9.272 3.793,8.629C4.147,7.985 4.727,7.521 5.426,7.32C5.561,7.281 5.696,7.257 5.833,7.239C6.31,7.179 6.792,7.244 7.237,7.437C7.324,7.475 7.411,7.518 7.496,7.566C7.688,7.674 8.015,7.874 8.401,8.114C7.796,9.082 6.587,11.027 6.233,11.666ZM12.251,15.064C11.897,15.706 11.317,16.172 10.617,16.373C9.918,16.574 9.184,16.487 8.548,16.128C7.913,15.77 7.454,15.183 7.256,14.475C7.217,14.339 7.193,14.201 7.176,14.063C7.116,13.58 7.18,13.093 7.37,12.642C7.407,12.553 7.448,12.465 7.497,12.38C7.604,12.185 7.801,11.854 8.038,11.463C8.995,12.076 10.914,13.301 11.547,13.658C11.874,13.843 12.22,13.976 12.574,14.066C12.532,14.412 12.424,14.751 12.251,15.064ZM15.955,11.314C15.601,11.958 15.021,12.422 14.322,12.623C14.188,12.662 14.052,12.686 13.915,12.704C13.438,12.764 12.957,12.699 12.511,12.506C12.424,12.468 12.337,12.426 12.252,12.377C12.06,12.269 11.733,12.069 11.347,11.829C11.953,10.861 13.162,8.918 13.515,8.277C13.698,7.946 13.829,7.596 13.918,7.238C14.26,7.281 14.594,7.391 14.904,7.566C15.538,7.925 15.998,8.511 16.197,9.22C16.395,9.928 16.31,10.673 15.955,11.314Z"
-      android:fillColor="#ffffff"/>
+      android:fillColor="?attr/colorOnPrimary"/>
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the string resource exists and check for similar logos
# that might need the same updates

# Check if the content description string resource exists
rg "commcare_logo" -t xml

# Find similar vector drawables that might need the same updates
fd -e xml -x grep -l "android:fillColor=\"#000000\"" {} \; -x grep -l "android:fillColor=\"#ffffff\"" {} \;

Length of output: 682


Script:

#!/bin/bash
# Let's check for string resources containing "logo" to find potential content description
rg "logo" -t xml app/res/values/

# Also check for theme-aware color attributes usage in drawables
rg "attr/color" -t xml app/res/drawable/

Length of output: 940

</vector>
7 changes: 7 additions & 0 deletions app/res/drawable/commcare_actionbar_logo_spacing.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list
xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:drawable="@drawable/commcare_actionbar_logo"
android:right="16dp"/>
</layer-list>
12 changes: 6 additions & 6 deletions app/res/drawable/home_incomplete.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="167dp"
android:height="168dp"
android:viewportWidth="167"
android:viewportHeight="168">
android:width="300dp"
android:height="233dp"
android:viewportWidth="300"
android:viewportHeight="233">
<path
android:pathData="M54.73,22.85C58.9,10.98 70.23,2.49 83.53,2.49C96.83,2.49 108.16,10.98 112.33,22.85H124.26C135.5,22.85 144.63,31.98 144.63,43.22V145.04C144.63,156.28 135.5,165.41 124.26,165.41H42.8C31.57,165.41 22.44,156.28 22.44,145.04V43.22C22.44,31.98 31.57,22.85 42.8,22.85H54.73ZM90.73,25.83C88.82,23.92 86.23,22.85 83.53,22.85C80.83,22.85 78.24,23.92 76.33,25.83C74.42,27.74 73.35,30.33 73.35,33.03C73.35,35.73 74.42,38.32 76.33,40.23C78.24,42.14 80.83,43.22 83.53,43.22C86.23,43.22 88.82,42.14 90.73,40.23C92.64,38.32 93.72,35.73 93.72,33.03C93.72,30.33 92.64,27.74 90.73,25.83ZM47.58,71.95C46.15,73.38 45.35,75.32 45.35,77.35C45.35,79.38 46.15,81.32 47.58,82.75C49.02,84.18 50.96,84.99 52.98,84.99C55.01,84.99 56.95,84.18 58.38,82.75C59.82,81.32 60.62,79.38 60.62,77.35C60.62,75.32 59.82,73.38 58.38,71.95C56.95,70.52 55.01,69.71 52.98,69.71C50.96,69.71 49.02,70.52 47.58,71.95ZM119.17,72.26H78.44C75.64,72.26 73.35,74.55 73.35,77.35C73.35,80.15 75.64,82.44 78.44,82.44H119.17C121.97,82.44 124.26,80.15 124.26,77.35C124.26,74.55 121.97,72.26 119.17,72.26ZM128.84,124.26C128.84,135.51 119.72,144.63 108.47,144.63C97.22,144.63 88.1,135.51 88.1,124.26C88.1,113.01 97.22,103.9 108.47,103.9C119.72,103.9 128.84,113.01 128.84,124.26ZM110.38,115.99C110.38,114.93 109.53,114.08 108.47,114.08C107.41,114.08 106.56,114.93 106.56,115.99V124.9C106.56,125.96 107.41,126.81 108.47,126.81C109.53,126.81 110.38,125.96 110.38,124.9V115.99ZM108.47,134.45C109.88,134.45 111.02,133.31 111.02,131.9C111.02,130.49 109.88,129.35 108.47,129.35C107.06,129.35 105.92,130.49 105.92,131.9C105.92,133.31 107.06,134.45 108.47,134.45Z"
android:fillColor="#ffffff"
android:pathData="M122.98,58.67C126.89,47.53 137.52,39.56 150,39.56C162.48,39.56 173.11,47.53 177.02,58.67H188.22C198.76,58.67 207.33,67.24 207.33,77.78V173.33C207.33,183.87 198.76,192.44 188.22,192.44H111.78C101.24,192.44 92.67,183.87 92.67,173.33V77.78C92.67,67.24 101.24,58.67 111.78,58.67H122.98ZM156.76,61.47C154.96,59.68 152.53,58.67 150,58.67C147.47,58.67 145.04,59.68 143.24,61.47C141.45,63.26 140.45,65.69 140.45,68.22C140.45,70.76 141.45,73.19 143.24,74.98C145.04,76.77 147.47,77.78 150,77.78C152.53,77.78 154.96,76.77 156.76,74.98C158.55,73.19 159.55,70.76 159.55,68.22C159.55,65.69 158.55,63.26 156.76,61.47ZM116.27,104.74C114.92,106.08 114.17,107.91 114.17,109.81C114.17,111.71 114.92,113.53 116.27,114.88C117.61,116.22 119.43,116.97 121.33,116.97C123.24,116.97 125.06,116.22 126.4,114.88C127.75,113.53 128.5,111.71 128.5,109.81C128.5,107.91 127.75,106.08 126.4,104.74C125.06,103.4 123.24,102.64 121.33,102.64C119.43,102.64 117.61,103.4 116.27,104.74ZM183.44,105.03H145.22C142.6,105.03 140.45,107.18 140.45,109.81C140.45,112.44 142.6,114.59 145.22,114.59H183.44C186.07,114.59 188.22,112.44 188.22,109.81C188.22,107.18 186.07,105.03 183.44,105.03ZM192.51,153.83C192.51,164.38 183.96,172.94 173.4,172.94C162.85,172.94 154.29,164.38 154.29,153.83C154.29,143.27 162.85,134.72 173.4,134.72C183.96,134.72 192.51,143.27 192.51,153.83ZM175.19,146.07C175.19,145.07 174.39,144.27 173.4,144.27C172.41,144.27 171.61,145.07 171.61,146.07V154.43C171.61,155.42 172.41,156.22 173.4,156.22C174.39,156.22 175.19,155.42 175.19,154.43V146.07ZM173.4,163.38C174.72,163.38 175.79,162.32 175.79,161C175.79,159.68 174.72,158.61 173.4,158.61C172.08,158.61 171.01,159.68 171.01,161C171.01,162.32 172.08,163.38 173.4,163.38Z"
android:fillColor="@color/square_button_icon_color"
android:fillType="evenOdd"/>
</vector>
Loading
Loading