Browse Source

Some dialog fixes

master
preyearegmi 6 years ago
parent
commit
0e12becb9c
  1. 20
      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. 28
      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

20
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 ->
{
@ -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 ->
{
@ -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 ->
@ -305,10 +313,10 @@ public class KYCView1Fragment extends BaseFragment implements View.OnClickListen
}
private void showGenderList() {
hideKeyBoard();
GenericTextListingDialog<Gender> genderSelectDialog =new GenericTextListingDialog<>();
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)));

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 ->

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

@ -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 ->
{
@ -276,11 +282,10 @@ public class RecipientAddV2Activity extends BaseActivity implements View.OnClick
}
private void showRelationListingInDialogV2() {
hideKeyBoard();
GenericTextListingDialog<RelationDetailModel> relationListingDialog =new GenericTextListingDialog<>();
if (relationListingDialog == null)
relationListingDialog = new GenericTextListingDialog<>();
relationListingDialog.setData(this.relationList);
relationListingDialog.setListener(selectedRelation ->
{
@ -295,8 +300,6 @@ public class RecipientAddV2Activity extends BaseActivity implements View.OnClick
}
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 ->
{
@ -319,7 +323,6 @@ public class RecipientAddV2Activity extends BaseActivity implements View.OnClick
}
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 ->
{
@ -342,10 +346,10 @@ public class RecipientAddV2Activity extends BaseActivity implements View.OnClick
}
private void showCountryListingInDialogV2() {
hideKeyBoard();
GenericTextListingDialog<CountryDetailModel> countryListingDialog =new GenericTextListingDialog<>();
if (countryListingDialog == null)
countryListingDialog = new GenericTextListingDialog<>();
countryListingDialog.setData(this.countryList);
countryListingDialog.setListener(countryPaymentService ->
{

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