diff --git a/mifosng-android/src/main/java/com/mifos/mifosxdroid/dialogfragments/documentdialog/DocumentDialogFragment.java b/mifosng-android/src/main/java/com/mifos/mifosxdroid/dialogfragments/documentdialog/DocumentDialogFragment.java
index c04f01618f4..16d93b74f56 100755
--- a/mifosng-android/src/main/java/com/mifos/mifosxdroid/dialogfragments/documentdialog/DocumentDialogFragment.java
+++ b/mifosng-android/src/main/java/com/mifos/mifosxdroid/dialogfragments/documentdialog/DocumentDialogFragment.java
@@ -56,19 +56,19 @@ public class DocumentDialogFragment extends DialogFragment implements DocumentDi
private final String LOG_TAG = getClass().getSimpleName();
@BindView(R.id.tv_document_action)
- TextView tv_document_action;
+ TextView tvDocumentAction;
@BindView(R.id.et_document_name)
- EditText et_document_name;
+ EditText etDocumentName;
@BindView(R.id.et_document_description)
- EditText et_document_description;
+ EditText etDocumentDescription;
@BindView(R.id.tv_choose_file)
- TextView tv_choose_file;
+ TextView tvChooseFile;
@BindView(R.id.bt_upload)
- Button bt_upload;
+ Button btUpload;
@Inject
DocumentDialogPresenter mDocumentDialogPresenter;
@@ -124,16 +124,14 @@ public Dialog onCreateDialog(Bundle savedInstanceState) {
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle
savedInstanceState) {
rootView = inflater.inflate(R.layout.dialog_fragment_document, container, false);
-
ButterKnife.bind(this, rootView);
mDocumentDialogPresenter.attachView(this);
-
if (getResources().getString(R.string.update_document).equals(documentAction)) {
- tv_document_action.setText(R.string.update_document);
- et_document_name.setText(document.getName());
- et_document_description.setText(document.getDescription());
+ tvDocumentAction.setText(R.string.update_document);
+ etDocumentName.setText(document.getName());
+ etDocumentDescription.setText(document.getDescription());
} else if (getResources().getString(R.string.upload_document).equals(documentAction)) {
- tv_document_action.setText(R.string.upload_document);
+ tvDocumentAction.setText(R.string.upload_document);
}
return rootView;
@@ -149,7 +147,7 @@ public void beginUpload() {
}
}
- @OnClick(R.id.tv_choose_file)
+ @OnClick(R.id.btn_browse_document)
public void openFilePicker() {
checkPermissionAndRequest();
}
@@ -162,13 +160,13 @@ public void openFilePicker() {
*/
public void validateInput() throws RequiredFieldException {
- documentName = et_document_name.getEditableText().toString();
+ documentName = etDocumentName.getEditableText().toString();
if (documentName.length() == 0 || documentName.equals(""))
throw new RequiredFieldException(getResources().getString(R.string.name),
getString(R.string.message_field_required));
- documentDescription = et_document_description.getEditableText().toString();
+ documentDescription = etDocumentDescription.getEditableText().toString();
if (documentDescription.length() == 0 || documentDescription.equals(""))
throw new RequiredFieldException(getResources().getString(R.string.description),
@@ -285,11 +283,11 @@ public void onActivityResult(int requestCode, int resultCode, Intent data) {
}
if (fileChoosen != null) {
- tv_choose_file.setText(fileChoosen.getName());
+ tvChooseFile.setText(fileChoosen.getName());
} else {
break;
}
- bt_upload.setEnabled(true);
+ btUpload.setEnabled(true);
}
break;
@@ -338,4 +336,5 @@ public void onDestroyView() {
public interface OnDialogFragmentInteractionListener {
void initiateFileUpload(String name, String description);
}
+
}
diff --git a/mifosng-android/src/main/res/drawable/ic_folder_black_24dp.xml b/mifosng-android/src/main/res/drawable/ic_folder_black_24dp.xml
new file mode 100644
index 00000000000..846a16841e0
--- /dev/null
+++ b/mifosng-android/src/main/res/drawable/ic_folder_black_24dp.xml
@@ -0,0 +1,9 @@
+
+
+
diff --git a/mifosng-android/src/main/res/layout/dialog_fragment_document.xml b/mifosng-android/src/main/res/layout/dialog_fragment_document.xml
index b7dd4bfa1e4..0e259e40854 100755
--- a/mifosng-android/src/main/res/layout/dialog_fragment_document.xml
+++ b/mifosng-android/src/main/res/layout/dialog_fragment_document.xml
@@ -5,95 +5,122 @@
~ See https://github.com/openMF/android-client/blob/master/LICENSE.md
-->
-
-
-
+
+
+ android:layout_width="match_parent"
+ android:orientation="vertical">
+ android:textColor="@color/primary"
+ android:textStyle="bold"/>
-
-
-
+
-
-
-
-
-
+ android:layout_height="match_parent"
+ android:layout_width="match_parent"/>
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
-
\ No newline at end of file
+
diff --git a/mifosng-android/src/main/res/layout/dialog_fragment_identifier.xml b/mifosng-android/src/main/res/layout/dialog_fragment_identifier.xml
index 1567a52ed14..d3224b50f76 100644
--- a/mifosng-android/src/main/res/layout/dialog_fragment_identifier.xml
+++ b/mifosng-android/src/main/res/layout/dialog_fragment_identifier.xml
@@ -11,126 +11,119 @@
android:layout_height="match_parent"
android:inAnimation="@android:anim/fade_in"
android:outAnimation="@android:anim/fade_out">
-
-
+
+
+
+
+
+
+
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ android:paddingTop="10dp"
+ android:text="@string/document_type"
+ android:textSize="12sp"
+ android:paddingLeft="24dp"
+ android:paddingRight="24dp"
+ style="@style/Base.TextAppearance.AppCompat.Small" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
\ No newline at end of file
diff --git a/mifosng-android/src/main/res/values/strings.xml b/mifosng-android/src/main/res/values/strings.xml
index f633126c546..f5dd2f8f8be 100755
--- a/mifosng-android/src/main/res/values/strings.xml
+++ b/mifosng-android/src/main/res/values/strings.xml
@@ -187,6 +187,8 @@
Logging In
Please press back again to exit
Are you sure you want to logout?
+ Browse
+ Selected File