Skip to content

Commit 60fd9b5

Browse files
committed
Refactor view and presenter
1 parent ab6c577 commit 60fd9b5

File tree

1 file changed

+12
-18
lines changed

1 file changed

+12
-18
lines changed

raveandroid/src/main/java/com/flutterwave/raveandroid/banktransfer/BankTransferFragment.java

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,12 @@
44
import android.app.ProgressDialog;
55
import android.content.DialogInterface;
66
import android.content.Intent;
7-
import android.graphics.Color;
8-
import android.os.Build;
97
import android.os.Bundle;
108
import android.support.constraint.ConstraintLayout;
119
import android.support.design.widget.TextInputEditText;
1210
import android.support.design.widget.TextInputLayout;
1311
import android.support.v4.app.Fragment;
1412
import android.support.v7.app.AlertDialog;
15-
import android.util.Log;
1613
import android.view.LayoutInflater;
1714
import android.view.View;
1815
import android.view.ViewGroup;
@@ -22,14 +19,12 @@
2219
import android.widget.Toast;
2320

2421
import com.flutterwave.raveandroid.Payload;
25-
import com.flutterwave.raveandroid.PayloadBuilder;
2622
import com.flutterwave.raveandroid.R;
2723
import com.flutterwave.raveandroid.RaveConstants;
2824
import com.flutterwave.raveandroid.RavePayActivity;
2925
import com.flutterwave.raveandroid.RavePayInitializer;
3026
import com.flutterwave.raveandroid.Utils;
3127
import com.flutterwave.raveandroid.ViewObject;
32-
import com.flutterwave.raveandroid.responses.ChargeResponse;
3328

3429
import java.util.HashMap;
3530

@@ -109,18 +104,18 @@ private void collectData() {
109104
}
110105

111106
private void initializeViews() {
112-
amountEt = (TextInputEditText) v.findViewById(R.id.rave_amountTV);
113-
amountTil = (TextInputLayout) v.findViewById(R.id.rave_amountTil);
114-
initiateChargeLayout = (ConstraintLayout) v.findViewById(R.id.rave_initiate_payment_layout);
115-
transferDetailsLayout = (ConstraintLayout) v.findViewById(R.id.rave_transfer_details_layout);
116-
transferInstructionTv = (TextView) v.findViewById(R.id.rave_bank_transfer_instruction);
117-
transferStatusTv = (TextView) v.findViewById(R.id.rave_transfer_status_tv);
118-
amountTv = (TextView) v.findViewById(R.id.rave_amount_tv);
119-
beneficiaryNameTv = (TextView) v.findViewById(R.id.rave_beneficiary_name_tv);
120-
bankNameTv = (TextView) v.findViewById(R.id.rave_bank_name_tv);
121-
accountNumberTv = (TextView) v.findViewById(R.id.rave_account_number_tv);
122-
payButton = (Button) v.findViewById(R.id.rave_payButton);
123-
verifyPaymentButton = (Button) v.findViewById(R.id.rave_verify_payment_button);
107+
amountEt = v.findViewById(R.id.rave_amountTV);
108+
amountTil = v.findViewById(R.id.rave_amountTil);
109+
initiateChargeLayout = v.findViewById(R.id.rave_initiate_payment_layout);
110+
transferDetailsLayout = v.findViewById(R.id.rave_transfer_details_layout);
111+
transferInstructionTv = v.findViewById(R.id.rave_bank_transfer_instruction);
112+
transferStatusTv = v.findViewById(R.id.rave_transfer_status_tv);
113+
amountTv = v.findViewById(R.id.rave_amount_tv);
114+
beneficiaryNameTv = v.findViewById(R.id.rave_beneficiary_name_tv);
115+
bankNameTv = v.findViewById(R.id.rave_bank_name_tv);
116+
accountNumberTv = v.findViewById(R.id.rave_account_number_tv);
117+
payButton = v.findViewById(R.id.rave_payButton);
118+
verifyPaymentButton = v.findViewById(R.id.rave_verify_payment_button);
124119
}
125120

126121
@Override
@@ -145,7 +140,6 @@ public void showFieldError(int viewID, String message, Class<?> viewType) {
145140

146141

147142
private void verifyPayment() {
148-
showPollingIndicator(true);
149143
presenter.startPaymentVerification();
150144

151145
}

0 commit comments

Comments
 (0)