Browse Source

Some dialog fixes

master
preyearegmi 6 years ago
parent
commit
0e12becb9c
  1. 36
      app/src/main/java/com/gmeremit/online/gmeremittance_native/kycV2/view/view1/KYCView1Fragment.java
  2. 13
      app/src/main/java/com/gmeremit/online/gmeremittance_native/kycV2/view/view2/KYCView2Fragment.java
  3. 42
      app/src/main/java/com/gmeremit/online/gmeremittance_native/recipientV2/view/recipientadd/RecipientAddV2Activity.java
  4. 7
      app/src/main/res/layout/activity_recipient_v2.xml
  5. 5
      app/src/main/res/layout/fragment_kyc_view1_v2.xml
  6. 6
      app/src/main/res/layout/fragment_kyc_view2_v2.xml
  7. 2
      app/src/main/res/layout/fragment_payout_mode_send_money_v2.xml

36
app/src/main/java/com/gmeremit/online/gmeremittance_native/kycV2/view/view1/KYCView1Fragment.java

@ -13,8 +13,8 @@ import android.widget.Button;
import android.widget.EditText;
import com.gmeremit.online.gmeremittance_native.R;
import com.gmeremit.online.gmeremittance_native.customwidgets.GenericTextListingDialog;
import com.gmeremit.online.gmeremittance_native.base.BaseFragment;
import com.gmeremit.online.gmeremittance_native.customwidgets.GenericTextListingDialog;
import com.gmeremit.online.gmeremittance_native.customwidgets.genderdialog.Gender;
import com.gmeremit.online.gmeremittance_native.kycV2.KYCV2ActionListener;
import com.gmeremit.online.gmeremittance_native.kycV2.model.kyc.NativeCountry;
@ -120,6 +120,11 @@ public class KYCView1Fragment extends BaseFragment implements View.OnClickListen
private Occupation selectedOccupation;
private Gender selectedGender;
private GenericTextListingDialog<Gender> genderSelectDialog;
private GenericTextListingDialog<Occupation> occupationListingDialog;
private GenericTextListingDialog<Province> provinceListingDialog;
private GenericTextListingDialog<NativeCountry> nativeCountrylListDialog;
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
@ -252,7 +257,8 @@ public class KYCView1Fragment extends BaseFragment implements View.OnClickListen
private void showOccupationList() {
hideKeyBoard();
GenericTextListingDialog<Occupation> occupationListingDialog =new GenericTextListingDialog<>();
if (occupationListingDialog == null)
occupationListingDialog = new GenericTextListingDialog<>();
occupationListingDialog.setData(this.occupationListData);
occupationListingDialog.setListener(selectedOccupation ->
{
@ -262,7 +268,7 @@ public class KYCView1Fragment extends BaseFragment implements View.OnClickListen
});
occupationListingDialog.setHintAndTitle(getString(R.string.search_occupation_text),getString(R.string.select_occupation_text),getString(R.string.no_occupation_found_text));
occupationListingDialog.setHintAndTitle(getString(R.string.search_occupation_text), getString(R.string.select_occupation_text), getString(R.string.no_occupation_found_text));
occupationListingDialog.disableSearch(false);
if (!occupationListingDialog.isAdded())
occupationListingDialog.show(getActivity().getSupportFragmentManager(), "OCCUPATIONCOUNTRYDIALOG");
@ -271,7 +277,8 @@ public class KYCView1Fragment extends BaseFragment implements View.OnClickListen
private void showProvinceList() {
hideKeyBoard();
GenericTextListingDialog<Province> provinceListingDialog =new GenericTextListingDialog<>();
if (provinceListingDialog == null)
provinceListingDialog = new GenericTextListingDialog<>();
provinceListingDialog.setData(this.provinceListData);
provinceListingDialog.setListener(selectedProvince ->
{
@ -280,7 +287,7 @@ public class KYCView1Fragment extends BaseFragment implements View.OnClickListen
provinceListingDialog.dismiss();
});
provinceListingDialog.setHintAndTitle(getString(R.string.search_province_text),getString(R.string.select_province_text),getString(R.string.no_province_found_text));
provinceListingDialog.setHintAndTitle(getString(R.string.search_province_text), getString(R.string.select_province_text), getString(R.string.no_province_found_text));
provinceListingDialog.disableSearch(false);
if (!provinceListingDialog.isAdded())
provinceListingDialog.show(getActivity().getSupportFragmentManager(), "PROVINCEDIALOG");
@ -288,7 +295,8 @@ public class KYCView1Fragment extends BaseFragment implements View.OnClickListen
private void showNativeCountryList() {
hideKeyBoard();
GenericTextListingDialog<NativeCountry> nativeCountrylListDialog =new GenericTextListingDialog<>();
if (nativeCountrylListDialog == null)
nativeCountrylListDialog = new GenericTextListingDialog<>();
nativeCountrylListDialog.setData(this.nativeCountryListData);
nativeCountrylListDialog.setListener(selectedNativeCountry ->
@ -298,21 +306,21 @@ public class KYCView1Fragment extends BaseFragment implements View.OnClickListen
nativeCountrylListDialog.dismiss();
});
nativeCountrylListDialog.setHintAndTitle(getString(R.string.search_country_text),getString(R.string.select_country_text),getString(R.string.no_country_found_text));
nativeCountrylListDialog.setHintAndTitle(getString(R.string.search_country_text), getString(R.string.select_country_text), getString(R.string.no_country_found_text));
nativeCountrylListDialog.disableSearch(false);
if (!nativeCountrylListDialog.isAdded())
nativeCountrylListDialog.show(getActivity().getSupportFragmentManager(), "NATIVECOUNTRYDIALOG");
}
private void showGenderList() {
hideKeyBoard();
GenericTextListingDialog<Gender> genderSelectDialog =new GenericTextListingDialog<>();
List<Gender> data=new ArrayList<>();
data.add(new Gender("M",getString(R.string.male_text)));
data.add(new Gender("F",getString(R.string.female_text)));
data.add(new Gender("O",getString(R.string.other_text)));
if (genderSelectDialog == null)
genderSelectDialog = new GenericTextListingDialog<>();
List<Gender> data = new ArrayList<>();
data.add(new Gender("M", getString(R.string.male_text)));
data.add(new Gender("F", getString(R.string.female_text)));
data.add(new Gender("O", getString(R.string.other_text)));
genderSelectDialog.setData(data);
genderSelectDialog.setListener(selectedGender ->
{
@ -321,7 +329,7 @@ public class KYCView1Fragment extends BaseFragment implements View.OnClickListen
genderSelectDialog.dismiss();
});
genderSelectDialog.setHintAndTitle("Search Gender",getString(R.string.select_gender_text),getString(R.string.no_gender_found_text));
genderSelectDialog.setHintAndTitle("Search Gender", getString(R.string.select_gender_text), getString(R.string.no_gender_found_text));
genderSelectDialog.disableSearch(true);
if (!genderSelectDialog.isAdded())
genderSelectDialog.show(getActivity().getSupportFragmentManager(), "GENDERCHOOSER");

13
app/src/main/java/com/gmeremit/online/gmeremittance_native/kycV2/view/view2/KYCView2Fragment.java

@ -89,6 +89,10 @@ public class KYCView2Fragment extends BaseFragment implements View.OnClickListen
private List<String> idTypeRelatedViews;
private String userDob = null;
private GenericTextListingDialog<SourceOfFund> sourceOfFundGenericTextListingDialog;
private GenericTextListingDialog<IdType> idTypeListingDialog ;
private GenericTextListingDialog<Bank> primaryBankListingDialog;
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
@ -235,7 +239,8 @@ public class KYCView2Fragment extends BaseFragment implements View.OnClickListen
private void showSourceOfFund() {
hideKeyBoard();
GenericTextListingDialog<SourceOfFund> sourceOfFundGenericTextListingDialog =new GenericTextListingDialog<>();
if(sourceOfFundGenericTextListingDialog==null)
sourceOfFundGenericTextListingDialog =new GenericTextListingDialog<>();
sourceOfFundGenericTextListingDialog.setData(this.sourceOfFundListData);
sourceOfFundGenericTextListingDialog.setListener(selectedSourceOfFundBank ->
@ -254,7 +259,8 @@ public class KYCView2Fragment extends BaseFragment implements View.OnClickListen
private void showIdType() {
hideKeyBoard();
GenericTextListingDialog<IdType> idTypeListingDialog =new GenericTextListingDialog<>();
if(idTypeListingDialog==null)
idTypeListingDialog =new GenericTextListingDialog<>();
idTypeListingDialog.setData(this.idTypeListData);
idTypeListingDialog.setListener(selectedID ->
@ -296,7 +302,8 @@ public class KYCView2Fragment extends BaseFragment implements View.OnClickListen
private void showPrimaryBankList() {
hideKeyBoard();
GenericTextListingDialog<Bank> primaryBankListingDialog =new GenericTextListingDialog<>();
if(primaryBankListingDialog==null)
primaryBankListingDialog =new GenericTextListingDialog<>();
primaryBankListingDialog.setData(this.bankListData);
primaryBankListingDialog.setListener(selectedPrimaryBank ->

42
app/src/main/java/com/gmeremit/online/gmeremittance_native/recipientV2/view/recipientadd/RecipientAddV2Activity.java

@ -29,7 +29,7 @@ import java.util.List;
import butterknife.BindView;
import butterknife.ButterKnife;
public class RecipientAddV2Activity extends BaseActivity implements View.OnClickListener, RecipientAddV2PresenterInterface.RecipientAddV2ContractInterface {
public class RecipientAddV2Activity extends BaseActivity implements View.OnClickListener, RecipientAddV2PresenterInterface.RecipientAddV2ContractInterface {
@BindView(R.id.iv_back)
@ -117,10 +117,15 @@ public class RecipientAddV2Activity extends BaseActivity implements View.OnClick
private List<RelationDetailModel> relationList;
private RecipientInfoModel recipientToBeEdited = null;
private String selectedRecipientId = "";
private GenericTextListingDialog<TransferDetailModel> transferListingDialog;
GenericTextListingDialog<RelationDetailModel> relationListingDialog;
GenericTextListingDialog<DistrictDetailModel> districtListingDialog;
GenericTextListingDialog<ProvinceDetailModel> provinceListingDialog;
GenericTextListingDialog<CountryDetailModel> countryListingDialog;
/**
* ed_firstname
@ -261,7 +266,8 @@ public class RecipientAddV2Activity extends BaseActivity implements View.OnClick
private void showTransferListingInDialogV2() {
hideKeyBoard();
GenericTextListingDialog<TransferDetailModel> transferListingDialog =new GenericTextListingDialog<>();
if (transferListingDialog == null)
transferListingDialog = new GenericTextListingDialog<>();
transferListingDialog.setData(this.transferReasonList);
transferListingDialog.setListener(transferDetailModel ->
{
@ -269,18 +275,17 @@ public class RecipientAddV2Activity extends BaseActivity implements View.OnClick
this.ed_transfer.setText(this.selectedTransferReason.getText());
transferListingDialog.dismiss();
});
transferListingDialog.setHintAndTitle(getString(R.string.search_transfer_reason_text),getString(R.string.select_transfer_reason_text),getString(R.string.no_transfer_reason_found_text));
transferListingDialog.setHintAndTitle(getString(R.string.search_transfer_reason_text), getString(R.string.select_transfer_reason_text), getString(R.string.no_transfer_reason_found_text));
transferListingDialog.disableSearch(false);
if (!transferListingDialog.isAdded())
transferListingDialog.show(getSupportFragmentManager(), "TRANSFERDIALOG");
}
private void showRelationListingInDialogV2() {
hideKeyBoard();
GenericTextListingDialog<RelationDetailModel> relationListingDialog =new GenericTextListingDialog<>();
if (relationListingDialog == null)
relationListingDialog = new GenericTextListingDialog<>();
relationListingDialog.setData(this.relationList);
relationListingDialog.setListener(selectedRelation ->
{
@ -288,15 +293,13 @@ public class RecipientAddV2Activity extends BaseActivity implements View.OnClick
this.ed_relation.setText(this.selectedRelation.getText());
relationListingDialog.dismiss();
});
relationListingDialog.setHintAndTitle(getString(R.string.search_relation_text),getString(R.string.select_relation_text),getString(R.string.no_relation_found_text));
relationListingDialog.setHintAndTitle(getString(R.string.search_relation_text), getString(R.string.select_relation_text), getString(R.string.no_relation_found_text));
relationListingDialog.disableSearch(false);
if (!relationListingDialog.isAdded())
relationListingDialog.show(getSupportFragmentManager(), "RelationListingDialog");
}
private void showDistrictListingInDialogV2() {
if (this.selectedProvince == null) {
@ -304,7 +307,8 @@ public class RecipientAddV2Activity extends BaseActivity implements View.OnClick
return;
}
hideKeyBoard();
GenericTextListingDialog<DistrictDetailModel> districtListingDialog =new GenericTextListingDialog<>();
if (districtListingDialog == null)
districtListingDialog = new GenericTextListingDialog<>();
districtListingDialog.setData(this.selectedProvince.getDistrict());
districtListingDialog.setListener(districtDetailModel ->
{
@ -312,14 +316,13 @@ public class RecipientAddV2Activity extends BaseActivity implements View.OnClick
this.ed_district.setText(this.selectedDistrict.getText());
districtListingDialog.dismiss();
});
districtListingDialog.setHintAndTitle(getString(R.string.search_district_text),getString(R.string.select_district_text),getString(R.string.no_district_found_text));
districtListingDialog.setHintAndTitle(getString(R.string.search_district_text), getString(R.string.select_district_text), getString(R.string.no_district_found_text));
districtListingDialog.disableSearch(false);
if (!districtListingDialog.isAdded())
districtListingDialog.show(getSupportFragmentManager(), "RelationListingDialog");
}
private void showProvinceListingInDialogV2() {
if (this.selectedCountry == null) {
@ -327,7 +330,8 @@ public class RecipientAddV2Activity extends BaseActivity implements View.OnClick
return;
}
hideKeyBoard();
GenericTextListingDialog<ProvinceDetailModel> provinceListingDialog =new GenericTextListingDialog<>();
if (provinceListingDialog == null)
provinceListingDialog = new GenericTextListingDialog<>();
provinceListingDialog.setData(this.selectedCountry.getProvinces());
provinceListingDialog.setListener(selectedProvince ->
{
@ -335,17 +339,17 @@ public class RecipientAddV2Activity extends BaseActivity implements View.OnClick
this.ed_province.setText(this.selectedProvince.getText());
provinceListingDialog.dismiss();
});
provinceListingDialog.setHintAndTitle(getString(R.string.search_province_text),getString(R.string.select_province_text),getString(R.string.no_province_found_text));
provinceListingDialog.setHintAndTitle(getString(R.string.search_province_text), getString(R.string.select_province_text), getString(R.string.no_province_found_text));
provinceListingDialog.disableSearch(false);
if (!provinceListingDialog.isAdded())
provinceListingDialog.show(getSupportFragmentManager(), "ProvinceListingDialog");
}
private void showCountryListingInDialogV2() {
hideKeyBoard();
GenericTextListingDialog<CountryDetailModel> countryListingDialog =new GenericTextListingDialog<>();
if (countryListingDialog == null)
countryListingDialog = new GenericTextListingDialog<>();
countryListingDialog.setData(this.countryList);
countryListingDialog.setListener(countryPaymentService ->
{
@ -367,7 +371,7 @@ public class RecipientAddV2Activity extends BaseActivity implements View.OnClick
}
countryListingDialog.dismiss();
});
countryListingDialog.setHintAndTitle(getString(R.string.search_country_text),getString(R.string.select_country_text),getString(R.string.no_country_found_text));
countryListingDialog.setHintAndTitle(getString(R.string.search_country_text), getString(R.string.select_country_text), getString(R.string.no_country_found_text));
countryListingDialog.disableSearch(false);
if (!countryListingDialog.isAdded())
countryListingDialog.show(getSupportFragmentManager(), "CountryListingDialog");
@ -439,7 +443,7 @@ public class RecipientAddV2Activity extends BaseActivity implements View.OnClick
@Override
public void setErrorOnTransferReason(String message) {
transferWrapper.setError(message);
transferWrapper.setError(message);
}
@Override

7
app/src/main/res/layout/activity_recipient_v2.xml

@ -117,7 +117,7 @@
android:focusable="false"
android:layout_marginRight="15dp"
android:layout_marginEnd="15dp"
android:cursorVisible="false"
android:layout_width="match_parent"
android:singleLine="false"
android:layout_height="wrap_content"
@ -162,7 +162,7 @@
android:singleLine="false"
android:layout_marginRight="15dp"
android:layout_marginEnd="15dp"
android:cursorVisible="false"
android:layout_width="match_parent"
android:layout_height="wrap_content"
/>
@ -202,6 +202,7 @@
android:focusable="false"
android:clickable="false"
android:singleLine="false"
android:cursorVisible="false"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginRight="15dp"
@ -260,6 +261,7 @@
android:clickable="false"
android:singleLine="false"
android:layout_marginRight="15dp"
android:cursorVisible="false"
android:layout_marginEnd="15dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -334,6 +336,7 @@
style="@style/editetxtsingleline"
android:focusable="false"
android:clickable="false"
android:cursorVisible="false"
android:singleLine="false"
android:layout_width="match_parent"
android:layout_height="wrap_content"

5
app/src/main/res/layout/fragment_kyc_view1_v2.xml

@ -127,6 +127,7 @@
style="@style/editetxtsingleline"
android:enabled="true"
android:focusable="false"
android:cursorVisible="false"
android:layout_marginRight="12dp"
android:layout_marginEnd="12dp"
android:imeOptions="actionDone"
@ -166,6 +167,7 @@
style="@style/editetxtsingleline"
android:enabled="true"
android:focusable="false"
android:cursorVisible="false"
android:layout_marginRight="12dp"
android:layout_marginEnd="12dp"
android:imeOptions="actionDone"
@ -205,6 +207,7 @@
style="@style/editetxtsingleline"
android:enabled="true"
android:focusable="false"
android:cursorVisible="false"
android:layout_marginRight="12dp"
android:layout_marginEnd="12dp"
android:imeOptions="actionDone"
@ -259,6 +262,7 @@
style="@style/editetxtsingleline"
android:enabled="true"
android:focusable="false"
android:cursorVisible="false"
android:layout_marginRight="12dp"
android:layout_marginEnd="12dp"
android:imeOptions="actionDone"
@ -299,6 +303,7 @@
android:layout_marginEnd="12dp"
android:imeOptions="actionDone"
android:layout_width="match_parent"
android:cursorVisible="false"
android:singleLine="false"
android:layout_height="wrap_content"
/>

6
app/src/main/res/layout/fragment_kyc_view2_v2.xml

@ -33,6 +33,7 @@
style="@style/editetxtsingleline"
android:enabled="true"
android:focusable="false"
android:cursorVisible="false"
android:layout_marginRight="12dp"
android:layout_marginEnd="12dp"
android:imeOptions="actionDone"
@ -88,6 +89,7 @@
android:focusable="false"
android:layout_marginRight="12dp"
android:layout_marginEnd="12dp"
android:cursorVisible="false"
android:imeOptions="actionDone"
android:layout_width="match_parent"
android:singleLine="false"
@ -114,6 +116,7 @@
<com.gmeremit.online.gmeremittance_native.customwidgets.maskedittext.GmeMaskedEditText
android:id="@+id/ed_verificationId"
style="@style/editetxtsingleline"
android:inputType="textMultiLine"
android:layout_width="match_parent"
android:imeOptions="actionDone"
android:layout_height="wrap_content" />
@ -145,6 +148,7 @@
android:layout_marginEnd="12dp"
android:imeOptions="actionDone"
android:layout_width="match_parent"
android:cursorVisible="false"
android:singleLine="false"
android:layout_height="wrap_content"
/>
@ -181,6 +185,7 @@
android:focusable="false"
android:layout_marginRight="12dp"
android:layout_marginEnd="12dp"
android:cursorVisible="false"
android:imeOptions="actionDone"
android:layout_width="match_parent"
android:singleLine="false"
@ -221,6 +226,7 @@
android:layout_marginRight="12dp"
android:layout_marginEnd="12dp"
android:imeOptions="actionDone"
android:cursorVisible="false"
android:layout_width="match_parent"
android:singleLine="false"
android:layout_height="wrap_content"

2
app/src/main/res/layout/fragment_payout_mode_send_money_v2.xml

@ -76,6 +76,7 @@
android:layout_marginRight="12dp"
android:layout_marginEnd="12dp"
android:focusable="false"
android:cursorVisible="false"
android:imeOptions="actionDone"
android:layout_width="match_parent"
android:singleLine="false"
@ -111,6 +112,7 @@
style="@style/editetxtsingleline"
android:enabled="true"
android:focusable="false"
android:cursorVisible="false"
android:layout_marginRight="12dp"
android:layout_marginEnd="12dp"
android:imeOptions="actionDone"

Loading…
Cancel
Save