diff --git a/app/res/font/roboto_bold.ttf b/app/res/font/roboto_bold.ttf
new file mode 100644
index 0000000000..e64db796d1
Binary files /dev/null and b/app/res/font/roboto_bold.ttf differ
diff --git a/app/res/font/roboto_italic.ttf b/app/res/font/roboto_italic.ttf
new file mode 100644
index 0000000000..65498ee374
Binary files /dev/null and b/app/res/font/roboto_italic.ttf differ
diff --git a/app/res/font/roboto_medium.ttf b/app/res/font/roboto_medium.ttf
new file mode 100644
index 0000000000..0707e15c3a
Binary files /dev/null and b/app/res/font/roboto_medium.ttf differ
diff --git a/app/res/font/roboto_regular.ttf b/app/res/font/roboto_regular.ttf
new file mode 100644
index 0000000000..2d116d9205
Binary files /dev/null and b/app/res/font/roboto_regular.ttf differ
diff --git a/app/res/layout-land/activity_crash_warning.xml b/app/res/layout-land/activity_crash_warning.xml
index 92bde2be99..e49735e8ab 100644
--- a/app/res/layout-land/activity_crash_warning.xml
+++ b/app/res/layout-land/activity_crash_warning.xml
@@ -93,12 +93,12 @@
-
+ app:roundButtonBackgroundColor="@color/primary_button_background"
+ app:roundButtonTextColor="@color/white"/>
diff --git a/app/res/layout/activity_crash_warning.xml b/app/res/layout/activity_crash_warning.xml
index 31cf7fda08..e76725fe67 100644
--- a/app/res/layout/activity_crash_warning.xml
+++ b/app/res/layout/activity_crash_warning.xml
@@ -108,12 +108,12 @@
-
+ app:roundButtonBackgroundColor="@color/primary_button_background"
+ app:roundButtonTextColor="@color/white"/>
diff --git a/app/res/layout/activity_mapbox_location_picker.xml b/app/res/layout/activity_mapbox_location_picker.xml
index 62f4d970d6..0427f58e45 100644
--- a/app/res/layout/activity_mapbox_location_picker.xml
+++ b/app/res/layout/activity_mapbox_location_picker.xml
@@ -3,6 +3,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
tools:context="org.commcare.gis.MapboxLocationPickerActivity">
-
+ android:text="@string/confirm_location"
+ app:roundButtonBackgroundColor="@color/button_primary"
+ app:roundButtonTextColor="@color/white"/>
-
+ android:text="@string/cancel"
+ app:roundButtonBackgroundColor="@color/button_primary"
+ app:roundButtonTextColor="@color/white"/>
diff --git a/app/res/layout/activity_report_problem.xml b/app/res/layout/activity_report_problem.xml
index 35648f2e81..0b51b3619a 100644
--- a/app/res/layout/activity_report_problem.xml
+++ b/app/res/layout/activity_report_problem.xml
@@ -46,13 +46,15 @@
android:lines="5"
android:textColor="@color/black"/>
-
+ android:text="Submit Report"
+ app:roundButtonBackgroundColor="@color/primary_button_background"
+ app:roundButtonTextColor="@color/white"/>
diff --git a/app/res/layout/activity_target_mismatch_error.xml b/app/res/layout/activity_target_mismatch_error.xml
index 92e6e71e06..3924a6ae13 100644
--- a/app/res/layout/activity_target_mismatch_error.xml
+++ b/app/res/layout/activity_target_mismatch_error.xml
@@ -1,12 +1,13 @@
+ xmlns:tools="http://schemas.android.com/tools"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ android:gravity="center_horizontal"
+ android:layout_height="match_parent"
+ android:layout_margin="@dimen/standard_spacer"
+ android:layout_width="match_parent"
+ android:orientation="vertical"
+ tools:viewBindingIgnore="true">
-
+ tools:text="Install CommCare LTS"
+ app:roundButtonBackgroundColor="@color/cc_brand_color"
+ app:roundButtonTextColor="@color/cc_neutral_bg"/>
\ No newline at end of file
diff --git a/app/res/layout/app_manager.xml b/app/res/layout/app_manager.xml
index a0af3a65b6..ba356f2291 100644
--- a/app/res/layout/app_manager.xml
+++ b/app/res/layout/app_manager.xml
@@ -35,8 +35,7 @@
android:textColor="@color/darkest_grey"
android:layout_centerHorizontal="true"
android:gravity="center"/>
-
-
+ android:text="@string/install_app"
+ app:roundButtonTextSize="10sp"
+ app:roundButtonBackgroundColor="@color/primary_button_background"
+ app:roundButtonTextColor="@color/white"/>
+
-
+ android:visibility="gone"
+ app:roundButtonBackgroundColor="@color/primary_button_background"
+ app:roundButtonTextColor="@color/white" />
-
+ android:visibility="gone"
+ app:roundButtonBackgroundColor="@color/primary_button_background"
+ app:roundButtonTextColor="@color/white"/>
-
\ No newline at end of file
+ tools:viewBindingIgnore="true"
+ app:roundButtonBorderVisible="true"
+ app:roundButtonBorderColor="@color/button_primary"
+ app:roundButtonTextColor="@color/blue"/>
\ No newline at end of file
diff --git a/app/res/layout/choice_dialog_three_panel.xml b/app/res/layout/choice_dialog_three_panel.xml
index a5e7ba852d..9f74b86fa9 100644
--- a/app/res/layout/choice_dialog_three_panel.xml
+++ b/app/res/layout/choice_dialog_three_panel.xml
@@ -1,10 +1,11 @@
+ xmlns:tools="http://schemas.android.com/tools"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ android:orientation="vertical"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ tools:viewBindingIgnore="true">
-
+ android:layout_marginEnd="@dimen/standard_spacer"
+ app:roundButtonBorderVisible="true"
+ app:roundButtonBorderColor="@color/cc_brand_color"
+ app:roundButtonTextColor="@color/cc_brand_color"
+ app:roundButtonBackgroundColor="@color/transparent"/>
-
+ android:layout_marginEnd="@dimen/standard_spacer"
+ app:roundButtonBorderVisible="true"
+ app:roundButtonBorderColor="@color/cc_brand_color"
+ app:roundButtonTextColor="@color/cc_brand_color"
+ app:roundButtonBackgroundColor="@color/transparent"/>
-
+ app:roundButtonBorderVisible="true"
+ app:roundButtonBorderColor="@color/cc_brand_color"
+ app:roundButtonTextColor="@color/cc_brand_color"
+ android:layout_marginStart="@dimen/standard_spacer"
+ app:roundButtonBackgroundColor="@color/transparent"/>
diff --git a/app/res/layout/choice_dialog_view.xml b/app/res/layout/choice_dialog_view.xml
index d4020842d5..8478054833 100644
--- a/app/res/layout/choice_dialog_view.xml
+++ b/app/res/layout/choice_dialog_view.xml
@@ -25,19 +25,19 @@
android:layout_marginEnd="@dimen/standard_spacer_large">
-
+ android:visibility="visible"
+ android:layout_marginEnd="@dimen/standard_spacer"
+ app:roundButtonLeftPadding="8dp"
+ app:roundButtonRightPadding="8dp"
+ app:roundButtonBackgroundColor="@color/transparent"
+ app:roundButtonTextColor="@color/dialog_button_color"/>
-
+ android:layout_marginStart="11dp"
+ app:roundButtonIconLeftAlign="true"
+ app:roundButtonIcon="@drawable/sym_action_call"
+ app:roundButtonBackgroundColor="@color/primary_button_background"
+ app:roundButtonTextColor="@color/white"/>
-
+ android:text="Callout"
+ app:roundButtonBackgroundColor="@color/primary_button_background"
+ app:roundButtonTextColor="@color/white"/>
-
+ android:drawableStart="@drawable/sym_action_lookup"
+ app:roundButtonBackgroundColor="@color/primary_button_background"
+ app:roundButtonTextColor="@color/white"
+ />
-
-
+ android:text="Run Connection Test"
+ app:roundButtonBackgroundColor="@color/primary_button_background"
+ app:roundButtonTextColor="@color/white"/>
@@ -58,20 +58,22 @@
android:text="Output message."
android:visibility="invisible"/>
-
-
-
+
+ android:visibility="visible"
+ app:roundButtonBackgroundColor="@color/primary_button_background"
+ app:roundButtonTextColor="@color/white"/>
\ No newline at end of file
diff --git a/app/res/layout/custom_alert_dialog.xml b/app/res/layout/custom_alert_dialog.xml
index e24d9d96c5..e27f1d02f0 100755
--- a/app/res/layout/custom_alert_dialog.xml
+++ b/app/res/layout/custom_alert_dialog.xml
@@ -1,7 +1,7 @@
-
-
+ android:layout_marginEnd="@dimen/standard_spacer"
+ app:roundButtonBorderColor="@color/dialog_button_color"
+ app:roundButtonBorderVisible="true"
+ app:roundButtonBorderWidth="2dp"
+ app:roundButtonBackgroundColor="@color/transparent"
+ app:roundButtonTextColor="@color/dialog_button_color">
+
-
+ app:roundButtonBorderColor="@color/dialog_button_color"
+ app:roundButtonBorderVisible="true"
+ app:roundButtonBorderWidth="2dp"
+ android:layout_toStartOf="@id/positive_button"
+ app:roundButtonBackgroundColor="@color/transparent"
+ app:roundButtonTextColor="@color/dialog_button_color">
+
-
+ app:roundButtonBorderColor="@color/dialog_button_color"
+ app:roundButtonBorderVisible="true"
+ app:roundButtonBorderWidth="2dp"
+ android:layout_toStartOf="@id/neutral_button"
+ app:roundButtonBackgroundColor="@color/transparent"
+ app:roundButtonTextColor="@color/dialog_button_color">
+
\ No newline at end of file
diff --git a/app/res/layout/dots_detail.xml b/app/res/layout/dots_detail.xml
index f29952483e..623b17f3b9 100644
--- a/app/res/layout/dots_detail.xml
+++ b/app/res/layout/dots_detail.xml
@@ -1,9 +1,9 @@
-
-
+ android:layout_weight="0.5"
+ app:roundButtonBackgroundColor="@color/primary_button_background"
+ app:roundButtonTextColor="@color/white"/>
-
+ android:layout_weight="0.5"
+ app:roundButtonBackgroundColor="@color/primary_button_background"
+ app:roundButtonTextColor="@color/white"/>
diff --git a/app/res/layout/dotsdoses.xml b/app/res/layout/dotsdoses.xml
index c11b044085..9aa4ff4d76 100644
--- a/app/res/layout/dotsdoses.xml
+++ b/app/res/layout/dotsdoses.xml
@@ -61,10 +61,12 @@
android:id="@+id/dots_dose_four">
-
+ android:layout_alignParentBottom="true"
+ app:roundButtonBackgroundColor="@color/primary_button_background"
+ app:roundButtonTextColor="@color/white"/>
diff --git a/app/res/layout/draw_layout.xml b/app/res/layout/draw_layout.xml
index 203a239874..2230264b9d 100644
--- a/app/res/layout/draw_layout.xml
+++ b/app/res/layout/draw_layout.xml
@@ -1,6 +1,7 @@
-
+ android:layout_height="wrap_content"
+ app:roundButtonBackgroundColor="@color/button_primary"
+ app:roundButtonTextColor="@color/white"/>
-
+ android:layout_height="wrap_content"
+ app:roundButtonBackgroundColor="@color/button_primary"
+ app:roundButtonTextColor="@color/white"/>
-
+ android:layout_marginLeft="8dp"
+ android:layout_height="wrap_content"
+ app:roundButtonBackgroundColor="@color/button_primary"
+ app:roundButtonTextColor="@color/white"/>
diff --git a/app/res/layout/entity_detail.xml b/app/res/layout/entity_detail.xml
index 38458c1a22..e0c6cae765 100644
--- a/app/res/layout/entity_detail.xml
+++ b/app/res/layout/entity_detail.xml
@@ -1,18 +1,24 @@
-
-
+ android:layout_below="@+id/universal_frame_tile"
+ app:roundButtonIcon="@drawable/icon_chevron_right_attnpos"
+ app:roundButtonBackgroundColor="@color/cc_attention_positive_bg"
+ app:roundButtonIconTintColor="@color/cc_attention_positive_text"
+ app:roundButtonTextColor="@color/cc_attention_positive_text"/>
+
-
+ android:visibility="gone"
+ app:roundButtonBackgroundColor="@color/primary_button_background"
+ app:roundButtonTextColor="@color/white"/>
-
+ android:visibility="gone"
+ app:roundButtonBackgroundColor="@color/primary_button_background"
+ app:roundButtonTextColor="@color/white"/>
-
+ android:visibility="gone"
+ app:roundButtonBackgroundColor="@color/primary_button_background"
+ app:roundButtonTextColor="@color/white"/>
\ No newline at end of file
diff --git a/app/res/layout/fragment_setup_enter_url.xml b/app/res/layout/fragment_setup_enter_url.xml
index 969d497871..7c59f61aba 100644
--- a/app/res/layout/fragment_setup_enter_url.xml
+++ b/app/res/layout/fragment_setup_enter_url.xml
@@ -1,6 +1,7 @@
-
-
+ app:roundButtonTextSize="10sp"
+ app:roundButtonBackgroundColor="@color/primary_button_background"
+ app:roundButtonTextColor="@color/white"/>
+
diff --git a/app/res/layout/geo_progress.xml b/app/res/layout/geo_progress.xml
index 2fe494c747..70bd159ad9 100644
--- a/app/res/layout/geo_progress.xml
+++ b/app/res/layout/geo_progress.xml
@@ -3,6 +3,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
tools:viewBindingIgnore="true">
@@ -51,20 +52,24 @@
android:orientation="horizontal"
android:layout_weight="1">
-
+ android:layout_margin="@dimen/standard_spacer"
+ app:roundButtonBackgroundColor="@color/primary_button_background"
+ app:roundButtonTextColor="@color/white"/>
-
+ android:layout_margin="@dimen/standard_spacer"
+ app:roundButtonBackgroundColor="@color/primary_button_background"
+ app:roundButtonTextColor="@color/white"/>
\ No newline at end of file
diff --git a/app/res/layout/geopoint_layout.xml b/app/res/layout/geopoint_layout.xml
index b763e71d20..9d2dc276af 100644
--- a/app/res/layout/geopoint_layout.xml
+++ b/app/res/layout/geopoint_layout.xml
@@ -33,27 +33,33 @@
android:paddingBottom="2dip"
android:paddingTop="2dip">
-
+ android:visibility="gone"
+ app:roundButtonBackgroundColor="@color/primary_button_background"
+ app:roundButtonTextColor="@color/white"/>
-
+ android:text="@string/accept_location"
+ app:roundButtonBackgroundColor="@color/primary_button_background"
+ app:roundButtonTextColor="@color/white"/>
-
+ android:text="@string/cancel"
+ app:roundButtonBackgroundColor="@color/primary_button_background"
+ app:roundButtonTextColor="@color/white"/>
-
-
+ android:layout_weight="1"
+ android:textSize="12sp"
+ app:roundButtonBackgroundColor="@color/cc_core_bg"
+ app:roundButtonTextColor="@color/cc_brand_color"/>
-
+ android:textSize="12sp"
+ app:roundButtonBackgroundColor="@color/cc_core_bg"
+ app:roundButtonTextColor="@color/cc_brand_color"/>
-
+ android:layout_weight="1"
+ app:roundButtonBackgroundColor="@color/cc_core_bg"
+ app:roundButtonTextColor="@color/cc_brand_color"/>
-
-
+ app:roundButtonBackgroundColor="@color/cc_brand_color"
+ app:roundButtonTextColor="@color/cc_neutral_bg"/>
diff --git a/app/res/layout/install_permission_requester.xml b/app/res/layout/install_permission_requester.xml
index 138276605d..d3a3da4e1a 100644
--- a/app/res/layout/install_permission_requester.xml
+++ b/app/res/layout/install_permission_requester.xml
@@ -1,13 +1,13 @@
-
+ tools:viewBindingIgnore="true"
+ xmlns:app="http://schemas.android.com/apk/res-auto">
-
+ app:roundButtonBackgroundColor="@color/primary_button_background"
+ app:roundButtonTextColor="@color/cc_neutral_bg"/>
diff --git a/app/res/layout/layout_note_msg.xml b/app/res/layout/layout_note_msg.xml
index 7ba15d9060..2f0fcf31aa 100644
--- a/app/res/layout/layout_note_msg.xml
+++ b/app/res/layout/layout_note_msg.xml
@@ -3,6 +3,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_height="wrap_content"
android:layout_width="match_parent"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:padding="@dimen/activity_vertical_margin"
tools:viewBindingIgnore="true">
@@ -42,11 +43,13 @@
android:text="What to do about it"
android:textAppearance="?android:attr/textAppearanceMedium"/>
-
+ android:visibility="visible"
+ app:roundButtonBackgroundColor="@color/primary_button_background"
+ app:roundButtonTextColor="@color/white"/>
\ No newline at end of file
diff --git a/app/res/layout/list_gregorian_widget.xml b/app/res/layout/list_gregorian_widget.xml
index 4aa5816ebf..1317c927c2 100644
--- a/app/res/layout/list_gregorian_widget.xml
+++ b/app/res/layout/list_gregorian_widget.xml
@@ -2,6 +2,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
android:gravity="center"
android:orientation="vertical"
tools:viewBindingIgnore="true">
@@ -44,16 +45,16 @@
android:layout_marginEnd="10dp"
android:layout_marginStart="20dp">
-
+ android:elevation="@dimen/button_elevation"
+ app:roundButtonTextColor="@color/white"
+ app:roundButtonTextSize="12sp"
+ app:roundButtonBackgroundColor="@color/bright_blue_grad_start"/>
-
+ android:elevation="@dimen/button_elevation"
+ app:roundButtonTextColor="@color/white"
+ app:roundButtonTextSize="14sp"
+ app:roundButtonBackgroundColor="@color/dark_blue"/>
@@ -89,18 +89,18 @@
android:layout_marginRight="10dp"
android:layout_marginEnd="10dp">
-
+ android:layout_marginStart="5dp"
+ app:roundButtonTextColor="@color/white"
+ app:roundButtonTextSize="12sp"
+ app:roundButtonBackgroundColor="@color/bright_blue_grad_start"/>
-
+ android:layout_marginStart="5dp"
+ app:roundButtonTextColor="@color/white"
+ app:roundButtonTextSize="16sp"
+ app:roundButtonBackgroundColor="@color/dark_blue"/>
@@ -131,18 +130,18 @@
android:layout_marginRight="20dp"
android:layout_marginEnd="20dp">
-
+ android:layout_marginStart="5dp"
+ app:roundButtonTextColor="@color/white"
+ app:roundButtonTextSize="12sp"
+ app:roundButtonBackgroundColor="@color/bright_blue_grad_start"/>
-
+ android:layout_marginStart="5dp"
+ app:roundButtonTextColor="@color/white"
+ app:roundButtonTextSize="16sp"
+ app:roundButtonBackgroundColor="@color/dark_blue"/>
diff --git a/app/res/layout/missing_multimedia_layout.xml b/app/res/layout/missing_multimedia_layout.xml
index dbb39efe03..2d869b9650 100644
--- a/app/res/layout/missing_multimedia_layout.xml
+++ b/app/res/layout/missing_multimedia_layout.xml
@@ -21,23 +21,27 @@
android:layout_marginEnd="20px">
-
+ android:visibility="gone"
+ app:roundButtonBackgroundColor="@color/primary_button_background"
+ app:roundButtonTextColor="@color/white"/>
-
+ android:layout_alignParentBottom="true"
+ app:roundButtonBackgroundColor="@color/primary_button_background"
+ app:roundButtonTextColor="@color/white"/>
@@ -14,14 +16,16 @@
android:layout_centerInParent="true"
android:gravity="center"/>
-
+ android:layout_centerHorizontal="true"
+ app:roundButtonBackgroundColor="@color/primary_button_background"
+ app:roundButtonTextColor="@color/white"/>
\ No newline at end of file
diff --git a/app/res/layout/pin_screen_buttons.xml b/app/res/layout/pin_screen_buttons.xml
index 9df7a359fd..9a045aa041 100644
--- a/app/res/layout/pin_screen_buttons.xml
+++ b/app/res/layout/pin_screen_buttons.xml
@@ -3,24 +3,29 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="horizontal"
android:layout_alignParentBottom="true"
android:weightSum="2"
tools:viewBindingIgnore="true">
-
+ app:roundButtonTextSize="@dimen/font_size_dp_medium"
+ android:layout_weight="1"
+ app:roundButtonBackgroundColor="@color/primary_button_background"
+ app:roundButtonTextColor="@color/white"/>
-
+ android:layout_weight="1"
+ app:roundButtonBackgroundColor="@color/primary_button_background"
+ app:roundButtonTextColor="@color/white"/>
\ No newline at end of file
diff --git a/app/res/layout/privilege_claiming_view.xml b/app/res/layout/privilege_claiming_view.xml
index 32c46f041c..353655f58d 100644
--- a/app/res/layout/privilege_claiming_view.xml
+++ b/app/res/layout/privilege_claiming_view.xml
@@ -3,6 +3,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:gravity="center"
tools:viewBindingIgnore="true">
@@ -50,11 +51,13 @@
android:layout_marginStart="@dimen/standard_spacer_double"
android:layout_marginEnd="@dimen/standard_spacer_double" />
-
+ app:roundButtonTextSize="@dimen/font_size_small"
+ android:text="@string/claim_privilege_button_text"
+ app:roundButtonBackgroundColor="@color/primary_button_background"
+ app:roundButtonTextColor="@color/white"/>
\ No newline at end of file
diff --git a/app/res/layout/progress_dialog_cancel_button.xml b/app/res/layout/progress_dialog_cancel_button.xml
index 4284e7a09c..8d7bafc369 100644
--- a/app/res/layout/progress_dialog_cancel_button.xml
+++ b/app/res/layout/progress_dialog_cancel_button.xml
@@ -1,6 +1,7 @@
-
\ No newline at end of file
+ tools:viewBindingIgnore="true" />
\ No newline at end of file
diff --git a/app/res/layout/prompt_view.xml b/app/res/layout/prompt_view.xml
index 614a771256..aebe0de6ee 100644
--- a/app/res/layout/prompt_view.xml
+++ b/app/res/layout/prompt_view.xml
@@ -3,6 +3,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
tools:viewBindingIgnore="true">
-
-
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:padding="16dp"
+ app:roundButtonTextColor="@color/cc_neutral_bg"
+ app:roundButtonBackgroundColor="@color/solid_green"
+ />
-
-
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:padding="16dp"
+ app:roundButtonTextColor="@color/cc_neutral_bg"
+ app:roundButtonBackgroundColor="@color/cc_brand_color"
+ />
-
+ android:id = "@+id/startrecording"
+ app:roundButtonBackgroundColor="@color/primary_button_background"
+ app:roundButtonTextColor="@color/white"/>
-
+ android:id="@+id/stoprecording"
+ app:roundButtonBackgroundColor="@color/primary_button_background"
+ app:roundButtonTextColor="@color/white"/>
\ No newline at end of file
diff --git a/app/res/layout/recording_fragment.xml b/app/res/layout/recording_fragment.xml
index b43b1e2fff..972e52504e 100644
--- a/app/res/layout/recording_fragment.xml
+++ b/app/res/layout/recording_fragment.xml
@@ -3,6 +3,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_gravity="center_horizontal"
android:gravity="center_horizontal"
android:orientation="vertical"
@@ -68,7 +69,7 @@
android:layout_height="wrap_content"
android:visibility="invisible" />
-
+ android:visibility="invisible"
+ app:roundButtonBackgroundColor="@color/primary_button_background"
+ app:roundButtonTextColor="@color/white"/>
diff --git a/app/res/layout/screen_form_dump.xml b/app/res/layout/screen_form_dump.xml
index 426e8deac2..a8ecb61579 100644
--- a/app/res/layout/screen_form_dump.xml
+++ b/app/res/layout/screen_form_dump.xml
@@ -43,24 +43,28 @@
android:layout_centerHorizontal="true"
android:layout_margin="10dp"
android:gravity="center"
- android:layout_below="@+id/screen_multimedia_inflater_filefetch"
android:text="From here you can dump your forms to an SD card or submit the forms on your SD card"/>
-
+ android:text="Dump Forms"
-
+
+
+ android:text="Submit Forms"
+ app:roundButtonBackgroundColor="@color/primary_button_background"
+ app:roundButtonTextColor="@color/white"/>
diff --git a/app/res/layout/screen_form_entry.xml b/app/res/layout/screen_form_entry.xml
index 654f1bcff1..6495f02a9e 100644
--- a/app/res/layout/screen_form_entry.xml
+++ b/app/res/layout/screen_form_entry.xml
@@ -82,28 +82,28 @@
android:paddingEnd="@dimen/new_progressbar_button_padding" />
+ android:progressDrawable="@drawable/progressbar_modern" />
-
+ android:layout_margin="16dp"
+ app:roundButtonIconTintColor="@color/cc_light_cool_accent_text"
+ app:roundButtonTextColor="@color/cc_light_cool_accent_text"
+ app:roundButtonIcon="@drawable/icon_chevron_right_brand"
+ app:roundButtonBackgroundColor="@color/cc_light_cool_accent_bg"/>
@@ -165,15 +166,17 @@
android:layout_margin="@dimen/standard_spacer"
android:textSize="@dimen/font_size_medium"
android:visibility="gone" />
-
-
+ android:paddingTop="@dimen/content_start"
+ app:roundButtonBackgroundColor="@color/primary_button_background"
+ app:roundButtonTextColor="@color/white"/>
+
-
+ android:paddingTop="@dimen/content_start"
+ app:roundButtonBackgroundColor="@color/primary_button_background"
+ app:roundButtonTextColor="@color/white" />
\ No newline at end of file
diff --git a/app/res/layout/screen_permission_request.xml b/app/res/layout/screen_permission_request.xml
index 6cc1f74851..cf03940544 100644
--- a/app/res/layout/screen_permission_request.xml
+++ b/app/res/layout/screen_permission_request.xml
@@ -1,6 +1,7 @@
-
+ android:text="Grant Access"
+ app:roundButtonBackgroundColor="@color/primary_button_background"
+ app:roundButtonTextColor="@color/white"/>
-
+ android:text="Deny Access"
+ app:roundButtonBackgroundColor="@color/primary_button_background"
+ app:roundButtonTextColor="@color/white"/>
diff --git a/app/res/layout/screen_recovery.xml b/app/res/layout/screen_recovery.xml
index 62903b8099..9da0607f0c 100644
--- a/app/res/layout/screen_recovery.xml
+++ b/app/res/layout/screen_recovery.xml
@@ -1,14 +1,15 @@
-
+ android:visibility="gone"
+ app:roundButtonBackgroundColor="@color/primary_button_background"
+ app:roundButtonTextColor="@color/white"/>
-
+ android:visibility="gone"
+ app:roundButtonBackgroundColor="@color/primary_button_background"
+ app:roundButtonTextColor="@color/white"/>
diff --git a/app/res/layout/scrolling_calendar_widget.xml b/app/res/layout/scrolling_calendar_widget.xml
index 4572612807..03770b39c1 100644
--- a/app/res/layout/scrolling_calendar_widget.xml
+++ b/app/res/layout/scrolling_calendar_widget.xml
@@ -3,6 +3,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:gravity="center_horizontal"
android:paddingLeft="20dp"
@@ -134,7 +135,7 @@
android:layout_centerVertical="true"
android:layout_alignParentStart="true" />
-
+ android:layout_marginBottom="@dimen/standard_spacer"
+ app:roundButtonBackgroundColor="@color/primary_button_background"
+ app:roundButtonTextColor="@color/white"/>
-
+ android:text="@string/uninstall_app"
+ app:roundButtonBackgroundColor="@color/primary_button_background"
+ app:roundButtonTextColor="@color/white" />
-
+ android:text="@string/archive_app"
+ app:roundButtonBackgroundColor="@color/primary_button_background"
+ app:roundButtonTextColor="@color/white" />
-
+ android:text="@string/update_app"
+ app:roundButtonBackgroundColor="@color/primary_button_background"
+ app:roundButtonTextColor="@color/white"/>
-
+ android:text="@string/verify_resources"
+ app:roundButtonBackgroundColor="@color/primary_button_background"
+ app:roundButtonTextColor="@color/white" />
diff --git a/app/res/layout/single_dialog_choice_view.xml b/app/res/layout/single_dialog_choice_view.xml
index 0c9564f332..2763e3368f 100644
--- a/app/res/layout/single_dialog_choice_view.xml
+++ b/app/res/layout/single_dialog_choice_view.xml
@@ -1,6 +1,7 @@
-
\ No newline at end of file
+ tools:viewBindingIgnore="true"
+ app:roundButtonTextColor="@color/cc_neutral_text" />
\ No newline at end of file
diff --git a/app/res/layout/user_get_available_apps.xml b/app/res/layout/user_get_available_apps.xml
index 47ca892f31..45bb145635 100644
--- a/app/res/layout/user_get_available_apps.xml
+++ b/app/res/layout/user_get_available_apps.xml
@@ -1,6 +1,7 @@
-
+ android:layout_marginTop="@dimen/standard_spacer_double"
+ app:roundButtonBackgroundColor="@color/primary_button_background"
+ app:roundButtonTextColor="@color/white"/>
-
@@ -52,5 +51,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/org/commcare/activities/components/RoundedButton.java b/app/src/org/commcare/activities/components/RoundedButton.java
new file mode 100644
index 0000000000..fdfcfc5760
--- /dev/null
+++ b/app/src/org/commcare/activities/components/RoundedButton.java
@@ -0,0 +1,189 @@
+package org.commcare.activities.components;
+import android.content.Context;
+import android.content.res.TypedArray;
+import android.graphics.Color;
+import android.graphics.Typeface;
+import android.graphics.drawable.Drawable;
+import android.util.AttributeSet;
+import android.view.ViewGroup;
+
+import androidx.annotation.DrawableRes;
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+import androidx.constraintlayout.widget.ConstraintLayout;
+import androidx.core.content.ContextCompat;
+import androidx.core.content.res.ResourcesCompat;
+
+import org.commcare.dalvik.R;
+
+public class RoundedButton extends androidx.appcompat.widget.AppCompatButton {
+
+ private static final int DEFAULT_BUTTON_HEIGHT = 100;
+ private static final int DEFAULT_RADIUS = 30;
+ private static final int DEFAULT_BACKGROUND_COLOR = Color.parseColor("#004EBC");
+ private static final int DEFAULT_TEXT_COLOR = Color.WHITE;
+ private static final int DEFAULT_ICON_TINT_COLOR = Color.WHITE;
+ private static final int DEFAULT_PADDING = 24;
+ private static final boolean DEFAULT_ICON_LEFT_ALIGN = false;
+ private static final int DEFAULT_FONT_RES_ID = R.font.roboto_regular;
+ private static final boolean DEFAULT_BORDER_VISIBLE = false;
+ private static final int DEFAULT_BORDER_COLOR = Color.parseColor("#004EBC");
+ private static final int DEFAULT_BORDER_RADIUS = DEFAULT_RADIUS;
+ private static final int DEFAULT_BORDER_WIDTH = 1;
+ private static final int DEFAULT_TEXT_SIZE = 7;
+ private static final int DEFAULT_DISABLED_BACKGROUND_COLOR = Color.LTGRAY;
+ private int enabledBackgroundColor;
+ private int disabledBackgroundColor;
+
+ public RoundedButton(@NonNull Context context) {
+ super(context);
+ init(context, null);
+ }
+
+ public RoundedButton(@NonNull Context context, @Nullable AttributeSet attrs) {
+ super(context, attrs);
+ init(context, attrs);
+ }
+
+ public RoundedButton(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
+ super(context, attrs, defStyleAttr);
+ init(context, attrs);
+ }
+
+ private void init(Context context, @Nullable AttributeSet attrs) {
+ if (attrs != null) {
+ TypedArray a = context.getTheme().obtainStyledAttributes(
+ attrs,
+ R.styleable.RoundedButton,
+ 0, 0);
+
+ try {
+ int buttonHeight = a.getDimensionPixelSize(R.styleable.RoundedButton_roundButtonHeight, DEFAULT_BUTTON_HEIGHT);
+ int radius = a.getDimensionPixelSize(R.styleable.RoundedButton_roundButtonRadius, dpToPx(DEFAULT_RADIUS));
+ int backgroundColor = a.getColor(R.styleable.RoundedButton_roundButtonBackgroundColor, DEFAULT_BACKGROUND_COLOR);
+ int textColor = a.getColor(R.styleable.RoundedButton_roundButtonTextColor, DEFAULT_TEXT_COLOR);
+ int iconTintColor = a.getColor(R.styleable.RoundedButton_roundButtonIconTintColor, DEFAULT_ICON_TINT_COLOR);
+ int leftPadding = a.getDimensionPixelSize(R.styleable.RoundedButton_roundButtonLeftPadding, dpToPx(DEFAULT_PADDING));
+ int rightPadding = a.getDimensionPixelSize(R.styleable.RoundedButton_roundButtonRightPadding, dpToPx(DEFAULT_PADDING));
+ boolean iconLeftAlign = a.getBoolean(R.styleable.RoundedButton_roundButtonIconLeftAlign, DEFAULT_ICON_LEFT_ALIGN);
+ int fontFamily = a.getResourceId(R.styleable.RoundedButton_roundButtonFontFamily, DEFAULT_FONT_RES_ID);
+ boolean borderVisible = a.getBoolean(R.styleable.RoundedButton_roundButtonBorderVisible, DEFAULT_BORDER_VISIBLE);
+ int borderColor = a.getColor(R.styleable.RoundedButton_roundButtonBorderColor, DEFAULT_BORDER_COLOR);
+ int borderRadius = a.getDimensionPixelSize(R.styleable.RoundedButton_roundButtonBorderRadius, dpToPx(DEFAULT_BORDER_RADIUS));
+ int borderWidth = a.getDimensionPixelSize(R.styleable.RoundedButton_roundButtonBorderWidth, dpToPx(DEFAULT_BORDER_WIDTH));
+ float textSize = a.getDimension(R.styleable.RoundedButton_roundButtonTextSize, spToPx(DEFAULT_TEXT_SIZE));
+ Drawable icon = a.getDrawable(R.styleable.RoundedButton_roundButtonIcon);
+
+ int iconPadding = a.getDimensionPixelSize(R.styleable.RoundedButton_roundButtonIconPadding, dpToPx(16));
+ setCompoundDrawablePadding(iconPadding);
+
+ enabledBackgroundColor = backgroundColor;
+ disabledBackgroundColor = DEFAULT_DISABLED_BACKGROUND_COLOR;
+
+ setBackgroundDrawable(radius, backgroundColor, borderVisible, borderColor, borderRadius,borderWidth);
+ setTextColor(textColor);
+ setButtonHeight(buttonHeight);
+ setPadding(leftPadding, 0, rightPadding, 0);
+ setFontFamily(fontFamily);
+ setTextSize(textSize);
+ if (icon != null) {
+ setIcon(icon, iconTintColor, iconLeftAlign);
+ }
+
+ } finally {
+ a.recycle();
+ }
+ } else {
+ enabledBackgroundColor = DEFAULT_BACKGROUND_COLOR;
+ disabledBackgroundColor = DEFAULT_DISABLED_BACKGROUND_COLOR;
+ setBackgroundDrawable(dpToPx(DEFAULT_RADIUS), DEFAULT_BACKGROUND_COLOR, DEFAULT_BORDER_VISIBLE, DEFAULT_BORDER_COLOR, dpToPx(DEFAULT_BORDER_RADIUS), dpToPx(DEFAULT_BORDER_WIDTH));
+ setTextColor(DEFAULT_TEXT_COLOR);
+ setPadding(dpToPx(DEFAULT_PADDING), 0, dpToPx(DEFAULT_PADDING), 0);
+ setTextSize(spToPx(DEFAULT_TEXT_SIZE));
+ }
+
+ setAllCaps(false);
+
+ }
+
+ private float spToPx(float sp) {
+ float scaledDensity = getContext().getResources().getDisplayMetrics().scaledDensity;
+ return sp * scaledDensity;
+ }
+
+ public void setTextSize(float textSizeInSp) {
+ super.setTextSize(textSizeInSp);
+ }
+
+ private void setBackgroundDrawable(int radius, int backgroundColor, boolean borderVisible, int borderColor, int borderRadius,int borderWidth) {
+ RoundedButtonDrawable drawable = new RoundedButtonDrawable(radius, backgroundColor, borderVisible, borderColor, borderRadius,borderWidth);
+ setBackground(drawable);
+ }
+
+ public void setTextColor(int color) {
+ super.setTextColor(color);
+ }
+
+ public void setIcon(@DrawableRes int iconResId, int tintColor, boolean isIconLeftSide) {
+ Drawable icon = ContextCompat.getDrawable(getContext(), iconResId);
+ if (icon != null) {
+ icon.setColorFilter(tintColor, android.graphics.PorterDuff.Mode.SRC_IN);
+ }
+ if (isIconLeftSide) {
+ setCompoundDrawablesWithIntrinsicBounds(icon, null, null, null);
+ } else {
+ setCompoundDrawablesWithIntrinsicBounds(null, null, icon, null);
+ }
+ }
+
+ public void setIcon(Drawable icon, int tintColor, boolean isIconLeftSide) {
+ if (icon != null) {
+ icon.setColorFilter(tintColor, android.graphics.PorterDuff.Mode.SRC_IN);
+ }
+ if (isIconLeftSide) {
+ setCompoundDrawablesWithIntrinsicBounds(icon, null, null, null);
+ } else {
+ setCompoundDrawablesWithIntrinsicBounds(null, null, icon, null);
+ }
+ }
+
+ private int dpToPx(int dp) {
+ float density = getContext().getResources().getDisplayMetrics().density;
+ return Math.round(dp * density);
+ }
+
+ public void setButtonHeight(int heightInPx) {
+ int height = dpToPx(heightInPx);
+ ViewGroup.LayoutParams params = getLayoutParams();
+ if (params == null) {
+ params = new ViewGroup.LayoutParams(
+ ViewGroup.LayoutParams.WRAP_CONTENT,
+ height
+ );
+ } else {
+ params.height = height;
+ }
+ if (params instanceof ConstraintLayout.LayoutParams) {
+ ConstraintLayout.LayoutParams constraintParams = (ConstraintLayout.LayoutParams) params;
+ constraintParams.height = height;
+ }
+ setLayoutParams(params);
+ }
+
+ // Method to set font family by resource ID
+ public void setFontFamily(int fontResId) {
+ Typeface typeface = ResourcesCompat.getFont(getContext(), fontResId);
+ setTypeface(typeface);
+ }
+
+ @Override
+ public void setEnabled(boolean enabled) {
+ super.setEnabled(enabled);
+ if (enabled) {
+ setBackgroundDrawable(dpToPx(DEFAULT_RADIUS), enabledBackgroundColor, DEFAULT_BORDER_VISIBLE, DEFAULT_BORDER_COLOR, dpToPx(DEFAULT_BORDER_RADIUS), dpToPx(DEFAULT_BORDER_WIDTH));
+ } else {
+ setBackgroundDrawable(dpToPx(DEFAULT_RADIUS), disabledBackgroundColor, DEFAULT_BORDER_VISIBLE, DEFAULT_BORDER_COLOR, dpToPx(DEFAULT_BORDER_RADIUS), dpToPx(DEFAULT_BORDER_WIDTH));
+ }
+ }
+}
+
diff --git a/app/src/org/commcare/activities/components/RoundedButtonDrawable.java b/app/src/org/commcare/activities/components/RoundedButtonDrawable.java
new file mode 100644
index 0000000000..291bf8fc16
--- /dev/null
+++ b/app/src/org/commcare/activities/components/RoundedButtonDrawable.java
@@ -0,0 +1,140 @@
+package org.commcare.activities.components;
+
+import android.content.res.Resources;
+import android.graphics.Canvas;
+import android.graphics.ColorFilter;
+import android.graphics.Paint;
+import android.graphics.PixelFormat;
+import android.graphics.RectF;
+import android.graphics.drawable.Drawable;
+
+import androidx.annotation.Nullable;
+
+public class RoundedButtonDrawable extends Drawable {
+ private int backgroundColor;
+ private float cornerRadius;
+ private boolean borderVisible;
+ private int borderColor;
+ private float borderRadius;
+ private float borderWidth;
+ private Paint backgroundPaint;
+ private Paint borderPaint;
+
+ // Constructor
+ public RoundedButtonDrawable(int cornerRadius, int backgroundColor, boolean borderVisible, int borderColor, float borderRadius, float borderWidth) {
+ this.cornerRadius = cornerRadius;
+ this.backgroundColor = backgroundColor;
+ this.borderVisible = borderVisible;
+ this.borderColor = borderColor;
+ this.borderRadius = borderRadius;
+ this.borderWidth = borderWidth;
+
+ // Initialize background paint
+ backgroundPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
+ backgroundPaint.setColor(backgroundColor);
+
+ // Initialize border paint if border is visible
+ if (borderVisible) {
+ borderPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
+ borderPaint.setColor(borderColor);
+ borderPaint.setStyle(Paint.Style.STROKE);
+ borderPaint.setStrokeWidth(borderWidth);
+ }
+ }
+
+ // Method to set the background color
+ public void setBackgroundColor(int color) {
+ this.backgroundColor = color;
+ backgroundPaint.setColor(color);
+ invalidateSelf();
+ }
+
+ // Method to get the corner radius
+ public float getCornerRadius() {
+ return cornerRadius;
+ }
+
+ // Method to set the corner radius
+ public void setRadius(float radius) {
+ this.cornerRadius = radius;
+ invalidateSelf();
+ }
+
+ // Method to set border visibility
+ public void setBorderVisible(boolean visible) {
+ this.borderVisible = visible;
+ if (visible && borderPaint == null) {
+ borderPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
+ borderPaint.setColor(borderColor);
+ borderPaint.setStyle(Paint.Style.STROKE);
+ borderPaint.setStrokeWidth(borderWidth);
+ }
+ invalidateSelf();
+ }
+
+ // Method to set border color
+ public void setBorderColor(int color) {
+ this.borderColor = color;
+ if (borderPaint != null) {
+ borderPaint.setColor(color);
+ }
+ invalidateSelf();
+ }
+
+ // Method to set border radius
+ public void setBorderRadius(float radius) {
+ this.borderRadius = radius;
+ invalidateSelf();
+ }
+
+ // Method to set border width
+ public void setBorderWidth(float width) {
+ this.borderWidth = width;
+ if (borderPaint != null) {
+ borderPaint.setStrokeWidth(width);
+ }
+ invalidateSelf();
+ }
+
+ @Override
+ public void draw(Canvas canvas) {
+ // Draw the background with rounded corners
+ canvas.drawRoundRect(new RectF(getBounds()), cornerRadius, cornerRadius, backgroundPaint);
+
+ // Draw the border if visible
+ if (borderVisible && borderPaint != null) {
+ float halfStrokeWidth = borderPaint.getStrokeWidth() / 2;
+ RectF borderRect = new RectF(getBounds());
+ borderRect.inset(halfStrokeWidth, halfStrokeWidth);
+ canvas.drawRoundRect(borderRect, borderRadius, borderRadius, borderPaint);
+ }
+ }
+
+ @Override
+ public void setAlpha(int alpha) {
+ backgroundPaint.setAlpha(alpha);
+ if (borderPaint != null) {
+ borderPaint.setAlpha(alpha);
+ }
+ invalidateSelf();
+ }
+
+ @Override
+ public void setColorFilter(@Nullable ColorFilter colorFilter) {
+ backgroundPaint.setColorFilter(colorFilter);
+ if (borderPaint != null) {
+ borderPaint.setColorFilter(colorFilter);
+ }
+ invalidateSelf();
+ }
+
+ @Override
+ public int getOpacity() {
+ return PixelFormat.OPAQUE;
+ }
+
+ private int dpToPx(int dp) {
+ float density = Resources.getSystem().getDisplayMetrics().density;
+ return Math.round(dp * density);
+ }
+}
diff --git a/app/src/org/commcare/views/widgets/IntentWidget.java b/app/src/org/commcare/views/widgets/IntentWidget.java
index 67f38d9f22..384ec755a3 100644
--- a/app/src/org/commcare/views/widgets/IntentWidget.java
+++ b/app/src/org/commcare/views/widgets/IntentWidget.java
@@ -20,6 +20,7 @@
import android.widget.Toast;
import org.commcare.activities.components.FormEntryConstants;
+import org.commcare.activities.components.RoundedButton;
import org.commcare.android.javarosa.IntentCallout;
import org.commcare.logic.PendingCalloutInterface;
import org.commcare.utils.CompoundIntentList;
@@ -93,7 +94,7 @@ protected IntentWidget(Context context, FormEntryPrompt prompt, Intent in, Inten
} else {
mStringAnswer = new TextView(getContext());
}
- launchIntentButton = new AppCompatButton(getContext());
+ launchIntentButton = new RoundedButton(getContext());
setupTextView();
setupButton();
}
@@ -124,6 +125,7 @@ private void setupButton() {
getButtonLabel(),
!mPrompt.isReadOnly());
+
// launch barcode capture intent on click
launchIntentButton.setOnClickListener(v -> performCallout());
addView(launchIntentButton);