Skip to content

Commit

Permalink
Fix for font size
Browse files Browse the repository at this point in the history
Signed-off-by: Ephraim Muhia <emuhia@ona.io>
  • Loading branch information
Ephraim Muhia committed Oct 6, 2017
1 parent 04539c0 commit 831f618
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ protected Intent doInBackground(Void... params) {
jsonObject.put(JsonFormConstants.OPENMRS_ENTITY_PARENT, "");
jsonObject.put(JsonFormConstants.OPENMRS_ENTITY, "");
jsonObject.put(JsonFormConstants.OPENMRS_ENTITY_ID, "");
jsonObject.put("hia2_indicator", hia2Indicator.getIndicatorCode());
jsonObject.put(PathConstants.KEY.HIA_2_INDICATOR, hia2Indicator.getIndicatorCode());
indicatorCategory = hia2Indicator.getCategory();
JSONArray fields = null;
if (fieldsMap.containsKey(indicatorCategory)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
* Created by keyman on 11/04/2017.
*/
public class PathEditTextFactory extends EditTextFactory {
private static final int HIA2_REPORT_FORM_HINT_FONT_SIZE = 51;

@Override
public void attachJson(String stepName, Context context, JsonFormFragment formFragment, JSONObject jsonObject, MaterialEditText editText) throws Exception {
Expand All @@ -57,7 +56,9 @@ public void attachJson(String stepName, Context context, JsonFormFragment formFr

if (jsonObject.has(PathConstants.KEY.HIA_2_INDICATOR)) {
editText.setTag(jsonObject.get(PathConstants.KEY.HIA_2_INDICATOR));
editText.setFloatingLabelTextSize(HIA2_REPORT_FORM_HINT_FONT_SIZE);
editText.setFloatingLabelTextSize((int) context.getResources().getDimension(R.dimen.hia2_indicator_hint_font_size));
editText.setTextSize((int) context.getResources().getDimension(R.dimen.hia2_indicator_default_font_size));

editText.addTextChangedListener(new HIA2ReportFormTextWatcher(formFragment, jsonObject.get(PathConstants.KEY.HIA_2_INDICATOR).toString()));
}
}
Expand Down
2 changes: 2 additions & 0 deletions opensrp-path/src/main/res/values-w720dp/dimens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@
<dimen name="noti_message_text_size">26sp</dimen>
<dimen name="loc_picker_text_max_width">300dp</dimen>
<dimen name="title_label_text_max_width">250dp</dimen>
<dimen name="hia2_indicator_hint_font_size">20sp</dimen>
<dimen name="hia2_indicator_default_font_size">10sp</dimen>
</resources>
2 changes: 2 additions & 0 deletions opensrp-path/src/main/res/values/dimens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,6 @@
<dimen name="registerlinkheight">85dp</dimen>
<dimen name="custom_navigation_icon_size">35dp</dimen>
<dimen name="illustration_report_empty_state_size">175dp</dimen>
<dimen name="hia2_indicator_hint_font_size">18sp</dimen>
<dimen name="hia2_indicator_default_font_size">18sp</dimen>
</resources>

0 comments on commit 831f618

Please sign in to comment.