Skip to content

Commit 70ef8e4

Browse files
committed
requested changes resolved
1 parent 7af62fa commit 70ef8e4

4 files changed

Lines changed: 16 additions & 15 deletions

File tree

openmrs-client/src/main/java/org/openmrs/mobile/activities/dialog/CameraOrGalleryPickerDialog.java

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,11 @@ public CameraOrGalleryPickerDialog(Boolean showRemoveButton) {
4949
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
5050
View view = inflater.inflate(R.layout.dialog_my_custom, container, false);
5151
RecyclerView recyclerView = view.findViewById(R.id.recyclerView_dialog);
52-
list.add(new CustomDialogModel("Take a photo", R.drawable.ic_photo_camera));
53-
list.add(new CustomDialogModel("Choose photo", R.drawable.ic_photo_library));
54-
if (showRemoveButton)
55-
list.add(new CustomDialogModel("Remove photo", R.drawable.ic_photo_delete));
56-
52+
list.add(new CustomDialogModel(getString(R.string.dialog_take_photo), R.drawable.ic_photo_camera));
53+
list.add(new CustomDialogModel(getString(R.string.dialog_choose_photo), R.drawable.ic_photo_library));
54+
if (showRemoveButton) {
55+
list.add(new CustomDialogModel(getString(R.string.dialog_remove_photo), R.drawable.ic_photo_delete));
56+
}
5757
CustomDialogAdapter adapter = new CustomDialogAdapter(getActivity(), list);
5858

5959
recyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
@@ -104,12 +104,7 @@ public void onBindViewHolder(@NonNull CustomDialogAdapter.ViewHolder holder, int
104104
CustomDialogModel customDialogModel = modelList.get(position);
105105
holder.textView.setText(customDialogModel.getName());
106106
holder.imageView.setImageResource(customDialogModel.getId());
107-
holder.linearLayout.setOnClickListener(new View.OnClickListener() {
108-
@Override
109-
public void onClick(View v) {
110-
CameraOrGalleryPickerDialog.this.performActivity(position);
111-
}
112-
});
107+
holder.linearLayout.setOnClickListener(v -> CameraOrGalleryPickerDialog.this.performActivity(position));
113108
}
114109

115110
@Override

openmrs-client/src/main/res/layout/list_gallery_or_camera_item.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
android:id="@+id/imageView"
2626
android:layout_width="50dp"
2727
android:layout_height="50dp"
28-
android:paddingLeft="15dp"
29-
android:paddingRight="15dp"
28+
android:paddingLeft="16dp"
29+
android:paddingRight="16dp"
3030
tools:src="@drawable/ic_photo_camera" />
3131

3232
<TextView
@@ -35,8 +35,8 @@
3535
android:layout_height="wrap_content"
3636
android:layout_marginEnd="50dp"
3737
android:layout_marginRight="50dp"
38-
android:paddingEnd="15dp"
39-
android:paddingRight="15dp"
38+
android:paddingEnd="16dp"
39+
android:paddingRight="16dp"
4040
android:textSize="16sp"
4141
tools:text="@string/take_a_photo" />
4242

openmrs-client/src/main/res/values-hi/strings.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,4 +379,7 @@
379379
<string name="showcase_register_patient">नया मरीज पंजीकृत करने के लिए यहां क्लिक करें</string>
380380
<string name="showcase_form_entry">एक मरीज के वाइटल कलेक्ट करने के लिए यहां क्लिक करें</string>
381381
<string name="showcase_manage_providers">एक मरीज के लिए पोषणकर्ता का प्रबंधन करने के लिए यहां क्लिक करें</string>
382+
<string name="dialog_take_photo">एक तस्वीर लें</string>
383+
<string name="dialog_choose_photo">फोटो चुनो</string>
384+
<string name="dialog_remove_photo">फोटो निकालें</string>
382385
</resources>

openmrs-client/src/main/res/values/strings.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,4 +388,7 @@
388388
<string name="showcase_register_patient">Click here to register a new patient</string>
389389
<string name="showcase_form_entry">Click here to capture vitals for a patient on a visit</string>
390390
<string name="showcase_manage_providers">Click here to manage providers for a patient on a visit</string>
391+
<string name="dialog_take_photo">Take a photo</string>
392+
<string name="dialog_choose_photo">Choose photo</string>
393+
<string name="dialog_remove_photo">Remove photo</string>
391394
</resources>

0 commit comments

Comments
 (0)