Skip to content

Commit

Permalink
Merge pull request #615 from opensrp/optibp_button_text_addition
Browse files Browse the repository at this point in the history
added button text field to change the optibp button text
  • Loading branch information
SebaMutuku authored Jan 10, 2022
2 parents 8829729 + 0ab2df1 commit 0307657
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@ public static class OptibpConstants {
public static final String OPTIBP_KEY_CLIENT_OPENSRP_ID = "clientOpenSRPId";
public static final String OPTIBP_KEY_BUTTON_BG_COLOR = "optibp_button_bg_color";
public static final String OPTIBP_KEY_BUTTON_TEXT_COLOR = "optibp_button_text_color";
public static final String OPTIBP_KEY_BUTTON_TEXT = "optibp_button_text";
}

public static class EDIT_TEXT_TYPE {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,11 @@ private void formatButtonWidget(Button button, JSONObject jsonObject) throws JSO
String colorString = jsonObject.getString(JsonFormConstants.OptibpConstants.OPTIBP_KEY_BUTTON_TEXT_COLOR);
button.setTextColor(Color.parseColor(colorString));
}
if(jsonObject.has(JsonFormConstants.OptibpConstants.OPTIBP_KEY_BUTTON_TEXT)) {
String buttonText = jsonObject.getString(JsonFormConstants.OptibpConstants.OPTIBP_KEY_BUTTON_TEXT);
button.setText(buttonText);
}

}

public void setUpOptiBpActivityResultListener(final WidgetArgs widgetArgs, int requestCode, final LinearLayout rootLayout, final EditText systolicEditText, final EditText diastolicEditText) {
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION_NAME=2.1.14-SNAPSHOT
VERSION_NAME=2.1.15-SNAPSHOT
VERSION_CODE=1
GROUP=org.smartregister
POM_SETTING_DESCRIPTION=OpenSRP Client Native Form Json Wizard
Expand Down

0 comments on commit 0307657

Please sign in to comment.