//INTIAL COMMIT

parent 4bf1cd3a
...@@ -16,6 +16,11 @@ android { ...@@ -16,6 +16,11 @@ android {
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
} }
} }
dexOptions {
incremental true
javaMaxHeapSize "4g"
}
} }
dependencies { dependencies {
...@@ -29,4 +34,7 @@ dependencies { ...@@ -29,4 +34,7 @@ dependencies {
implementation 'com.android.volley:volley:1.1.0'//VOLLEY implementation 'com.android.volley:volley:1.1.0'//VOLLEY
implementation 'de.hdodenhof:circleimageview:2.2.0' //CIRCLE IMAGEVIEw implementation 'de.hdodenhof:circleimageview:2.2.0' //CIRCLE IMAGEVIEw
implementation 'com.squareup.picasso:picasso:2.71828'//PICASSO implementation 'com.squareup.picasso:picasso:2.71828'//PICASSO
implementation 'com.android.support:design:28.0.0'
implementation 'com.toptoche.searchablespinner:searchablespinnerlibrary:1.3.1'
implementation 'com.jsibbold:zoomage:1.2.0-SNAPSHOT'
} }
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.maxmoney.maxcddconsole"> package="com.maxmoney.maxcddconsole">
<uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<application <application
android:allowBackup="true" android:allowBackup="true"
android:hardwareAccelerated="true"
android:icon="@mipmap/ic_launcher" android:icon="@mipmap/ic_launcher"
android:label="@string/app_name" android:label="@string/app_name"
android:largeHeap="true"
android:roundIcon="@drawable/icon_maxmoney" android:roundIcon="@drawable/icon_maxmoney"
android:supportsRtl="true" android:supportsRtl="true"
android:theme="@style/AppThemeNoActionBar"> android:theme="@style/AppThemeNoActionBar"
<activity android:name=".Activity.DashboardActivity"></activity> android:usesCleartextTraffic="true">
<activity android:name=".Activity.CddActivity"></activity>
<activity android:name=".Activity.CddSearchActivity" />
<activity android:name=".Activity.RegistrationActivity" />
<activity android:name=".Activity.ApproveCustomerClickActivity" />
<activity android:name=".Activity.ApproveActivity" />
<activity android:name=".Activity.TopapActivity" />
<activity android:name=".Activity.DashboardActivity" />
<activity android:name=".Activity.LoginActivity"> <activity android:name=".Activity.LoginActivity">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />
...@@ -17,7 +31,7 @@ ...@@ -17,7 +31,7 @@
<category android:name="android.intent.category.LAUNCHER" /> <category android:name="android.intent.category.LAUNCHER" />
</intent-filter> </intent-filter>
</activity> </activity>
<activity android:name=".MainActivity"></activity> <activity android:name=".MainActivity" />
</application> </application>
</manifest> </manifest>
\ No newline at end of file
package com.maxmoney.maxcddconsole.Activity;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.text.Editable;
import android.text.TextWatcher;
import android.util.Log;
import android.view.View;
import android.view.inputmethod.InputMethodManager;
import android.widget.AbsListView;
import android.widget.AdapterView;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.TextView;
import android.widget.Toast;
import com.android.volley.AuthFailureError;
import com.android.volley.DefaultRetryPolicy;
import com.android.volley.RequestQueue;
import com.android.volley.VolleyError;
import com.android.volley.toolbox.StringRequest;
import com.android.volley.toolbox.Volley;
import com.maxmoney.maxcddconsole.Adapter.ApproveUserAdapter;
import com.maxmoney.maxcddconsole.Common.StandardProgressDialog;
import com.maxmoney.maxcddconsole.Connectivity.BasedUrl;
import com.maxmoney.maxcddconsole.R;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import java.io.UnsupportedEncodingException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import static com.android.volley.Request.Method.GET;
public class ApproveActivity extends AppCompatActivity implements View.OnClickListener,AbsListView.OnScrollListener{
EditText editText_email;
public static String session;
StandardProgressDialog standardProgressDialog;
ImageView imageView_back,imageView_refresh;
ListView list_view;
private ApproveUserAdapter mPLAdapter;
private ArrayList<Map<String, String>> data = null;
private int currentPagination = 1;
private int total = 100;
private int pageClick = 0;
Button button_search;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_approve);
standardProgressDialog = new StandardProgressDialog(this.getWindow().getContext());
session = getIntent().getStringExtra("session");
imageView_back = findViewById(R.id.imageView_back);
list_view = findViewById(R.id.list_view);
imageView_refresh = findViewById(R.id.imageView_refresh);
imageView_back.setOnClickListener(this);
imageView_refresh.setOnClickListener(this);
getTotal();
}
@Override
protected void onResume() {
super.onResume();
}
@Override
public void onBackPressed() {
Intent next = new Intent(getApplicationContext(), DashboardActivity.class);
next.putExtra("session",session);
startActivity(next);
}
@Override
public void onClick(View v) {
switch (v.getId()) {
case R.id.imageView_back : {
onBackPressed();
break;
}
case R.id.imageView_refresh : {
currentPagination = 1;
getTotal();
break;
}
}
}
@Override
public void onScrollStateChanged(AbsListView view, int scrollState) {
}
@Override
public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) {
if (totalItemCount >0 && list_view != null) {
int lastPosition = list_view.getLastVisiblePosition();
if (lastPosition + 1 == totalItemCount && data.size() < total) {
currentPagination++;
getListUser();
}
}
}
public void getTotal(){
data = new ArrayList<Map<String, String>>(); // data
mPLAdapter = new ApproveUserAdapter(getApplicationContext(), data);
list_view.setAdapter(mPLAdapter);
list_view.setOnScrollListener(this);
StringRequest stringRequest = new StringRequest(GET, BasedUrl.URL_STAGING +"users?status=inactive&page="+currentPagination,
new com.android.volley.Response.Listener<String>() {
@Override
public void onResponse(String response) {
try {
JSONObject obj1 = new JSONObject(response);
total = Integer.parseInt(obj1.getString("total"));
Log.d("total data omoe", String.valueOf(total));
getListUser();
} catch (JSONException e) {
e.printStackTrace();
}
}
},
new com.android.volley.Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
Toast.makeText(getApplicationContext(), "Please check Internet Connection !!", Toast.LENGTH_LONG).show();
}
}) {
@Override
public Map<String, String> getHeaders() throws AuthFailureError {
HashMap<String, String> headers = new HashMap();
headers.put("api-key",session);
return headers;
}
@Override
protected Map<String, String> getParams() throws AuthFailureError {
Map<String, String> params = new HashMap<String, String>();
params.put("status","inactive");
return params;
}
};
RequestQueue requestQueue = Volley.newRequestQueue(getApplicationContext());
requestQueue.add(stringRequest);
}
public void getListUser(){
StringRequest stringRequest = new StringRequest(GET, BasedUrl.URL_STAGING +"users?status=inactive&page="+currentPagination,
new com.android.volley.Response.Listener<String>() {
@Override
public void onResponse(String response) {
try {
JSONObject obj1 = new JSONObject(response);
JSONArray array = obj1.getJSONArray("users");
for(int i = 0; i< array.length(); i++){
JSONObject product = array.getJSONObject(i);
Map<String, String> addData = new HashMap<String, String>();
addData.put("msg1", product.getString("idNo"));
addData.put("msg2", product.getString("email"));
addData.put("msg3", product.getString("name"));
data.add(addData);
}
mPLAdapter.refreshData(data);
} catch (JSONException e) {
e.printStackTrace();
}
}
},
new com.android.volley.Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
Toast.makeText(getApplicationContext(), "Please check Internet Connection !!", Toast.LENGTH_LONG).show();
}
}) {
@Override
public Map<String, String> getHeaders() throws AuthFailureError {
HashMap<String, String> headers = new HashMap();
headers.put("api-key",session);
return headers;
}
};
RequestQueue requestQueue = Volley.newRequestQueue(getApplicationContext());
requestQueue.add(stringRequest);
}
public void searchByEmail(){
data = new ArrayList<Map<String, String>>(); // data
mPLAdapter = new ApproveUserAdapter(getApplicationContext(), data);
list_view.setAdapter(mPLAdapter);
StringRequest stringRequest = new StringRequest(GET, BasedUrl.URL_STAGING +"users/"+editText_email.getText().toString(),
new com.android.volley.Response.Listener<String>() {
@Override
public void onResponse(String response) {
try {
JSONObject obj1 = new JSONObject(response);
if(obj1.getString("status").equals("inactive")){
Map<String, String> addData = new HashMap<String, String>();
addData.put("msg1", obj1.getString("idNo"));
addData.put("msg2", obj1.getString("email"));
addData.put("msg3", obj1.getString("name"));
data.add(addData);
}else {
Toast.makeText(getApplicationContext(),"This ID already active",Toast.LENGTH_SHORT).show();
}
mPLAdapter.refreshData(data);
} catch (JSONException e) {
e.printStackTrace();
}
}
},
new com.android.volley.Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
parseVolleyError(error);
}
}) {
@Override
public Map<String, String> getHeaders() throws AuthFailureError {
HashMap<String, String> headers = new HashMap();
headers.put("api-key",session);
return headers;
}
};
RequestQueue requestQueue = Volley.newRequestQueue(getApplicationContext());
requestQueue.add(stringRequest);
}
public void parseVolleyError(VolleyError error) {
try {
String responseBody = new String(error.networkResponse.data, "utf-8");
JSONObject data = new JSONObject(responseBody);
if(data.has("message")){
Toast.makeText(getApplicationContext(), data.getString("message"),Toast.LENGTH_SHORT).show();
}else{
Toast.makeText(getApplicationContext(),"Login error",Toast.LENGTH_SHORT).show();
}
} catch (JSONException e) {
} catch (UnsupportedEncodingException errorr) {
}
}
}
package com.maxmoney.maxcddconsole.Activity;
import android.content.DialogInterface;
import android.content.Intent;
import android.media.MediaPlayer;
import android.net.Uri;
import android.os.Bundle;
import android.support.v7.app.AlertDialog;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.View;
import android.view.WindowManager;
import android.widget.Button;
import android.widget.MediaController;
import android.widget.ScrollView;
import android.widget.TextView;
import android.widget.Toast;
import android.widget.VideoView;
import com.android.volley.AuthFailureError;
import com.android.volley.RequestQueue;
import com.android.volley.VolleyError;
import com.android.volley.toolbox.StringRequest;
import com.android.volley.toolbox.Volley;
import com.jsibbold.zoomage.ZoomageView;
import com.maxmoney.maxcddconsole.Connectivity.BasedUrl;
import com.maxmoney.maxcddconsole.R;
import com.squareup.picasso.Picasso;
import org.json.JSONException;
import org.json.JSONObject;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import static com.android.volley.Request.Method.GET;
import static com.android.volley.Request.Method.PUT;
public class ApproveCustomerClickActivity extends AppCompatActivity {
String session = "",email ="";
TextView textView_fullname,textView_status,textView_email,textView_dob,textView_idtype,textView_idNo,textView_nationality,textView_country,
textView_address,textView_mobile,textView_state,textView_city,textView_pep,textView_ofa;
ZoomageView image_back,image_front;
Button button_approve,button_edit,button_reject;
ScrollView main;
VideoView videoView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_approve_customer_click);
this.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);
session = getIntent().getStringExtra("session");
email = getIntent().getStringExtra("email");
textView_fullname = findViewById(R.id.textView_fullname);
textView_status = findViewById(R.id.textView_status);
textView_email = findViewById(R.id.textView_email);
textView_dob = findViewById(R.id.textView_dob);
textView_idtype = findViewById(R.id.textView_idtype);
textView_idNo = findViewById(R.id.textView_idNo);
textView_nationality = findViewById(R.id.textView_nationality);
textView_country = findViewById(R.id.textView_country);
textView_address = findViewById(R.id.textView_address);
textView_mobile = findViewById(R.id.textView_mobile);
textView_state = findViewById(R.id.textView_state);
textView_city = findViewById(R.id.textView_city);
textView_pep = findViewById(R.id.textView_pep);
textView_ofa = findViewById(R.id.textView_ofa);
image_back = findViewById(R.id.image_back);
image_front = findViewById(R.id.image_front);
button_approve = findViewById(R.id.button_approve);
button_edit = findViewById(R.id.button_edit);
button_reject = findViewById(R.id.button_reject);
videoView = findViewById(R.id.videoView);
main = (ScrollView) findViewById(R.id.dealscroll);
getUserDetails();
button_reject.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
dialogReject();
}
});
button_approve.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
dialogApprove();
}
});
}
public void getUserDetails(){
StringRequest stringRequest = new StringRequest(GET, BasedUrl.URL_STAGING +"users/"+email,
new com.android.volley.Response.Listener<String>() {
@Override
public void onResponse(String response) {
try {
JSONObject obj = new JSONObject(response);
textView_fullname.setText(obj.getString("name"));
textView_status.setText(obj.getString("status"));
textView_email.setText(obj.getString("email"));
if(obj.getString("dob").equals("null")){
textView_dob.setText("");
}else{
textView_dob.setText(createDate(Long.parseLong(obj.getString("dob"))));
}
textView_idtype.setText(obj.getString("idType"));
textView_idNo.setText(obj.getString("idNo"));
textView_mobile.setText(obj.getString("mobile"));
if(obj.has("riskProfile")){
JSONObject risk = new JSONObject(obj.getString("riskProfile"));
if(risk.has("cdd")){
JSONObject cdd = new JSONObject(risk.getString("cdd"));
textView_nationality.setText(cdd.getString("nationality"));
textView_country.setText(cdd.getString("nationalityCountry"));
textView_address.setText(cdd.getString("address"));
textView_state.setText(cdd.getString("state"));
textView_city.setText(cdd.getString("city"));
}
}
if(obj.has("images")){
JSONObject img = new JSONObject(obj.getString("images"));
if(obj.getString("idType").equals("Passport")){
String imageBack = BasedUrl.URL_STAGING+"customers/"+obj.getString("idNo")+"/images/"+img.getString("Back")+"?api-key="+session;
String imageFront = BasedUrl.URL_STAGING+"customers/"+obj.getString("idNo")+"/images/"+img.getString("Front")+"?api-key="+session;
Picasso.get().load(imageBack).into(image_back);
Picasso.get().load(imageFront).into(image_front);
}else{
String imageBack = BasedUrl.URL_STAGING+"customers/"+obj.getString("idNo")+"/images/"+img.getString("Back")+"?api-key="+session;
String imageFront = BasedUrl.URL_STAGING+"customers/"+obj.getString("idNo")+"/images/"+img.getString("Front")+"?api-key="+session;
Picasso.get().load(imageBack).into(image_back);
Picasso.get().load(imageFront).into(image_front);
}
}
checkPEP();
checkOfa();
videoView.setOnPreparedListener(new MediaPlayer.OnPreparedListener() {
@Override
public void onPrepared(MediaPlayer mp) {
MediaController mediaController = new MediaController(ApproveCustomerClickActivity.this);
videoView.setMediaController(mediaController);
mediaController.setAnchorView(videoView);
}
});
videoView.setVideoURI(Uri.parse("https://www.maxmoney.com/my/app/android/video/"+textView_idNo.getText().toString()+".mp4"));
videoView.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {
@Override
public void onCompletion(MediaPlayer mediaPlayer) {
}
});
videoView.setOnErrorListener(new MediaPlayer.OnErrorListener() {
@Override
public boolean onError(MediaPlayer mediaPlayer, int i, int i1) {
return false;
}
});
main.post(new Runnable() {
public void run() {
main.scrollTo(0,0);
}
});
} catch (JSONException e) {
e.printStackTrace();
}
}
},
new com.android.volley.Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
}
}) {
@Override
protected Map<String, String> getParams() throws AuthFailureError {
Map<String, String> params = new HashMap<String, String>();
return params;
}
@Override
public Map<String, String> getHeaders() throws AuthFailureError {
HashMap<String, String> headers = new HashMap();
headers.put("api-key",session);
return headers;
}
};
RequestQueue requestQueue = Volley.newRequestQueue(getApplicationContext());
requestQueue.add(stringRequest);
}
public void checkPEP() {
StringRequest stringRequest = new StringRequest(GET, BasedUrl.URL_STAGING +"risks/peps/"+textView_fullname.getText().toString()+"?country="+textView_country.getText().toString(),
new com.android.volley.Response.Listener<String>() {
@Override
public void onResponse(String response) {
try {
JSONObject check = new JSONObject(response);
if(check.getString("total").equals("0")){
textView_pep.setText("NO");
}else{
textView_pep.setText("YES");
}
} catch (JSONException e) {
e.printStackTrace();
}
}
},
new com.android.volley.Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
}
}) {
@Override
protected Map<String, String> getParams() throws AuthFailureError {
Map<String, String> params = new HashMap<String, String>();
return params;
}
@Override
public Map<String, String> getHeaders() throws AuthFailureError {
HashMap<String, String> headers = new HashMap();
headers.put("api-key",session);
return headers;
}
};
RequestQueue requestQueue = Volley.newRequestQueue(getApplicationContext());
requestQueue.add(stringRequest);
}
public void checkOfa(){
StringRequest stringRequest = new StringRequest(GET, BasedUrl.URL_STAGING +"risks/ofac/"+textView_fullname.getText().toString(),
new com.android.volley.Response.Listener<String>() {
@Override
public void onResponse(String response) {
try {
JSONObject check = new JSONObject(response);
if(check.getString("total").equals("0")){
textView_ofa.setText("NO");
}else{
textView_ofa.setText("YES");
}
} catch (JSONException e) {
e.printStackTrace();
}
}
},
new com.android.volley.Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
}
}) {
@Override
protected Map<String, String> getParams() throws AuthFailureError {
Map<String, String> params = new HashMap<String, String>();
return params;
}
@Override
public Map<String, String> getHeaders() throws AuthFailureError {
HashMap<String, String> headers = new HashMap();
headers.put("api-key",session);
return headers;
}
};
RequestQueue requestQueue = Volley.newRequestQueue(getApplicationContext());
requestQueue.add(stringRequest);
}
public CharSequence createDate(long timestamp) {
Calendar c = Calendar.getInstance();
c.setTimeInMillis(timestamp);
Date d = c.getTime();
SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
return sdf.format(d);
}
public void dialogReject(){
AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(this);
alertDialogBuilder.setMessage("Are you sure want to reject this?");
alertDialogBuilder.setPositiveButton("Yes",
new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface arg0, int arg1) {
rejectUser();
}
});
alertDialogBuilder.setNegativeButton("No",new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
dialog.dismiss();
}
});
alertDialogBuilder.setCancelable(false);
AlertDialog alertDialog = alertDialogBuilder.create();
alertDialog.show();
}
public void dialogApprove(){
AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(this);
alertDialogBuilder.setMessage("Are you sure want to Approve this?");
alertDialogBuilder.setPositiveButton("Yes",
new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface arg0, int arg1) {
approveUser();
}
});
alertDialogBuilder.setNegativeButton("No",new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
dialog.dismiss();
}
});
alertDialogBuilder.setCancelable(false);
AlertDialog alertDialog = alertDialogBuilder.create();
alertDialog.show();
}
public void rejectUser(){
StringRequest stringRequest = new StringRequest(PUT, BasedUrl.URL_STAGING +"users/"+textView_email.getText().toString(),
new com.android.volley.Response.Listener<String>() {
@Override
public void onResponse(String response) {
Toast.makeText(getApplicationContext(),"User Removed",Toast.LENGTH_SHORT).show();
Intent next = new Intent(getApplicationContext(),ApproveActivity.class);
next.putExtra("session",session);
startActivity(next);
}
},
new com.android.volley.Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
}
}) {
@Override
protected Map<String, String> getParams() throws AuthFailureError {
Map<String, String> params = new HashMap<String, String>();
params.put("status","removed");
params.put("requestSource","agent");
return params;
}
@Override
public Map<String, String> getHeaders() throws AuthFailureError {
HashMap<String, String> headers = new HashMap();
headers.put("api-key",session);
return headers;
}
};
RequestQueue requestQueue = Volley.newRequestQueue(getApplicationContext());
requestQueue.add(stringRequest);
}
public void approveUser(){
StringRequest stringRequest = new StringRequest(PUT, BasedUrl.URL_STAGING +"users/"+textView_email.getText().toString(),
new com.android.volley.Response.Listener<String>() {
@Override
public void onResponse(String response) {
Toast.makeText(getApplicationContext(),"User Approve",Toast.LENGTH_SHORT).show();
Intent next = new Intent(getApplicationContext(),ApproveActivity.class);
next.putExtra("session",session);
startActivity(next);
}
},
new com.android.volley.Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
}
}) {
@Override
protected Map<String, String> getParams() throws AuthFailureError {
Map<String, String> params = new HashMap<String, String>();
params.put("status","active");
params.put("requestSource","agent");
return params;
}
@Override
public Map<String, String> getHeaders() throws AuthFailureError {
HashMap<String, String> headers = new HashMap();
headers.put("api-key",session);
return headers;
}
};
RequestQueue requestQueue = Volley.newRequestQueue(getApplicationContext());
requestQueue.add(stringRequest);
}
}
package com.maxmoney.maxcddconsole.Activity;
import android.content.ContentValues;
import android.content.Intent;
import android.graphics.Bitmap;
import android.net.Uri;
import android.os.Bundle;
import android.provider.MediaStore;
import android.support.v7.app.AppCompatActivity;
import android.util.Base64;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.Spinner;
import android.widget.TextView;
import android.widget.Toast;
import com.android.volley.AuthFailureError;
import com.android.volley.DefaultRetryPolicy;
import com.android.volley.Request;
import com.android.volley.RequestQueue;
import com.android.volley.Response;
import com.android.volley.RetryPolicy;
import com.android.volley.VolleyError;
import com.android.volley.toolbox.StringRequest;
import com.android.volley.toolbox.Volley;
import com.maxmoney.maxcddconsole.Common.StandardProgressDialog;
import com.maxmoney.maxcddconsole.R;
import org.json.JSONException;
import org.json.JSONObject;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
public class CddActivity extends AppCompatActivity {
String token,idType = "",idNo = "",email = "",customerName = "";
StandardProgressDialog standardProgressDialog;
TextView textView_name,textView_idNo;
Spinner spinner_business,spinner_sourceIncome;
ImageView imageView_front_ic,imageView_back_ic,imageView_front_passport,imageView_back_passport,imageView_back;
LinearLayout linear_passport,linear_ic;
Button button_next;
Uri file_front,file_back;
private static final int CAMERA_FRONT = 1;
private static final int CAMERA_BACK = 2;
String front_doc = "",back_doc ="";
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_cdd);
standardProgressDialog = new StandardProgressDialog(this.getWindow().getContext());
token = getIntent().getStringExtra("session");
idType = getIntent().getStringExtra("idType");
idNo = getIntent().getStringExtra("idNo");
email = getIntent().getStringExtra("email");
customerName = getIntent().getStringExtra("customerName");
textView_name = findViewById(R.id.textView_name);
textView_idNo = findViewById(R.id.textView_idNo);
spinner_business = findViewById(R.id.spinner_business);
spinner_sourceIncome = findViewById(R.id.spinner_sourceIncome);
imageView_front_ic = findViewById(R.id.imageView_front_ic);
imageView_back_ic = findViewById(R.id.imageView_back_ic);
imageView_front_passport = findViewById(R.id.imageView_front_passport);
imageView_back_passport = findViewById(R.id.imageView_back_passport);
imageView_back = findViewById(R.id.imageView_back);
linear_passport = findViewById(R.id.linear_passport);
linear_ic = findViewById(R.id.linear_ic);
button_next = findViewById(R.id.button_next);
imageView_back.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
onBackPressed();
}
});
if(idType.equals("Passport")){
linear_passport.setVisibility(View.VISIBLE);
linear_ic.setVisibility(View.GONE);
imageView_front_passport.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
frontCamera();
}
});
imageView_back_passport.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
backCamera();
}
});
}else{
linear_passport.setVisibility(View.GONE);
linear_ic.setVisibility(View.VISIBLE);
imageView_front_ic.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
frontCamera();
}
});
imageView_back_ic.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
backCamera();
}
});
}
button_next.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if(spinner_business.getSelectedItem().toString().equals("Please choose nature of business")){
Toast.makeText(getApplicationContext(),"Please choose nature of business",Toast.LENGTH_SHORT).show();
}else if(spinner_sourceIncome.getSelectedItem().toString().equals("Please choose source of income")){
Toast.makeText(getApplicationContext(),"Please choose source of income",Toast.LENGTH_SHORT).show();
}else if(front_doc.equals("")){
Toast.makeText(getApplicationContext(),"Please upload front document",Toast.LENGTH_SHORT).show();
}else if(back_doc.equals("")){
Toast.makeText(getApplicationContext(),"Please upload back document",Toast.LENGTH_SHORT).show();
}else{
standardProgressDialog.show();
RegisterCdd();
}
}
});
}
@Override
protected void onResume() {
super.onResume();
textView_name.setText(customerName);
textView_idNo.setText(idNo);
}
@Override
public void onBackPressed() {
super.onBackPressed();
}
public void frontCamera() {
ContentValues values = new ContentValues(1);
values.put(MediaStore.Images.Media.MIME_TYPE, "documentFront.jpg");
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
file_front = getContentResolver().insert(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, values);
intent.putExtra(MediaStore.EXTRA_OUTPUT, file_front);
startActivityForResult(intent, CAMERA_FRONT);
}
public void backCamera() {
ContentValues values = new ContentValues(1);
values.put(MediaStore.Images.Media.MIME_TYPE, "documentBack.jpg");
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
file_back = getContentResolver().insert(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, values);
intent.putExtra(MediaStore.EXTRA_OUTPUT, file_back);
startActivityForResult(intent, CAMERA_BACK);
}
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
if (resultCode == RESULT_OK) {
if(requestCode == CAMERA_FRONT){
Uri uri = file_front;
try {
Bitmap bitmap = MediaStore.Images.Media.getBitmap(this.getContentResolver(), uri);
front_doc = getStringImage(bitmap);
Log.d("bitmap", String.valueOf(bitmap));
if(idType.equals("Passport")){
imageView_front_passport.setImageBitmap(bitmap);
}else{
imageView_front_ic.setImageBitmap(bitmap);
}
} catch (IOException e) {
e.printStackTrace();
}
}
if(requestCode == CAMERA_BACK){
Uri uri = file_back;
try {
Bitmap bitmap = MediaStore.Images.Media.getBitmap(this.getContentResolver(), uri);
back_doc = getStringImage(bitmap);
if(idType.equals("Passport")){
imageView_back_passport.setImageBitmap(bitmap);
}else{
imageView_back_ic.setImageBitmap(bitmap);
}
} catch (IOException e) {
e.printStackTrace();
}
}
}
}
public String getStringImage(Bitmap bmp) {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
bmp.compress(Bitmap.CompressFormat.JPEG, 30, baos);
byte[] imageBytes = baos.toByteArray();
final String imageString = Base64.encodeToString(imageBytes, Base64.DEFAULT);
return imageString;
}
public void RegisterCdd(){
String URLs = "https://www.maxmoney.com/cdd-app/process/register_max_cdd_apps.php";
final StringRequest stringRequest = new StringRequest(Request.Method.POST, URLs,
new Response.Listener<String>() {
@Override
public void onResponse(String response) {
standardProgressDialog.dismiss();
try {
JSONObject obj = new JSONObject(response);
if (obj.getString("status").equals("false")) {
if(obj.getString("message").equals("Authentication failed")){
standardProgressDialog.dismiss();
Toast.makeText(getApplicationContext(), obj.getString("message") + "Please Try Again", Toast.LENGTH_LONG).show();
}else{
standardProgressDialog.dismiss();
Toast.makeText(getApplicationContext(), obj.getString("message") + "Please Try Again", Toast.LENGTH_LONG).show();
}
}else{
standardProgressDialog.dismiss();
Toast.makeText(getApplicationContext(), "Cdd successful", Toast.LENGTH_LONG).show();
Intent next = new Intent(getApplicationContext(),DashboardActivity.class);
next.putExtra("session",token);
startActivity(next);
}
} catch (JSONException e) {
standardProgressDialog.dismiss();
e.printStackTrace();
}
}
},
new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
standardProgressDialog.dismiss();
}
}) {
@Override
protected Map<String, String> getParams () throws AuthFailureError {
Map<String, String> params = new HashMap<String, String>();
params.put("token",token+"");
params.put("idNo", idNo);
params.put("natureOfBusiness",spinner_business.getSelectedItem().toString());
params.put("incomeSource",spinner_sourceIncome.getSelectedItem().toString());
params.put("email", email);
params.put("idType", idType);
params.put("front", front_doc+"");
params.put("back",back_doc+"");
return params;
}
};
int socketTimeout = 30000;
RetryPolicy policy = new DefaultRetryPolicy(socketTimeout, DefaultRetryPolicy.DEFAULT_MAX_RETRIES, DefaultRetryPolicy.DEFAULT_BACKOFF_MULT);
stringRequest.setRetryPolicy(policy);
RequestQueue requestQueue = Volley.newRequestQueue(this);
requestQueue.add(stringRequest);
}
}
package com.maxmoney.maxcddconsole.Activity;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.AdapterView;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import android.widget.Toast;
import com.android.volley.AuthFailureError;
import com.android.volley.RequestQueue;
import com.android.volley.VolleyError;
import com.android.volley.toolbox.StringRequest;
import com.android.volley.toolbox.Volley;
import com.maxmoney.maxcddconsole.Common.StandardProgressDialog;
import com.maxmoney.maxcddconsole.Connectivity.BasedUrl;
import com.maxmoney.maxcddconsole.R;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import java.util.HashMap;
import java.util.Map;
import static com.android.volley.Request.Method.GET;
public class CddSearchActivity extends AppCompatActivity {
String session = "";
StandardProgressDialog standardProgressDialog;
ImageView imageView_back;
EditText editText_idNo;
Button button_search;
TextView textView_name;
LinearLayout linear_customer_name;
String idType = "",idNo = "",email = "",customerName = "";
TextView textView_continue;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_cdd_search);
standardProgressDialog = new StandardProgressDialog(this.getWindow().getContext());
session = getIntent().getStringExtra("session");
imageView_back = findViewById(R.id.imageView_back);
editText_idNo = findViewById(R.id.editText_idNo);
button_search = findViewById(R.id.button_search);
textView_name = findViewById(R.id.textView_name);
linear_customer_name = findViewById(R.id.linear_customer_name);
textView_continue = findViewById(R.id.textView_continue);
button_search.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if(editText_idNo.getText().toString().equals("")){
editText_idNo.setError("Please fill the value");
}else{
SearchUser();
}
}
});
imageView_back.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
onBackPressed();
}
});
}
@Override
protected void onResume() {
super.onResume();
linear_customer_name.setVisibility(View.GONE);
textView_continue.setVisibility(View.GONE);
}
@Override
public void onBackPressed() {
super.onBackPressed();
}
public void SearchUser(){
StringRequest stringRequest = new StringRequest(GET, BasedUrl.URL_STAGING +"customers/"+editText_idNo.getText().toString(),
new com.android.volley.Response.Listener<String>() {
@Override
public void onResponse(final String response) {
standardProgressDialog.dismiss();
try {
JSONObject obj = new JSONObject(response);
if(obj.getString("status").equals("Unapproved")){
linear_customer_name.setVisibility(View.VISIBLE);
textView_continue.setVisibility(View.VISIBLE);
textView_name.setText(obj.getString("customerName"));
idType = obj.getString("idType");
idNo = obj.getString("idNo");
email = obj.getString("email");
customerName = obj.getString("customerName");
textView_continue.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent next = new Intent(getApplicationContext(),CddActivity.class);
next.putExtra("customerName",customerName);
next.putExtra("email",email);
next.putExtra("idNo",idNo);
next.putExtra("idType",idType);
next.putExtra("session",session);
startActivity(next);
}
});
}else{
linear_customer_name.setVisibility(View.GONE);
textView_continue.setVisibility(View.GONE);
Toast.makeText(getApplicationContext(),"Customer not found",Toast.LENGTH_SHORT).show();
}
} catch (JSONException e) {
e.printStackTrace();
}
}
},
new com.android.volley.Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
standardProgressDialog.dismiss();
linear_customer_name.setVisibility(View.GONE);
textView_continue.setVisibility(View.GONE);
Toast.makeText(getApplicationContext(),"Customer not found",Toast.LENGTH_SHORT).show();
}
}) {
@Override
protected Map<String, String> getParams() throws AuthFailureError {
Map<String, String> params = new HashMap<String, String>();
return params;
}
@Override
public Map<String, String> getHeaders() throws AuthFailureError {
HashMap<String, String> headers = new HashMap();
headers.put("api-key",session);
return headers;
}
};
RequestQueue requestQueue = Volley.newRequestQueue(getApplicationContext());
requestQueue.add(stringRequest);
}
}
...@@ -36,9 +36,12 @@ public class DashboardActivity extends AppCompatActivity implements View.OnClick ...@@ -36,9 +36,12 @@ public class DashboardActivity extends AppCompatActivity implements View.OnClick
String session = "",user_role = "",email =""; String session = "",user_role = "",email ="";
StandardProgressDialog standardProgressDialog; StandardProgressDialog standardProgressDialog;
Button button_approve,button_registration,button_cdd,button_userSearch,button_topap,button_logout;
LinearLayout linear_balance; LinearLayout linear_balance;
TextView textView_balance,textView_title; TextView textView_balance,textView_title;
Button button_logout;
LinearLayout linear_customer_main,linear_topap_main,linear_complience;
LinearLayout linear_customer_all,linear_cdd,linear_user_all,linear_topap,linear_approve,linear_user_search_c;
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
...@@ -47,18 +50,29 @@ public class DashboardActivity extends AppCompatActivity implements View.OnClick ...@@ -47,18 +50,29 @@ public class DashboardActivity extends AppCompatActivity implements View.OnClick
standardProgressDialog = new StandardProgressDialog(this.getWindow().getContext()); standardProgressDialog = new StandardProgressDialog(this.getWindow().getContext());
session = getIntent().getStringExtra("session"); session = getIntent().getStringExtra("session");
button_approve = findViewById(R.id.button_approve);
button_registration = findViewById(R.id.button_registration);
button_cdd = findViewById(R.id.button_cdd);
button_userSearch = findViewById(R.id.button_userSearch);
button_topap = findViewById(R.id.button_topap);
button_logout = findViewById(R.id.button_logout);
linear_balance = findViewById(R.id.linear_balance);
textView_balance = findViewById(R.id.textView_balance); textView_balance = findViewById(R.id.textView_balance);
textView_title = findViewById(R.id.textView_title); textView_title = findViewById(R.id.textView_title);
standardProgressDialog.show(); standardProgressDialog.show();
button_logout = findViewById(R.id.button_logout);
linear_customer_main = findViewById(R.id.linear_customer_main);
linear_topap_main = findViewById(R.id.linear_topap_main);
linear_complience = findViewById(R.id.linear_complience);
linear_balance = findViewById(R.id.linear_balance);
linear_customer_all = findViewById(R.id.linear_customer_all);
linear_cdd = findViewById(R.id.linear_cdd);
linear_user_all = findViewById(R.id.linear_user_all);
linear_topap = findViewById(R.id.linear_topap);
linear_approve = findViewById(R.id.linear_approve);
linear_user_search_c = findViewById(R.id.linear_user_search_c);
button_logout.setOnClickListener(this); button_logout.setOnClickListener(this);
linear_topap.setOnClickListener(this);
linear_approve.setOnClickListener(this);
linear_customer_all.setOnClickListener(this); //REGISTER CUSTOMER
linear_cdd.setOnClickListener(this); // CDD SEARCH
getUserDetails(); getUserDetails();
...@@ -78,13 +92,12 @@ public class DashboardActivity extends AppCompatActivity implements View.OnClick ...@@ -78,13 +92,12 @@ public class DashboardActivity extends AppCompatActivity implements View.OnClick
textView_title.setText(obj.getString("username")+" / "+obj.getString("role")); textView_title.setText(obj.getString("username")+" / "+obj.getString("role"));
if(user_role.equals("maxCddOfficer") || user_role.equals("cddOfficer") || user_role.equals("complianceManager")){ if(user_role.equals("maxCddOfficer") || user_role.equals("cddOfficer") || user_role.equals("complianceManager")){
if(user_role.equals("maxCddOfficer") || user_role.equals("cddOfficer") || user_role.equals("maxAgents")){ if(user_role.equals("maxCddOfficer") || user_role.equals("cddOfficer") || user_role.equals("maxAgents")){
button_approve.setVisibility(View.GONE); linear_complience.setVisibility(View.GONE);
getTopapBalance(); getTopapBalance();
}else if(user_role.equals("complianceManager")){ }else if(user_role.equals("complianceManager")){
button_registration.setVisibility(View.GONE); linear_customer_main.setVisibility(View.GONE);
linear_balance.setVisibility(View.GONE); linear_balance.setVisibility(View.GONE);
button_cdd.setVisibility(View.GONE); linear_topap_main.setVisibility(View.GONE);
button_topap.setVisibility(View.GONE);
} }
}else{ }else{
Toast.makeText(getApplicationContext(),"Cannot use "+user_role.toString().toUpperCase()+" ID",Toast.LENGTH_LONG).show(); Toast.makeText(getApplicationContext(),"Cannot use "+user_role.toString().toUpperCase()+" ID",Toast.LENGTH_LONG).show();
...@@ -186,8 +199,33 @@ public class DashboardActivity extends AppCompatActivity implements View.OnClick ...@@ -186,8 +199,33 @@ public class DashboardActivity extends AppCompatActivity implements View.OnClick
logout(); logout();
break; break;
} }
case R.id.linear_topap : {
Intent next = new Intent(getApplicationContext(), TopapActivity.class);
next.putExtra("session",session);
startActivity(next);
break;
}
case R.id.linear_approve: {
Intent next = new Intent(getApplicationContext(), ApproveActivity.class);
next.putExtra("session",session);
startActivity(next);
break;
}
case R.id.linear_customer_all: {
Intent next = new Intent(getApplicationContext(), RegistrationActivity.class);
next.putExtra("session",session);
startActivity(next);
break;
}
case R.id.linear_cdd: {
Intent next = new Intent(getApplicationContext(), CddSearchActivity.class);
next.putExtra("session",session);
startActivity(next);
break;
}
} }
} }
......
package com.maxmoney.maxcddconsole.Activity; package com.maxmoney.maxcddconsole.Activity;
import android.Manifest;
import android.content.Intent; import android.content.Intent;
import android.os.Handler; import android.os.Handler;
import android.support.v4.app.ActivityCompat;
import android.support.v7.app.AppCompatActivity; import android.support.v7.app.AppCompatActivity;
import android.os.Bundle; import android.os.Bundle;
import android.util.Log; import android.util.Log;
...@@ -41,6 +43,9 @@ public class LoginActivity extends AppCompatActivity { ...@@ -41,6 +43,9 @@ public class LoginActivity extends AppCompatActivity {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setContentView(R.layout.activity_login); setContentView(R.layout.activity_login);
ActivityCompat.requestPermissions(LoginActivity.this,
new String[]{Manifest.permission.CAMERA, Manifest.permission.READ_EXTERNAL_STORAGE, Manifest.permission.WRITE_EXTERNAL_STORAGE},1);
standardProgressDialog = new StandardProgressDialog(this.getWindow().getContext()); standardProgressDialog = new StandardProgressDialog(this.getWindow().getContext());
editText_email = findViewById(R.id.editText_email); editText_email = findViewById(R.id.editText_email);
editText_password = findViewById(R.id.editText_password); editText_password = findViewById(R.id.editText_password);
......
package com.maxmoney.maxcddconsole.Activity;
import android.content.Intent;
import android.support.annotation.NonNull;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.text.Editable;
import android.text.TextWatcher;
import android.util.Log;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import android.widget.Spinner;
import android.widget.Toast;
import com.android.volley.AuthFailureError;
import com.android.volley.RequestQueue;
import com.android.volley.VolleyError;
import com.android.volley.toolbox.StringRequest;
import com.android.volley.toolbox.Volley;
import com.maxmoney.maxcddconsole.Common.StandardProgressDialog;
import com.maxmoney.maxcddconsole.Connectivity.BasedUrl;
import com.maxmoney.maxcddconsole.R;
import com.toptoche.searchablespinnerlibrary.SearchableSpinner;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import java.io.IOException;
import java.io.InputStream;
import java.io.UnsupportedEncodingException;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.HashMap;
import java.util.Map;
import static com.android.volley.Request.Method.POST;
public class RegistrationActivity extends AppCompatActivity {
StandardProgressDialog standardProgressDialog;
LinearLayout linear_dob,linear_nric,linear_passport;
EditText editText_email,editText_fullname,editText_dob,editText_nric,editText_passport,editText_address,editText_city,
editText_postalCode,editText_mobile;
Spinner spinner_state;
SearchableSpinner spinner_nationality;
Button button_register;
RadioGroup radioGroup_accType,radioGroup_idType;
TextWatcher tw;
ArrayAdapter<String> spinnerNationalityAdapter;
String nationality = "",session ="";
RadioButton radioButton_passport,radioButton_nric,radioButton_personal,radioButton_business;
ImageView imageView_back;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_registration);
standardProgressDialog = new StandardProgressDialog(this.getWindow().getContext());
session = getIntent().getStringExtra("session");
tw = ValidationBirthday();
linear_dob = findViewById(R.id.linear_dob);
linear_nric = findViewById(R.id.linear_nric);
linear_passport = findViewById(R.id.linear_passport);
editText_email = findViewById(R.id.editText_email);
editText_fullname = findViewById(R.id.editText_fullname);
editText_dob = findViewById(R.id.editText_dob);
editText_nric = findViewById(R.id.editText_nric);
editText_passport = findViewById(R.id.editText_passport);
editText_address = findViewById(R.id.editText_address);
editText_city = findViewById(R.id.editText_city);
editText_postalCode = findViewById(R.id.editText_postalCode);
editText_mobile = findViewById(R.id.editText_mobile);
radioGroup_accType = findViewById(R.id.radioGroup_accType);
radioGroup_idType = findViewById(R.id.radioGroup_idType);
radioButton_passport = findViewById(R.id.radioButton_passport);
radioButton_nric = findViewById(R.id.radioButton_nric);
radioButton_personal = findViewById(R.id.radioButton_personal);
radioButton_business = findViewById(R.id.radioButton_business);
spinner_state = findViewById(R.id.spinner_state);
spinner_nationality = findViewById(R.id.spinner_nationality);
button_register = findViewById(R.id.button_register);
imageView_back = findViewById(R.id.imageView_back);
radioButton_passport.setEnabled(false);
radioButton_nric.setEnabled(false);
radioButton_personal.setEnabled(false);
radioButton_business.setEnabled(false);
button_register.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if(editText_email.getText().toString().equals("")){
editText_email.setError("Please fill the value");
}else if(editText_fullname.getText().toString().equals("")){
editText_fullname.setError("Please fill the value");
}else if(editText_fullname.getText().toString().equals("")){
editText_fullname.setError("Please fill the value");
}else if(editText_address.getText().toString().equals("")){
editText_address.setError("Please fill the value");
}else if(editText_city.getText().toString().equals("")){
editText_city.setError("Please fill the value");
}else if(editText_postalCode.getText().toString().equals("")){
editText_postalCode.setError("Please fill the value");
}else{
RegisterCustomer();
}
}
});
imageView_back.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
onBackPressed();
}
});
}
@Override
protected void onResume() {
super.onResume();
spinnerNationality();
editText_dob.addTextChangedListener(tw);
}
@NonNull
private TextWatcher ValidationBirthday() {
return new TextWatcher() {
private String current = "";
private String ddmmyyyy = "DDMMYYYY";
private Calendar cal = Calendar.getInstance();
@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {
if (!s.toString().equals(current)) {
String clean = s.toString().replaceAll("[^\\d.]|\\.", "");
String cleanC = current.replaceAll("[^\\d.]|\\.", "");
int cl = clean.length();
int sel = cl;
for (int i = 2; i <= cl && i < 6; i += 2) {
sel++;
}
if (clean.equals(cleanC)) sel--;
if (clean.length() < 8) {
clean = clean + ddmmyyyy.substring(clean.length());
} else {
int day = Integer.parseInt(clean.substring(0, 2));
int mon = Integer.parseInt(clean.substring(2, 4));
int year = Integer.parseInt(clean.substring(4, 8));
mon = mon < 1 ? 1 : mon > 12 ? 12 : mon;
cal.set(Calendar.MONTH, mon - 1);
year = (year < 1900) ? 1900 : (year > 2100) ? 2100 : year;
cal.set(Calendar.YEAR, year);
day = (day > cal.getActualMaximum(Calendar.DATE)) ? cal.getActualMaximum(Calendar.DATE) : day;
clean = String.format("%02d%02d%02d", day, mon, year);
}
clean = String.format("%s-%s-%s", clean.substring(0, 2),
clean.substring(2, 4),
clean.substring(4, 8));
sel = sel < 0 ? 0 : sel;
current = clean;
editText_dob.setText(current);
editText_dob.setSelection(sel < current.length() ? sel : current.length());
}
}
@Override
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
}
@Override
public void afterTextChanged(Editable s) {
}
};
}
public void spinnerNationality(){
try {
JSONObject obj = new JSONObject(readJSONFromAsset());
JSONArray array = obj.getJSONArray("country");
ArrayList<String> list = new ArrayList<String>();
for(int i=0; i<array.length(); i++) {
JSONObject yeah = array.getJSONObject(i);
list.add(yeah.getString("name"));
}
spinnerNationalityAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_dropdown_item, list);
spinner_nationality.setTitle("Choose Country");
spinner_nationality.setAdapter(spinnerNationalityAdapter);
spinner_nationality.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
String spinner = parent.getItemAtPosition(position).toString();
try {
JSONObject obj = new JSONObject(readJSONFromAsset());
JSONArray array = obj.getJSONArray("country");
for(int i = 0; i < array.length();i++){
JSONObject yeah = array.getJSONObject(i);
if(spinner.equals("Israel")){
Toast.makeText(getApplicationContext(),"COUNTRY NOT EXIST",Toast.LENGTH_SHORT).show();
Intent next = new Intent(getApplicationContext(), LoginActivity.class);
startActivity(next);
}else if(spinner.equals(yeah.getString("name"))){
nationality = yeah.getString("nationality");
Log.d("Nationality",nationality);
if(nationality.equals("Malaysian")){
linear_dob.setVisibility(View.GONE);
linear_passport.setVisibility(View.GONE);
linear_nric.setVisibility(View.VISIBLE);
radioButton_nric.setChecked(true);
radioButton_personal.setChecked(true);
}else{
linear_dob.setVisibility(View.VISIBLE);
linear_passport.setVisibility(View.VISIBLE);
linear_nric.setVisibility(View.GONE);
radioButton_passport.setChecked(true);
radioButton_personal.setChecked(true);
}
}
}
}catch (JSONException e){
e.printStackTrace();
}
}
public void onNothingSelected(AdapterView<?> parent) {
}
});
} catch (JSONException e) {
e.printStackTrace();
}
}
public String readJSONFromAsset() {
String json = null;
try {
InputStream is = getAssets().open("countries.json");
int size = is.available();
byte[] buffer = new byte[size];
is.read(buffer);
is.close();
json = new String(buffer, "UTF-8");
} catch (IOException ex) {
ex.printStackTrace();
return null;
}
return json;
}
public void RegisterCustomer(){
standardProgressDialog.show();
StringRequest stringRequest = new StringRequest(POST, BasedUrl.URL_STAGING +"customers",
new com.android.volley.Response.Listener<String>() {
@Override
public void onResponse(String response) {
standardProgressDialog.dismiss();
Toast.makeText(getApplicationContext(),"Customer Register",Toast.LENGTH_SHORT).show();
Intent next = new Intent(getApplicationContext(),CddActivity.class);
next.putExtra("customerName",editText_fullname.getText().toString());
next.putExtra("email",editText_email.getText().toString());
if(nationality.equals("Malaysian")){
next.putExtra("idNo",editText_nric.getText().toString());
next.putExtra("idType","NRIC");
}else{
next.putExtra("idNo",editText_passport.getText().toString());
next.putExtra("idType","Passport");
}
next.putExtra("session",session);
startActivity(next);
}
},
new com.android.volley.Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
standardProgressDialog.dismiss();
parseVolleyError(error);
}
}) {
@Override
protected Map<String, String> getParams() throws AuthFailureError {
Map<String, String> params = new HashMap<String, String>();
params.put("customerName",editText_fullname.getText().toString());
params.put("email",editText_email.getText().toString());
params.put("mobile",editText_mobile.getText().toString());
params.put("address",editText_address.getText().toString());
params.put("city",editText_city.getText().toString());
params.put("postalCode",editText_postalCode.getText().toString());
params.put("country","Malaysia");
params.put("idExpiryDate","31-12-2100");
if(spinner_state.getSelectedItem().toString().toUpperCase().equals("KUALA LUMPUR")){
params.put("state","KUALA_LUMPUR");
}else if(spinner_state.getSelectedItem().toString().toUpperCase().equals("NEGERI SEMBILAN")){
params.put("state","KUALA_LUMPUR");
}else{
params.put("state",spinner_state.getSelectedItem().toString().toUpperCase());
}
params.put("nationalityCountry",spinner_nationality.getSelectedItem().toString());
if(nationality.equals("Malaysian")){
params.put("nationality",nationality);
params.put("idType","NRIC");
params.put("type","Individual");
params.put("idNo",editText_nric.getText().toString());
}else{
params.put("nationality",nationality);
params.put("idType","Passport");
params.put("type","Individual");
params.put("idNo",editText_passport.getText().toString());
params.put("dob",editText_dob.getText().toString());
}
return params;
}
};
RequestQueue requestQueue = Volley.newRequestQueue(getApplicationContext());
requestQueue.add(stringRequest);
}
public void parseVolleyError(VolleyError error) {
try {
String responseBody = new String(error.networkResponse.data, "utf-8");
JSONObject data = new JSONObject(responseBody);
Toast.makeText(getApplicationContext(),data.getString("description"),Toast.LENGTH_SHORT).show();
} catch (JSONException e) {
} catch (UnsupportedEncodingException errorr) {
}
}
@Override
public void onBackPressed() {
super.onBackPressed();
}
}
package com.maxmoney.maxcddconsole.Activity;
import android.content.Intent;
import android.media.Image;
import android.support.design.widget.TextInputEditText;
import android.support.v7.app.AlertDialog;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.Spinner;
import android.widget.TextView;
import android.widget.Toast;
import com.android.volley.AuthFailureError;
import com.android.volley.RequestQueue;
import com.android.volley.VolleyError;
import com.android.volley.toolbox.StringRequest;
import com.android.volley.toolbox.Volley;
import com.maxmoney.maxcddconsole.Common.StandardProgressDialog;
import com.maxmoney.maxcddconsole.Connectivity.BasedUrl;
import com.maxmoney.maxcddconsole.R;
import com.toptoche.searchablespinnerlibrary.SearchableSpinner;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import java.io.IOException;
import java.io.InputStream;
import java.io.UnsupportedEncodingException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import static com.android.volley.Request.Method.GET;
import static com.android.volley.Request.Method.POST;
public class TopapActivity extends AppCompatActivity implements View.OnClickListener {
ImageView imageView_back;
SearchableSpinner spinner_country;
EditText editText_receiver,editText_sender;
TextView textView_receiver,textView_sender;
Button button_operator,button_topap;
TextInputEditText et_reference;
String session = "",operatorId="",retails_value = "",value="",whosale_price ="";
StandardProgressDialog standardProgressDialog;
ArrayAdapter<String> spinnerNationalityAdapter;
LinearLayout linear_sender,linear_reference;
AlertDialog.Builder mBuilderOperator;
AlertDialog mDialogOperator;
ArrayList<String> operatorNames;
ArrayList<String> valueNames;
boolean status_operator = false;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_topap);
standardProgressDialog = new StandardProgressDialog(this.getWindow().getContext());
session = getIntent().getStringExtra("session");
imageView_back = findViewById(R.id.imageView_back);
spinner_country = findViewById(R.id.spinner_country);
editText_receiver = findViewById(R.id.editText_receiver);
editText_sender = findViewById(R.id.editText_sender);
textView_receiver = findViewById(R.id.textView_receiver);
textView_sender = findViewById(R.id.textView_sender);
button_operator = findViewById(R.id.button_operator);
button_topap = findViewById(R.id.button_topap);
et_reference = findViewById(R.id.et_reference);
linear_sender = findViewById(R.id.linear_sender);
linear_reference = findViewById(R.id.linear_reference);
imageView_back.setOnClickListener(this);
button_operator.setOnClickListener(this);
button_topap.setOnClickListener(this);
spinnerNationality();
}
public void spinnerNationality(){
try {
JSONObject obj = new JSONObject(readJSONFromAsset());
JSONArray array = obj.getJSONArray("country");
ArrayList<String> list = new ArrayList<String>();
for(int i=0; i<array.length(); i++) {
JSONObject yeah = array.getJSONObject(i);
list.add(yeah.getString("name"));
}
spinnerNationalityAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_dropdown_item, list);
spinner_country.setTitle("Choose Country");
spinner_country.setAdapter(spinnerNationalityAdapter);
spinner_country.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
String spinner = parent.getItemAtPosition(position).toString();
try {
JSONObject obj = new JSONObject(readJSONFromAsset());
JSONArray array = obj.getJSONArray("country");
for(int i = 0; i < array.length();i++){
JSONObject yeah = array.getJSONObject(i);
if(spinner.equals("Israel")){
Toast.makeText(getApplicationContext(),"COUNTRY NOT EXIST",Toast.LENGTH_SHORT).show();
Intent next = new Intent(getApplicationContext(), LoginActivity.class);
startActivity(next);
}else if(spinner.equals(yeah.getString("name"))){
editText_receiver.setText("");
textView_receiver.setText(yeah.getString("dial_code"));
status_operator = false;
}
}
}catch (JSONException e){
e.printStackTrace();
}
}
public void onNothingSelected(AdapterView<?> parent) {
}
});
} catch (JSONException e) {
e.printStackTrace();
}
}
public String readJSONFromAsset() {
String json = null;
try {
InputStream is = getAssets().open("countries.json");
int size = is.available();
byte[] buffer = new byte[size];
is.read(buffer);
is.close();
json = new String(buffer, "UTF-8");
} catch (IOException ex) {
ex.printStackTrace();
return null;
}
return json;
}
@Override
public void onBackPressed() {
Intent next = new Intent(getApplicationContext(),DashboardActivity.class);
next.putExtra("session",session);
startActivity(next);
}
@Override
public void onClick(View v) {
switch (v.getId()) {
case R.id.imageView_back: {
onBackPressed();
break;
}
case R.id.button_operator: {
if(editText_receiver.getText().toString().equals("")){
editText_receiver.setError("Please insert value");
}else{
getTopapProduct();
}
break;
}
case R.id.button_topap: {
if(status_operator){
if(editText_receiver.getText().toString().equals("")){
Toast.makeText(getApplicationContext(),"Please insert sender phone num and choose operator",Toast.LENGTH_SHORT).show();
}else{
standardProgressDialog.show();
topap();
}
}else if(status_operator == false){
Toast.makeText(getApplicationContext(),"Please choose operator first",Toast.LENGTH_SHORT).show();
}else if(editText_receiver.getText().toString().equals("")){
Toast.makeText(getApplicationContext(),"Please insert sender phone num and choose operator",Toast.LENGTH_SHORT).show();
}
break;
}
}
}
public void topap(){
if(operatorId.equals("")){
Toast.makeText(getApplicationContext(),"Please choose operator",Toast.LENGTH_SHORT).show();
}else{
final String mobileNo = textView_receiver.getText().toString()+""+editText_receiver.getText().toString();
StringRequest stringRequest = new StringRequest(POST, BasedUrl.URL_STAGING +"topup",
new com.android.volley.Response.Listener<String>() {
@Override
public void onResponse(String response) {
standardProgressDialog.dismiss();
Toast.makeText(getApplicationContext(),"Transaction successful",Toast.LENGTH_SHORT).show();
Intent next = new Intent(getApplicationContext(),DashboardActivity.class);
next.putExtra("session",session);
startActivity(next);
}
},
new com.android.volley.Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
standardProgressDialog.dismiss();
parseVolleyError(error);
}
}) {
@Override
protected Map<String, String> getParams() throws AuthFailureError {
Map<String, String> params = new HashMap<String, String>();
params.put("mobileNo",mobileNo);
params.put("senderMobileNo",textView_sender.getText().toString()+""+editText_sender.getText().toString());
params.put("product",value);
params.put("smscontent",et_reference.getText().toString());
params.put("operatorId",operatorId);
return params;
}
@Override
public Map<String, String> getHeaders() throws AuthFailureError {
HashMap<String, String> headers = new HashMap();
headers.put("api-key",session);
return headers;
}
};
RequestQueue requestQueue = Volley.newRequestQueue(getApplicationContext());
requestQueue.add(stringRequest);
}
}
public void parseVolleyError(VolleyError error) {
try {
String responseBody = new String(error.networkResponse.data, "utf-8");
JSONObject data = new JSONObject(responseBody);
if(data.has("message")){
Toast.makeText(getApplicationContext(), data.getString("message"),Toast.LENGTH_SHORT).show();
}
} catch (JSONException e) {
} catch (UnsupportedEncodingException errorr) {
}
}
public void getTopapProduct(){
String mobileNo = textView_receiver.getText().toString()+""+editText_receiver.getText().toString();
StringRequest stringRequest = new StringRequest(GET, BasedUrl.URL_STAGING +"topup/"+mobileNo+"/product",
new com.android.volley.Response.Listener<String>() {
@Override
public void onResponse(String response) {
standardProgressDialog.dismiss();
try {
JSONObject obj = new JSONObject(response);
showDialogOperator(obj.getString("countryId"));
} catch (JSONException e) {
e.printStackTrace();
}
}
},
new com.android.volley.Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
standardProgressDialog.dismiss();
Toast.makeText(getApplicationContext(),"Phone number error",Toast.LENGTH_SHORT).show();
}
}) {
@Override
protected Map<String, String> getParams() throws AuthFailureError {
Map<String, String> params = new HashMap<String, String>();
return params;
}
@Override
public Map<String, String> getHeaders() throws AuthFailureError {
HashMap<String, String> headers = new HashMap();
headers.put("api-key",session);
return headers;
}
};
RequestQueue requestQueue = Volley.newRequestQueue(getApplicationContext());
requestQueue.add(stringRequest);
}
private void showDialogOperator(String countryId) {
mBuilderOperator = new AlertDialog.Builder(TopapActivity.this, R.style.CustomDialog);
final View mView = getLayoutInflater().inflate(R.layout.dialog_operator, null);
mBuilderOperator.setView(mView);
mDialogOperator = mBuilderOperator.create();
mDialogOperator.show();
ImageView imageView_cancel = mView.findViewById(R.id.imageView_cancel);
Spinner spinner_operator = mView.findViewById(R.id.spinner_operator);
Spinner spinner_value = mView.findViewById(R.id.spinner_value);
Button button_next = mView.findViewById(R.id.button_next);
imageView_cancel.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mDialogOperator.dismiss();
status_operator = false;
}
});
button_next.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mDialogOperator.dismiss();
status_operator = true;
}
});
getOperator(mView,spinner_operator,countryId,spinner_value);
}
public void getOperator(final View mView, final Spinner spinner_operator, final String countryId, final Spinner spinner_value){
operatorNames=new ArrayList<>();
StringRequest stringRequest = new StringRequest(GET, BasedUrl.URL_STAGING +"topup/"+countryId+"/operators",
new com.android.volley.Response.Listener<String>() {
@Override
public void onResponse(String response) {
standardProgressDialog.dismiss();
try {
JSONObject obj = new JSONObject(response);
if(obj.has("operators")){
JSONArray arrOPerator = new JSONArray(obj.getString("operators"));
operatorNames.add("Please choose operator");
for(int i = 0; i <arrOPerator.length(); i++){
JSONObject objOPP = arrOPerator.getJSONObject(i);
operatorNames.add(objOPP.getString("operator"));
operatorOnselect(mView,spinner_operator,countryId,spinner_value);
}
spinner_operator.setAdapter(new ArrayAdapter<String>(mView.getContext(), android.R.layout.simple_spinner_dropdown_item, operatorNames));
}
} catch (JSONException e) {
e.printStackTrace();
}
}
},
new com.android.volley.Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
standardProgressDialog.dismiss();
}
}) {
@Override
protected Map<String, String> getParams() throws AuthFailureError {
Map<String, String> params = new HashMap<String, String>();
return params;
}
@Override
public Map<String, String> getHeaders() throws AuthFailureError {
HashMap<String, String> headers = new HashMap();
headers.put("api-key",session);
return headers;
}
};
RequestQueue requestQueue = Volley.newRequestQueue(getApplicationContext());
requestQueue.add(stringRequest);
}
public void operatorOnselect(final View mView, final Spinner spinner_operator, final String countryId, final Spinner spinner_value){
StringRequest stringRequest = new StringRequest(GET, BasedUrl.URL_STAGING +"topup/"+countryId+"/operators",
new com.android.volley.Response.Listener<String>() {
@Override
public void onResponse(final String response) {
standardProgressDialog.dismiss();
spinner_operator.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
String spinner = parent.getItemAtPosition(position).toString();
try {
JSONObject obj = new JSONObject(response);
if(obj.has("operators")){
JSONArray arrOPerator = new JSONArray(obj.getString("operators"));
for(int i = 0; i <arrOPerator.length(); i++){
JSONObject objOPP = arrOPerator.getJSONObject(i);
if(spinner.equals(objOPP.getString("operator"))){
operatorId = objOPP.getString("operatorId");
getSpinnerValue(mView,spinner_value,operatorId);
Log.d("operatorId",operatorId);
}
}
}
}catch (JSONException e){
e.printStackTrace();
}
}
public void onNothingSelected(AdapterView<?> parent) {
}
});
}
},
new com.android.volley.Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
standardProgressDialog.dismiss();
}
}) {
@Override
protected Map<String, String> getParams() throws AuthFailureError {
Map<String, String> params = new HashMap<String, String>();
return params;
}
@Override
public Map<String, String> getHeaders() throws AuthFailureError {
HashMap<String, String> headers = new HashMap();
headers.put("api-key",session);
return headers;
}
};
RequestQueue requestQueue = Volley.newRequestQueue(getApplicationContext());
requestQueue.add(stringRequest);
}
public void getSpinnerValue(final View mView, final Spinner spinner_value, String operatorId){
valueNames =new ArrayList<>();
StringRequest stringRequest = new StringRequest(GET, BasedUrl.URL_STAGING +"topup/operator/"+operatorId+"/product",
new com.android.volley.Response.Listener<String>() {
@Override
public void onResponse(String response) {
standardProgressDialog.dismiss();
try {
JSONObject obj = new JSONObject(response);
if(obj.has("productList")){
JSONArray arrOPerator = new JSONArray(obj.getString("productList"));
valueNames.add("Please choose top up value in "+obj.getString("destinationCurrency"));
for(int i = 0; i <arrOPerator.length(); i++){
valueNames.add(arrOPerator.getString(i));
}
valueOnselect(mView,spinner_value,spinner_value);
spinner_value.setAdapter(new ArrayAdapter<String>(mView.getContext(), android.R.layout.simple_spinner_dropdown_item, valueNames));
}
} catch (JSONException e) {
e.printStackTrace();
}
}
},
new com.android.volley.Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
standardProgressDialog.dismiss();
}
}) {
@Override
protected Map<String, String> getParams() throws AuthFailureError {
Map<String, String> params = new HashMap<String, String>();
return params;
}
@Override
public Map<String, String> getHeaders() throws AuthFailureError {
HashMap<String, String> headers = new HashMap();
headers.put("api-key",session);
return headers;
}
};
RequestQueue requestQueue = Volley.newRequestQueue(getApplicationContext());
requestQueue.add(stringRequest);
}
public void valueOnselect(final View mView, final Spinner spinner_operator, final Spinner spinner_value){
StringRequest stringRequest = new StringRequest(GET, BasedUrl.URL_STAGING +"topup/operator/"+operatorId+"/product",
new com.android.volley.Response.Listener<String>() {
@Override
public void onResponse(final String response) {
standardProgressDialog.dismiss();
spinner_operator.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
String spinner = parent.getItemAtPosition(position).toString();
try {
JSONObject obj = new JSONObject(response);
if(obj.has("productList")){
JSONArray arrOPerator = new JSONArray(obj.getString("productList"));
for(int i = 0; i <arrOPerator.length(); i++){
if(spinner.equals(arrOPerator.getString(i))){
JSONArray arrs = new JSONArray(obj.getString("retailPriceList"));
JSONArray who = new JSONArray(obj.getString("wholeSalePriceList"));
value = spinner;
retails_value = arrs.getString(i);
whosale_price = who.getString(i);
Log.d("VALUE",value);
Log.d("retails_value",retails_value);
Log.d("WHOSALE PRICE ",whosale_price);
}
}
}
}catch (JSONException e){
e.printStackTrace();
}
}
public void onNothingSelected(AdapterView<?> parent) {
}
});
}
},
new com.android.volley.Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
standardProgressDialog.dismiss();
}
}) {
@Override
protected Map<String, String> getParams() throws AuthFailureError {
Map<String, String> params = new HashMap<String, String>();
return params;
}
@Override
public Map<String, String> getHeaders() throws AuthFailureError {
HashMap<String, String> headers = new HashMap();
headers.put("api-key",session);
return headers;
}
};
RequestQueue requestQueue = Volley.newRequestQueue(getApplicationContext());
requestQueue.add(stringRequest);
}
}
package com.maxmoney.maxcddconsole.Adapter;
import android.content.Context;
import android.content.Intent;
import android.graphics.Typeface;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;
import android.widget.Toast;
import com.maxmoney.maxcddconsole.Activity.ApproveActivity;
import com.maxmoney.maxcddconsole.Activity.ApproveCustomerClickActivity;
import com.maxmoney.maxcddconsole.Connectivity.BasedUrl;
import com.maxmoney.maxcddconsole.R;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.Map;
public class ApproveUserAdapter extends BaseAdapter {
private ArrayList<Map<String, String>> data = null;
private Context context = null;
private LayoutInflater inflater;
private class ViewHolder {
TextView tv1;
TextView tv2;
TextView tv3;
}
public ApproveUserAdapter(Context context, ArrayList<Map<String, String>> data) {
this.data = data;
this.context = context;
}
@Override
public int getCount() {
return (data == null) ? 0 : data.size();
}
@Override
public Object getItem(int position) {
return (data == null) ? null : data.get(position);
}
@Override
public long getItemId(int position) {
return position;
}
@Override
public boolean isEnabled(int position) {
return true;
}
@Override
public View getView(final int position, View convertView, ViewGroup parent) {
View view = convertView;
final ViewHolder holder;
if (view == null) {
inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
view = inflater.inflate(R.layout.list_approve_user, null);
holder = new ViewHolder();
holder.tv1 = view.findViewById(R.id.textView_idNo);
holder.tv2 = view.findViewById(R.id.textView_email);
holder.tv3 = view.findViewById(R.id.textView_name);
view.setTag(holder);
} else {
holder = (ViewHolder) view.getTag();
}
holder.tv1.setText(data.get(position).get("msg1"));
holder.tv2.setText(data.get(position).get("msg2"));
holder.tv3.setText(data.get(position).get("msg3"));
view.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent next = new Intent(context.getApplicationContext(), ApproveCustomerClickActivity.class);
next.putExtra("session", ApproveActivity.session);
next.putExtra("email",data.get(position).get("msg2"));
next.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(next);
}
});
return view;
}
public void refreshData(ArrayList<Map<String, String>> newData) {
this.data = newData;
this.notifyDataSetChanged();
}
}
\ No newline at end of file
package com.maxmoney.maxcddconsole.Connectivity; package com.maxmoney.maxcddconsole.Connectivity;
public class BasedUrl { public class BasedUrl {
public static String URL_STAGING = "https://api.maxmoney.com/v1/"; public static String URL_STAGING = "https://api-staging.maxmoney.com/v1/";
public static String API_STAGING_TOPAP_KEY = "340b5adfe435e23ea4534974c79ca1d5e1203d0a"; public static String API_STAGING_TOPAP_KEY = "340b5adfe435e23ea4534974c79ca1d5e1203d0a";
} }
<?xml version="1.0" encoding="utf-8" ?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:thickness="1dp"
android:shape="rectangle">
<corners android:radius="5dp" />
<gradient
android:startColor="#FFFFFF"
android:endColor="#FFFFFF"/>
<stroke android:width="1dp" android:color="#7A7A7A" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8" ?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<layer-list>
<item>
<shape>
<solid android:color="#ffffff" />
<stroke android:width="1dp" android:color="#7A7A7A" />
<padding android:bottom="3dp" android:left="3dp" android:right="3dp" android:top="3dp" />
</shape>
</item>
</layer-list>
</item>
</selector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8" ?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:thickness="1dp"
android:shape="rectangle">
<corners android:radius="15dp"/>
<gradient
android:startColor="#FFFFFF"
android:endColor="#FFFFFF"/>
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8" ?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:thickness="1dp"
android:shape="rectangle">
<corners android:bottomRightRadius="15dp" android:bottomLeftRadius="15dp" />
<gradient
android:startColor="#FFFFFF"
android:endColor="#FFFFFF"/>
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid
android:color="#1F84C5"/>
<corners
android:radius="15dp" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8" ?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<layer-list>
<item>
<shape>
<solid android:color="#ffffff" />
<stroke android:width="1dp" android:color="#7A7A7A" />
<padding android:bottom="3dp" android:left="3dp" android:right="3dp" android:top="3dp" />
</shape>
</item>
<item android:gravity="bottom|right" android:drawable="@drawable/icon_arrow_down"/>
</layer-list>
</item>
</selector>
\ No newline at end of file
<vector android:alpha="0.99" android:height="24dp"
android:viewportHeight="24.0" android:viewportWidth="24.0"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#FF000000" android:pathData="M7,10l5,5 5,-5z"/>
</vector>
<vector android:height="24dp" android:tint="#FFFFFF"
android:viewportHeight="24.0" android:viewportWidth="24.0"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#FF000000" android:pathData="M12,2C6.47,2 2,6.47 2,12s4.47,10 10,10 10,-4.47 10,-10S17.53,2 12,2zM17,15.59L15.59,17 12,13.41 8.41,17 7,15.59 10.59,12 7,8.41 8.41,7 12,10.59 15.59,7 17,8.41 13.41,12 17,15.59z"/>
</vector>
<vector android:height="24dp" android:tint="#FFFFFF"
android:viewportHeight="24.0" android:viewportWidth="24.0"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#FF000000" android:pathData="M17.65,6.35C16.2,4.9 14.21,4 12,4c-4.42,0 -7.99,3.58 -7.99,8s3.57,8 7.99,8c3.73,0 6.84,-2.55 7.73,-6h-2.08c-0.82,2.33 -3.04,4 -5.65,4 -3.31,0 -6,-2.69 -6,-6s2.69,-6 6,-6c1.66,0 3.14,0.69 4.22,1.78L13,11h7V4l-2.35,2.35z"/>
</vector>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/white"
android:orientation="vertical"
tools:context=".Activity.ApproveActivity"
android:focusable="true"
android:focusableInTouchMode="true">
<LinearLayout
android:id="@+id/linear_header"
android:layout_width="match_parent"
android:layout_height="60dp"
android:background="@color/colorBackground"
android:gravity="center"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="horizontal">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="3"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:id="@+id/imageView_back"
android:layout_width="35dp"
android:layout_height="30dp"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
app:srcCompat="@drawable/icon_back"
tools:ignore="VectorDrawableCompat" />
</LinearLayout>
<TextView
android:id="@+id/textView_Register"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:text="APPROVE USER"
android:textColor="@android:color/white"
android:textSize="18sp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="3"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:id="@+id/imageView_refresh"
android:layout_width="35dp"
android:layout_height="30dp"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
app:srcCompat="@drawable/icon_refresh"
tools:ignore="VectorDrawableCompat" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<ListView
android:id="@+id/list_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"></ListView>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/white"
android:orientation="vertical"
tools:context=".Activity.ApproveCustomerClickActivity">
<LinearLayout
android:id="@+id/linear_header"
android:layout_width="match_parent"
android:layout_height="60dp"
android:background="@color/colorBackground"
android:gravity="center"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="horizontal">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="3"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:id="@+id/imageView_back"
android:layout_width="35dp"
android:layout_height="30dp"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
app:srcCompat="@drawable/icon_back"
tools:ignore="VectorDrawableCompat" />
</LinearLayout>
<TextView
android:id="@+id/textView_Register"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:text="APPROVE USER"
android:textColor="@android:color/white"
android:textSize="18sp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="3"
android:gravity="center"
android:orientation="vertical" />
</LinearLayout>
</LinearLayout>
<ScrollView
android:id="@+id/dealscroll"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:id="@+id/textView9"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="20dp"
android:gravity="center"
android:text="CUSTOMER INFORMATION"
android:textColor="@android:color/black"
android:textSize="18sp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="10dp"
android:orientation="horizontal">
<TextView
android:id="@+id/textView11"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="Full Name"
android:textColor="@android:color/black" />
<TextView
android:id="@+id/textView_fullname"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="-"
android:textColor="@android:color/black" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="10dp"
android:orientation="horizontal">
<TextView
android:id="@+id/textView11"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="Status"
android:textColor="@android:color/black" />
<TextView
android:id="@+id/textView_status"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="-"
android:textColor="@android:color/black" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="10dp"
android:orientation="horizontal">
<TextView
android:id="@+id/textView11"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="Email"
android:textColor="@android:color/black" />
<TextView
android:id="@+id/textView_email"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="-"
android:textColor="@android:color/black" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="10dp"
android:orientation="horizontal">
<TextView
android:id="@+id/textView11"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="Date Of Birth"
android:textColor="@android:color/black" />
<TextView
android:id="@+id/textView_dob"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="-"
android:textColor="@android:color/black" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="10dp"
android:orientation="horizontal">
<TextView
android:id="@+id/textView11"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="ID Type"
android:textColor="@android:color/black" />
<TextView
android:id="@+id/textView_idtype"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="-"
android:textColor="@android:color/black" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="10dp"
android:orientation="horizontal">
<TextView
android:id="@+id/textView11"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="ID Number"
android:textColor="@android:color/black" />
<TextView
android:id="@+id/textView_idNo"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="-"
android:textColor="@android:color/black" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="10dp"
android:orientation="horizontal">
<TextView
android:id="@+id/textView11"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="Nationality"
android:textColor="@android:color/black" />
<TextView
android:id="@+id/textView_nationality"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="-"
android:textColor="@android:color/black" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="10dp"
android:orientation="horizontal">
<TextView
android:id="@+id/textView11"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="Country"
android:textColor="@android:color/black" />
<TextView
android:id="@+id/textView_country"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="-"
android:textColor="@android:color/black" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="10dp"
android:orientation="horizontal">
<TextView
android:id="@+id/textView11"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="Address"
android:textColor="@android:color/black" />
<TextView
android:id="@+id/textView_address"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="-"
android:textColor="@android:color/black" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="10dp"
android:orientation="horizontal">
<TextView
android:id="@+id/textView11"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="Mobile"
android:textColor="@android:color/black" />
<TextView
android:id="@+id/textView_mobile"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="-"
android:textColor="@android:color/black" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="10dp"
android:orientation="horizontal">
<TextView
android:id="@+id/textView11"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="State"
android:textColor="@android:color/black" />
<TextView
android:id="@+id/textView_state"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="-"
android:textColor="@android:color/black" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:orientation="horizontal">
<TextView
android:id="@+id/textView11"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="City"
android:textColor="@android:color/black" />
<TextView
android:id="@+id/textView_city"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="-"
android:textColor="@android:color/black" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="10dp"
android:orientation="horizontal">
<TextView
android:id="@+id/textView11"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="Is In PEP?"
android:textColor="@android:color/black" />
<TextView
android:id="@+id/textView_pep"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="-"
android:textColor="@android:color/black" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="10dp"
android:orientation="horizontal">
<TextView
android:id="@+id/textView11"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="Is In OFAC?"
android:textColor="@android:color/black" />
<TextView
android:id="@+id/textView_ofa"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="-"
android:textColor="@android:color/black" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:orientation="vertical">
<TextView
android:id="@+id/textView15"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:gravity="center"
android:text="FRONT IMAGE DOCUMENT" />
<com.jsibbold.zoomage.ZoomageView
android:id="@+id/image_front"
android:layout_width="match_parent"
android:layout_height="300dp"
android:layout_margin="10dp"
android:src="@drawable/icon_maxmoney"
app:zoomage_animateOnReset="true"
app:zoomage_autoCenter="true"
app:zoomage_autoResetMode="UNDER"
app:zoomage_maxScale="8"
app:zoomage_minScale="0.6"
app:zoomage_restrictBounds="false"
app:zoomage_translatable="true"
app:zoomage_zoomable="true" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:orientation="vertical">
<TextView
android:id="@+id/textView15"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:gravity="center"
android:text="BACK IMAGE DOCUMENT" />
<com.jsibbold.zoomage.ZoomageView
android:id="@+id/image_back"
android:layout_width="match_parent"
android:layout_height="300dp"
android:layout_margin="10dp"
android:src="@drawable/icon_maxmoney"
app:zoomage_animateOnReset="true"
app:zoomage_autoCenter="true"
app:zoomage_autoResetMode="UNDER"
app:zoomage_maxScale="8"
app:zoomage_minScale="0.6"
app:zoomage_restrictBounds="false"
app:zoomage_translatable="true"
app:zoomage_zoomable="true" />
</LinearLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="25dp"
android:gravity="center"
android:text="VIDEO VERIFICATION"
android:textColor="@android:color/black"
android:textSize="18sp" />
<VideoView
android:id="@+id/videoView"
android:layout_width="match_parent"
android:layout_height="300dp"
android:layout_margin="20dp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="20dp"
android:orientation="horizontal">
<Button
android:id="@+id/button_reject"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:layout_weight="1"
android:background="@android:color/holo_red_light"
android:text="Reject"
android:textColor="@android:color/white" />
<Button
android:id="@+id/button_edit"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:layout_weight="1"
android:background="@android:color/holo_orange_dark"
android:text="Edit"
android:textColor="@android:color/white" />
<Button
android:id="@+id/button_approve"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:layout_weight="1"
android:background="@color/colorButtonHijau"
android:text="Approve"
android:textColor="@android:color/white" />
</LinearLayout>
</LinearLayout>
</ScrollView>
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/white"
android:orientation="vertical"
tools:context=".Activity.CddActivity">
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:id="@+id/linear_header"
android:layout_width="match_parent"
android:layout_height="60dp"
android:background="@color/colorBackground"
android:gravity="center"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="horizontal">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="3"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:id="@+id/imageView_back"
android:layout_width="35dp"
android:layout_height="30dp"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
app:srcCompat="@drawable/icon_back"
tools:ignore="VectorDrawableCompat" />
</LinearLayout>
<TextView
android:id="@+id/textView_Register"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:text="CDD VERIFICATION"
android:textColor="@android:color/white"
android:textSize="18sp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="3"
android:gravity="center"
android:orientation="vertical" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/white"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="30dp"
android:layout_marginTop="30dp"
android:layout_marginRight="30dp"
android:orientation="horizontal">
<TextView
android:id="@+id/textView20"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Name"
android:textColor="@android:color/black" />
<TextView
android:id="@+id/textView_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Amir Firdaus Bin Samsudin" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="30dp"
android:layout_marginTop="10dp"
android:layout_marginRight="30dp"
android:orientation="horizontal">
<TextView
android:id="@+id/textView20"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="ID No"
android:textColor="@android:color/black" />
<TextView
android:id="@+id/textView_idNo"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="930531045023" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="30dp"
android:layout_marginTop="25dp"
android:layout_marginRight="30dp"
android:background="@android:color/white"
android:orientation="vertical">
<TextView
android:id="@+id/textView_business"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Nature of Business" />
<Spinner
android:id="@+id/spinner_business"
android:layout_width="match_parent"
android:layout_height="40dp"
android:background="@drawable/custom_spinner_topap_activity"
android:entries="@array/nature_of_business" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="30dp"
android:layout_marginTop="15dp"
android:layout_marginRight="30dp"
android:background="@android:color/white"
android:orientation="vertical">
<TextView
android:id="@+id/textView_soi"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Source of Income" />
<Spinner
android:id="@+id/spinner_sourceIncome"
android:layout_width="match_parent"
android:layout_height="40dp"
android:background="@drawable/custom_spinner_topap_activity"
android:entries="@array/sourceOfIncome" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:id="@+id/linear_ic"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/textView31"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/imageView_front_ic"
android:layout_alignParentStart="true"
android:layout_marginStart="0dp"
android:layout_marginBottom="-20dp"
android:gravity="center"
android:text="FRONT"
android:textColor="@color/colorBackground"
android:textSize="18sp"
android:textStyle="bold" />
<ImageView
android:id="@+id/imageView_front_ic"
android:layout_width="match_parent"
android:layout_height="200dp"
android:layout_marginStart="20dp"
android:layout_marginTop="20dp"
android:layout_marginEnd="20dp"
android:layout_marginBottom="20dp"
app:srcCompat="@drawable/icfront" />
</RelativeLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/textView32"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/imageView_back_ic"
android:layout_alignParentStart="true"
android:layout_marginStart="0dp"
android:layout_marginBottom="-18dp"
android:gravity="center"
android:text="BACK"
android:textColor="@color/colorBackground"
android:textSize="18sp"
android:textStyle="bold" />
<ImageView
android:id="@+id/imageView_back_ic"
android:layout_width="match_parent"
android:layout_height="200dp"
android:layout_marginLeft="20dp"
android:layout_marginTop="40dp"
android:layout_marginRight="20dp"
android:layout_marginBottom="20dp"
app:srcCompat="@drawable/icback" />
</RelativeLayout>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/linear_passport"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="15dp"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="30dp">
<TextView
android:id="@+id/textView33"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/imageView_front_passport"
android:layout_alignParentStart="true"
android:layout_marginStart="0dp"
android:layout_marginBottom="-20dp"
android:gravity="center"
android:text="FRONT"
android:textColor="@color/colorBackground"
android:textSize="18sp"
android:textStyle="bold" />
<ImageView
android:id="@+id/imageView_front_passport"
android:layout_width="match_parent"
android:layout_height="200dp"
android:layout_marginStart="20dp"
android:layout_marginTop="20dp"
android:layout_marginEnd="20dp"
android:layout_marginBottom="20dp"
app:srcCompat="@drawable/passportfront" />
</RelativeLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/textView43"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/imageView_back_passport"
android:layout_alignParentStart="true"
android:layout_marginStart="0dp"
android:layout_marginBottom="-20dp"
android:gravity="center"
android:text="BACK"
android:textColor="@color/colorBackground"
android:textSize="18sp"
android:textStyle="bold" />
<ImageView
android:id="@+id/imageView_back_passport"
android:layout_width="match_parent"
android:layout_height="150dp"
android:layout_marginLeft="40dp"
android:layout_marginTop="50dp"
android:layout_marginRight="40dp"
android:layout_marginBottom="20dp"
app:srcCompat="@drawable/passportback" />
</RelativeLayout>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/linear_button"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="30dp"
android:gravity="bottom"
android:orientation="vertical">
<Button
android:id="@+id/button_next"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/colorBackground"
android:text="NEXT"
android:textColor="@android:color/white" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</ScrollView>
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/white"
android:orientation="vertical"
tools:context=".Activity.CddSearchActivity">
<LinearLayout
android:id="@+id/linear_header"
android:layout_width="match_parent"
android:layout_height="60dp"
android:background="@color/colorBackground"
android:gravity="center"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="horizontal">
<ImageView
android:id="@+id/imageView_back"
android:layout_width="35dp"
android:layout_height="30dp"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:layout_marginLeft="8dp"
app:srcCompat="@drawable/icon_back"
tools:ignore="VectorDrawableCompat" />
<TextView
android:id="@+id/textView_Register"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginRight="40dp"
android:gravity="center"
android:text="CDD Search"
android:textColor="@android:color/white"
android:textSize="18sp" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="50dp"
android:orientation="vertical">
<EditText
android:id="@+id/editText_idNo"
android:layout_width="match_parent"
android:layout_height="45dp"
android:background="@drawable/custom_edit_text_register_activity"
android:hint="Enter IC / Passport No"
android:inputType="textPersonName"
android:paddingLeft="5dp"
android:paddingRight="5dp"
android:textSize="12sp" />
<Button
android:id="@+id/button_search"
android:layout_width="match_parent"
android:layout_height="45dp"
android:layout_marginTop="10dp"
android:background="@color/colorBackground"
android:text="Search"
android:textColor="@android:color/white" />
</LinearLayout>
<LinearLayout
android:id="@+id/linear_customer_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="50dp"
android:layout_marginRight="50dp"
android:gravity="center"
android:orientation="horizontal">
<TextView
android:id="@+id/textView18"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Customer Name :"
android:textColor="@android:color/black" />
<TextView
android:id="@+id/textView_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:text="Amir Firdaus Bin Samsudin" />
</LinearLayout>
<TextView
android:id="@+id/textView_continue"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="50dp"
android:layout_marginTop="15dp"
android:layout_marginRight="50dp"
android:gravity="center"
android:text="Click here to continue"
android:textColor="@color/colorBackground"
android:textStyle="bold" />
</LinearLayout>
</LinearLayout>
\ No newline at end of file
...@@ -10,12 +10,22 @@ ...@@ -10,12 +10,22 @@
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="90dp" android:layout_height="wrap_content"
android:layout_marginBottom="15dp"
android:orientation="vertical"> android:orientation="vertical">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:layout_marginTop="15dp"
android:layout_marginRight="15dp"
android:background="@drawable/custom_linear_dashboard"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="100dp"
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="horizontal"> android:orientation="horizontal">
...@@ -43,128 +53,264 @@ ...@@ -43,128 +53,264 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="MAX CONSOLE" android:text="MAX CONSOLE"
android:textColor="@android:color/white" /> android:textColor="@android:color/black" />
<TextView <TextView
android:id="@+id/textView_title" android:id="@+id/textView_title"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="maxcdd03@maxmoney.com / Maxcddofficer" android:text="maxcdd03@maxmoney.com / Maxcddofficer"
android:textColor="@android:color/white" /> android:textColor="@android:color/black" />
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
</LinearLayout>
<LinearLayout <LinearLayout
android:id="@+id/linear_balance" android:id="@+id/linear_balance"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="90dp"
android:layout_marginBottom="15dp" android:gravity="center"
android:orientation="vertical"> android:orientation="vertical">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="wrap_content"
android:layout_marginLeft="30dp"
android:layout_marginRight="30dp"
android:orientation="horizontal"> android:orientation="horizontal">
<ImageView
android:id="@+id/imageView"
android:layout_width="100dp"
android:layout_height="50dp"
app:srcCompat="@drawable/icon_wallet" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical">
<TextView <TextView
android:id="@+id/textView" android:id="@+id/textView"
android:layout_width="wrap_content" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="center" android:text="TOP UP BALANCE"
android:text="Top Up Balance : " android:textColor="@android:color/black"
android:textColor="@android:color/white" android:textSize="18sp"
android:textSize="20sp"
android:textStyle="bold" /> android:textStyle="bold" />
<TextView <TextView
android:id="@+id/textView_balance" android:id="@+id/textView_balance"
android:layout_width="wrap_content" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="center" android:text="RM 25.00"
android:text="0" android:textColor="@android:color/black" />
android:textColor="@android:color/white" </LinearLayout>
android:textSize="18sp" /> </LinearLayout>
</LinearLayout>
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="1dp" android:layout_height="wrap_content"
android:background="@android:color/darker_gray"
android:orientation="vertical"> android:orientation="vertical">
</LinearLayout> <LinearLayout
android:id="@+id/linear_customer_main"
<ScrollView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="100dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:orientation="horizontal">
<LinearLayout <LinearLayout
android:id="@+id/linear_customer_all"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="match_parent"
android:layout_margin="5dp"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:layout_weight="1"
android:background="@drawable/custom_linear_dashboard"
android:gravity="center"
android:orientation="vertical"> android:orientation="vertical">
<Button <ImageView
android:id="@+id/button_approve" android:id="@+id/imageView2"
android:layout_width="match_parent" android:layout_width="50dp"
android:layout_height="wrap_content" android:layout_height="50dp"
android:layout_margin="20dp" app:srcCompat="@drawable/icon_customer" />
android:background="@drawable/custom_button_login_activity"
android:text="APPROVE CUSTOMER"
android:textColor="@android:color/white" />
<Button <TextView
android:id="@+id/button_registration" android:id="@+id/textView14"
android:layout_width="match_parent" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="20dp" android:layout_marginTop="5dp"
android:background="@drawable/custom_button_login_activity"
android:text="REGISTRATION CUSTOMER" android:text="REGISTRATION CUSTOMER"
android:textColor="@android:color/white" /> android:textColor="@android:color/black"
android:textSize="12sp" />
</LinearLayout>
<Button <LinearLayout
android:id="@+id/button_cdd" android:id="@+id/linear_cdd"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="5dp"
android:layout_weight="1"
android:background="@drawable/custom_linear_dashboard"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:id="@+id/imageView3"
android:layout_width="50dp"
android:layout_height="50dp"
app:srcCompat="@drawable/icon_cdd" />
<TextView
android:id="@+id/textView16"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="20dp" android:layout_marginTop="5dp"
android:background="@drawable/custom_button_login_activity" android:text="CDD VERIFICATION"
android:text="CDD" android:textColor="@android:color/black"
android:textColor="@android:color/white" /> android:textSize="12sp" />
</LinearLayout>
</LinearLayout>
<Button <LinearLayout
android:id="@+id/button_userSearch" android:id="@+id/linear_topap_main"
android:layout_width="match_parent"
android:layout_height="100dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:orientation="horizontal">
<LinearLayout
android:id="@+id/linear_user_all"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="5dp"
android:layout_weight="1"
android:background="@drawable/custom_linear_dashboard"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:id="@+id/imageView2"
android:layout_width="50dp"
android:layout_height="50dp"
app:srcCompat="@drawable/icon_user" />
<TextView
android:id="@+id/textView14"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="20dp" android:layout_marginTop="5dp"
android:background="@drawable/custom_button_login_activity"
android:text="USER SEARCH" android:text="USER SEARCH"
android:textColor="@android:color/white" /> android:textColor="@android:color/black"
android:textSize="12sp" />
</LinearLayout>
<Button <LinearLayout
android:id="@+id/button_topap" android:id="@+id/linear_topap"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="5dp"
android:layout_weight="1"
android:background="@drawable/custom_linear_dashboard"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:id="@+id/imageView3"
android:layout_width="50dp"
android:layout_height="50dp"
app:srcCompat="@drawable/icon_mobile" />
<TextView
android:id="@+id/textView16"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="20dp" android:layout_marginTop="5dp"
android:background="@drawable/custom_button_login_activity"
android:text="TOP UP" android:text="TOP UP"
android:textColor="@android:color/white" /> android:textColor="@android:color/black"
android:textSize="12sp" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/linear_complience"
android:layout_width="match_parent"
android:layout_height="100dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:orientation="horizontal">
<LinearLayout
android:id="@+id/linear_approve"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="5dp"
android:layout_weight="1"
android:background="@drawable/custom_linear_dashboard"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:id="@+id/imageView2"
android:layout_width="50dp"
android:layout_height="50dp"
app:srcCompat="@drawable/icon_customer" />
<TextView
android:id="@+id/textView14"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:text="APPROVE CUSTOMER"
android:textColor="@android:color/black"
android:textSize="12sp" />
</LinearLayout>
<LinearLayout
android:id="@+id/linear_user_search_c"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="5dp"
android:layout_weight="1"
android:background="@drawable/custom_linear_dashboard"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:id="@+id/imageView3"
android:layout_width="50dp"
android:layout_height="50dp"
app:srcCompat="@drawable/icon_user" />
<TextView
android:id="@+id/textView16"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:text="USER SEARCH"
android:textColor="@android:color/black"
android:textSize="12sp" />
</LinearLayout>
</LinearLayout>
<Button <Button
android:id="@+id/button_logout" android:id="@+id/button_logout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="20dp" android:layout_margin="15dp"
android:background="@android:color/holo_orange_light" android:background="@android:color/holo_orange_light"
android:text="LOGOUT" android:text="LOGOUT"
android:textColor="@android:color/white" /> android:textColor="@android:color/white" />
</LinearLayout> </LinearLayout>
</ScrollView>
</LinearLayout> </LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/white"
android:orientation="vertical"
tools:context=".Activity.RegistrationActivity">
<LinearLayout
android:id="@+id/linear_header"
android:layout_width="match_parent"
android:layout_height="60dp"
android:background="@color/colorBackground"
android:gravity="center"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="horizontal">
<ImageView
android:id="@+id/imageView_back"
android:layout_width="35dp"
android:layout_height="30dp"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:layout_marginLeft="8dp"
app:srcCompat="@drawable/icon_back"
tools:ignore="VectorDrawableCompat" />
<TextView
android:id="@+id/textView_Register"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginRight="40dp"
android:gravity="center"
android:text="REGISTRATION"
android:textColor="@android:color/white"
android:textSize="18sp" />
</LinearLayout>
</LinearLayout>
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<LinearLayout
android:id="@+id/linear_email"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="30dp"
android:layout_marginTop="15dp"
android:layout_marginRight="30dp"
android:layout_marginBottom="5dp"
android:orientation="vertical">
<TextView
android:id="@+id/textView13"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:text="Email" />
<EditText
android:id="@+id/editText_email"
android:layout_width="match_parent"
android:layout_height="35dp"
android:background="@drawable/custom_edit_text_register_activity"
android:inputType="textWebEmailAddress"
android:paddingLeft="5dp"
android:paddingRight="5dp"
android:textSize="12sp" />
</LinearLayout>
<LinearLayout
android:id="@+id/linear_fullname"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="30dp"
android:layout_marginTop="15dp"
android:layout_marginRight="30dp"
android:layout_marginBottom="5dp"
android:orientation="vertical">
<TextView
android:id="@+id/textView13"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:text="Full Name" />
<EditText
android:id="@+id/editText_fullname"
android:layout_width="match_parent"
android:layout_height="35dp"
android:background="@drawable/custom_edit_text_register_activity"
android:inputType="textPersonName"
android:paddingLeft="5dp"
android:paddingRight="5dp"
android:textSize="12sp" />
</LinearLayout>
<LinearLayout
android:id="@+id/linear_nationality"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="30dp"
android:layout_marginTop="15dp"
android:layout_marginRight="30dp"
android:layout_marginBottom="5dp"
android:orientation="vertical">
<TextView
android:id="@+id/textView13"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:text="Nationality" />
<com.toptoche.searchablespinnerlibrary.SearchableSpinner
android:id="@+id/spinner_nationality"
android:layout_width="match_parent"
android:layout_height="35dp"
android:background="@drawable/custom_spinner_topap_activity" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="30dp"
android:layout_marginTop="15dp"
android:layout_marginRight="30dp"
android:layout_marginBottom="5dp"
android:orientation="vertical">
<TextView
android:id="@+id/textView17"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:text="Id Type" />
<RadioGroup
android:id="@+id/radioGroup_idType"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<RadioButton
android:id="@+id/radioButton_passport"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Passport" />
<RadioButton
android:id="@+id/radioButton_nric"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="NRIC" />
</RadioGroup>
</LinearLayout>
<LinearLayout
android:id="@+id/linear_accType"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="30dp"
android:layout_marginTop="15dp"
android:layout_marginRight="30dp"
android:layout_marginBottom="5dp"
android:orientation="vertical">
<TextView
android:id="@+id/textView17"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:text="Account Type" />
<RadioGroup
android:id="@+id/radioGroup_accType"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<RadioButton
android:id="@+id/radioButton_personal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Personal" />
<RadioButton
android:id="@+id/radioButton_business"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Business" />
</RadioGroup>
</LinearLayout>
<LinearLayout
android:id="@+id/linear_nric"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="30dp"
android:layout_marginTop="15dp"
android:layout_marginRight="30dp"
android:layout_marginBottom="5dp"
android:orientation="vertical">
<TextView
android:id="@+id/textView13"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:text="NRIC No" />
<EditText
android:id="@+id/editText_nric"
android:layout_width="match_parent"
android:layout_height="35dp"
android:background="@drawable/custom_edit_text_register_activity"
android:inputType="number"
android:paddingLeft="5dp"
android:paddingRight="5dp"
android:textSize="12sp" />
</LinearLayout>
<LinearLayout
android:id="@+id/linear_passport"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="30dp"
android:layout_marginTop="15dp"
android:layout_marginRight="30dp"
android:layout_marginBottom="5dp"
android:orientation="vertical">
<TextView
android:id="@+id/textView13"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:text="Passport No" />
<EditText
android:id="@+id/editText_passport"
android:layout_width="match_parent"
android:layout_height="35dp"
android:background="@drawable/custom_edit_text_register_activity"
android:inputType="textPersonName"
android:paddingLeft="5dp"
android:paddingRight="5dp"
android:textSize="12sp" />
</LinearLayout>
<LinearLayout
android:id="@+id/linear_dob"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="30dp"
android:layout_marginTop="15dp"
android:layout_marginRight="30dp"
android:layout_marginBottom="5dp"
android:orientation="vertical">
<TextView
android:id="@+id/textView13"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:text="Date of birth" />
<EditText
android:id="@+id/editText_dob"
android:layout_width="match_parent"
android:layout_height="35dp"
android:background="@drawable/custom_edit_text_register_activity"
android:inputType="date"
android:paddingLeft="5dp"
android:paddingRight="5dp"
android:textSize="12sp" />
</LinearLayout>
<LinearLayout
android:id="@+id/linear_address"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="30dp"
android:layout_marginTop="15dp"
android:layout_marginRight="30dp"
android:layout_marginBottom="5dp"
android:orientation="vertical">
<TextView
android:id="@+id/textView13"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:text="Address" />
<EditText
android:id="@+id/editText_address"
android:layout_width="match_parent"
android:layout_height="35dp"
android:background="@drawable/custom_edit_text_register_activity"
android:inputType="textPersonName"
android:paddingLeft="5dp"
android:paddingRight="5dp"
android:textSize="12sp" />
</LinearLayout>
<LinearLayout
android:id="@+id/linear_city"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="30dp"
android:layout_marginTop="15dp"
android:layout_marginRight="30dp"
android:layout_marginBottom="5dp"
android:orientation="vertical">
<TextView
android:id="@+id/textView13"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:text="City" />
<EditText
android:id="@+id/editText_city"
android:layout_width="match_parent"
android:layout_height="35dp"
android:background="@drawable/custom_edit_text_register_activity"
android:inputType="textPersonName"
android:paddingLeft="5dp"
android:paddingRight="5dp"
android:textSize="12sp" />
</LinearLayout>
<LinearLayout
android:id="@+id/linear_state"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="30dp"
android:layout_marginTop="15dp"
android:layout_marginRight="30dp"
android:layout_marginBottom="5dp"
android:orientation="vertical">
<TextView
android:id="@+id/textView13"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:text="State" />
<Spinner
android:id="@+id/spinner_state"
android:layout_width="match_parent"
android:layout_height="35dp"
android:background="@drawable/custom_spinner_topap_activity"
android:entries="@array/spinner_state"
android:inputType="textPersonName"
android:paddingLeft="5dp"
android:paddingRight="5dp" />
</LinearLayout>
<LinearLayout
android:id="@+id/linear_postalCode"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="30dp"
android:layout_marginTop="15dp"
android:layout_marginRight="30dp"
android:layout_marginBottom="5dp"
android:orientation="vertical">
<TextView
android:id="@+id/textView13"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:text="Postal Code" />
<EditText
android:id="@+id/editText_postalCode"
android:layout_width="match_parent"
android:layout_height="35dp"
android:background="@drawable/custom_edit_text_register_activity"
android:inputType="number"
android:paddingLeft="5dp"
android:paddingRight="5dp"
android:textSize="12sp" />
</LinearLayout>
<LinearLayout
android:id="@+id/linear_mobile"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="30dp"
android:layout_marginTop="15dp"
android:layout_marginRight="30dp"
android:layout_marginBottom="5dp"
android:orientation="vertical">
<TextView
android:id="@+id/textView13"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:text="Phone No" />
<EditText
android:id="@+id/editText_mobile"
android:layout_width="match_parent"
android:layout_height="35dp"
android:background="@drawable/custom_edit_text_register_activity"
android:inputType="number"
android:paddingLeft="5dp"
android:paddingRight="5dp"
android:text="+60"
android:textSize="12sp" />
</LinearLayout>
<Button
android:id="@+id/button_register"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="30dp"
android:layout_marginTop="15dp"
android:layout_marginRight="30dp"
android:layout_marginBottom="5dp"
android:background="@color/colorBackground"
android:text="Register"
android:textColor="@android:color/white" />
</LinearLayout>
</ScrollView>
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:focusable="true"
android:focusableInTouchMode="true"
tools:context=".Activity.TopapActivity">
<LinearLayout
android:id="@+id/linear_header"
android:layout_width="match_parent"
android:layout_height="60dp"
android:background="@color/colorBackground"
android:gravity="center"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="horizontal">
<ImageView
android:id="@+id/imageView_back"
android:layout_width="35dp"
android:layout_height="30dp"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:layout_marginLeft="8dp"
app:srcCompat="@drawable/icon_back"
tools:ignore="VectorDrawableCompat" />
<TextView
android:id="@+id/textView_Register"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginRight="40dp"
android:gravity="center"
android:text="TOP UP"
android:textColor="@android:color/white"
android:textSize="18sp" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/white"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="30dp"
android:background="@android:color/white"
android:orientation="vertical">
<TextView
android:id="@+id/textView3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="25dp"
android:gravity="center"
android:text="Destination Info"
android:textColor="@android:color/black"
android:textSize="18sp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:orientation="vertical">
<TextView
android:id="@+id/textView4"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:text="Select Country :" />
<com.toptoche.searchablespinnerlibrary.SearchableSpinner
android:id="@+id/spinner_country"
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@drawable/custom_spinner_topap_activity" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<TextView
android:id="@+id/textView_receiver"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="5dp"
android:text="+6"
android:textColor="@android:color/black"
android:textSize="16sp" />
<EditText
android:id="@+id/editText_receiver"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ems="10"
android:inputType="number"
android:paddingRight="10dp" />
</LinearLayout>
</LinearLayout>
<Button
android:id="@+id/button_operator"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:background="@color/colorBackground"
android:text="choose operator"
android:textColor="@android:color/white" />
<LinearLayout
android:id="@+id/linear_sender"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="25dp"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<TextView
android:id="@+id/textView_sender"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="5dp"
android:text="+6"
android:textColor="@android:color/black"
android:textSize="16sp" />
<EditText
android:id="@+id/editText_sender"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ems="10"
android:hint="Sender Phone Number"
android:inputType="number" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/linear_reference"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:orientation="vertical">
<android.support.design.widget.TextInputLayout
android:id="@+id/till_reference"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<android.support.design.widget.TextInputEditText
android:id="@+id/et_reference"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:hint="Reference Text"
android:inputType="textEmailAddress"
android:textSize="14sp" />
</android.support.design.widget.TextInputLayout>
</LinearLayout>
<Button
android:id="@+id/button_topap"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:background="@color/colorBackground"
android:text="TOP UP"
android:textColor="@android:color/white" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/custom_operator_dialog"
android:focusable="true"
android:focusableInTouchMode="true"
android:minWidth="300dp"
android:minHeight="350dp"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_marginRight="15dp"
android:gravity="right"
android:orientation="horizontal">
<ImageView
android:id="@+id/imageView_cancel"
android:layout_width="35dp"
android:layout_height="35dp"
app:srcCompat="@drawable/icon_cancel" />
</LinearLayout>
<TextView
android:id="@+id/textView5"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_marginBottom="20dp"
android:gravity="center"
android:text="DETAILS TOP UP"
android:textColor="@android:color/white"
android:textSize="18sp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="40dp"
android:gravity="right"
android:orientation="vertical">
<TextView
android:id="@+id/textView6"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:text="Please choose operator :"
android:textColor="@android:color/white" />
<Spinner
android:id="@+id/spinner_operator"
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@drawable/custom_spinner_topap_activity" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="40dp"
android:layout_marginRight="40dp"
android:gravity="right"
android:orientation="vertical">
<TextView
android:id="@+id/textView6"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:text="Please select value :"
android:textColor="@android:color/white" />
<Spinner
android:id="@+id/spinner_value"
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@drawable/custom_spinner_topap_activity" />
</LinearLayout>
<Button
android:id="@+id/button_next"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="40dp"
android:layout_marginTop="30dp"
android:layout_marginRight="40dp"
android:layout_marginBottom="50dp"
android:background="@color/colorButtonHijau"
android:text="Next"
android:textColor="@android:color/white" />
</LinearLayout>
\ No newline at end of file
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/white"
android:focusable="true"
android:focusableInTouchMode="true"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="15dp"
android:background="@android:color/white"
android:orientation="vertical">
<TextView
android:id="@+id/textView7"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="ID NUMBER"
android:textColor="@android:color/black" />
<TextView
android:id="@+id/textView_idNo"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="930531045023" />
<TextView
android:id="@+id/textView10"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:text="USERNAME"
android:textColor="@android:color/black" />
<TextView
android:id="@+id/textView_email"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="amirfirdaus@maxmoney.com" />
<TextView
android:id="@+id/textView12"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:text="NAME"
android:textColor="@android:color/black" />
<TextView
android:id="@+id/textView_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="AMIR FIRDAUS" />
</LinearLayout>
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string-array name="nature_of_business">
<item>Please choose nature of business</item>
<item>Accountants</item>
<item>Banking</item>
<item>Casino</item>
<item>Company Secretaries</item>
<item>Development Financial Institutions</item>
<item>E-Money</item>
<item>Gaming Companies</item>
<item>Jewellers</item>
<item>Lawyers</item>
<item>Banking</item>
<item>Leasing And Factoring</item>
<item>Life Insurance</item>
<item>Money Changers</item>
<item>Money Lenders</item>
<item>Non-Profit Organization</item>
<item>Non-Bank Deposit Taking Companies</item>
<item>Non-Bank Cards</item>
<item>Notaries</item>
<item>Offshore Banks</item>
<item>Real Estate</item>
</string-array>
<string-array name="orderPurpose">
<item>Vacation</item>
<item>Business</item>
<item>Shopping</item>
<item>Own Expenses</item>
<item>Medical</item>
<item>Education</item>
<item>Gambling</item>
<item>Others</item>
<item>Gift</item>
<item>Family</item>
</string-array>
<string-array name="accType">
<item>Please choose account type</item>
<item>Personal</item>
<item>Business</item>
</string-array>
<string-array name="idType">
<item>Please choose Id type</item>
<item>NRIC</item>
<item>Passport</item>
</string-array>
</resources>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string-array name="sourceOfIncome">
<item>Please choose source of income</item>
<item>Individual</item>
<item>3rd Party / Representative</item>
<item>Businesses</item>
<item>Salary</item>
</string-array>
</resources>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string-array name="spinner_state">
<item>Please choose state</item>
<item>KUALA LUMPUR</item>
<item>SABAH</item>
<item>SARAWAK</item>
<item>LABUAN</item>
<item>KELANTAN</item>
<item>TERENGGANU</item>
<item>PAHANG</item>
<item>JOHOR</item>
<item>MELAKA</item>
<item>NEGERI SEMBILAN</item>
<item>SELANGOR</item>
<item>PERAK</item>
<item>PENANG</item>
<item>KEDAH</item>
<item>PERLIS</item>
</string-array>
</resources>
\ No newline at end of file
...@@ -15,4 +15,15 @@ ...@@ -15,4 +15,15 @@
<item name="colorAccent">@android:color/black</item> <item name="colorAccent">@android:color/black</item>
</style> </style>
<!-- THEME DIALOG LOADING -->
<style name="CustomDialog" parent="android:Theme.Dialog">
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowBackground">@android:color/transparent</item>
</style>
<style name="myDialog" parent="Theme.AppCompat.Dialog">
<item name="android:windowNoTitle">true</item>
...
</style>
</resources> </resources>
...@@ -19,6 +19,7 @@ allprojects { ...@@ -19,6 +19,7 @@ allprojects {
google() google()
jcenter() jcenter()
maven { url "https://jitpack.io" } maven { url "https://jitpack.io" }
maven { url 'https://oss.jfrog.org/artifactory/oss-snapshot-local' }
} }
} }
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
# http://www.gradle.org/docs/current/userguide/build_environment.html # http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process. # Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings. # The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx1536m org.gradle.jvmargs=-Xmx4608m
# When configured, Gradle will run in incubating parallel mode. # When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit # This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment