// New Layout topap

parent e8fd5a1e
......@@ -37,4 +37,5 @@ dependencies {
implementation 'com.android.support:design:28.0.0'
implementation 'com.toptoche.searchablespinner:searchablespinnerlibrary:1.3.1'
implementation 'com.jsibbold:zoomage:1.2.0-SNAPSHOT'
implementation 'com.github.chrisbanes:PhotoView:2.1.3'
}
......@@ -17,7 +17,11 @@
android:supportsRtl="true"
android:theme="@style/AppThemeNoActionBar"
android:usesCleartextTraffic="true">
<activity android:name=".Activity.CddActivity"></activity>
<activity android:name=".ActivityV2.TopapActivityV2"></activity>
<activity android:name=".Activity.downloadWebView" />
<activity android:name=".Activity.TopupLedgerActivity" />
<activity android:name=".Activity.UserSearchActivity" />
<activity android:name=".Activity.CddActivity" />
<activity android:name=".Activity.CddSearchActivity" />
<activity android:name=".Activity.RegistrationActivity" />
<activity android:name=".Activity.ApproveCustomerClickActivity" />
......
......@@ -17,6 +17,7 @@ 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.ActivityV2.TopapActivityV2;
import com.maxmoney.maxcddconsole.Common.StandardProgressDialog;
import com.maxmoney.maxcddconsole.Connectivity.BasedUrl;
import com.maxmoney.maxcddconsole.R;
......@@ -42,6 +43,7 @@ public class DashboardActivity extends AppCompatActivity implements View.OnClick
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;
TextView textView_topap_ledger;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
......@@ -54,6 +56,7 @@ public class DashboardActivity extends AppCompatActivity implements View.OnClick
textView_title = findViewById(R.id.textView_title);
standardProgressDialog.show();
button_logout = findViewById(R.id.button_logout);
textView_topap_ledger = findViewById(R.id.textView_topap_ledger);
linear_customer_main = findViewById(R.id.linear_customer_main);
linear_topap_main = findViewById(R.id.linear_topap_main);
......@@ -67,12 +70,14 @@ public class DashboardActivity extends AppCompatActivity implements View.OnClick
linear_approve = findViewById(R.id.linear_approve);
linear_user_search_c = findViewById(R.id.linear_user_search_c);
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
linear_user_all.setOnClickListener(this); //USER SEARCH
linear_user_search_c.setOnClickListener(this); //USER SEARCH
textView_topap_ledger.setOnClickListener(this); //TOPAP LEDGER
getUserDetails();
......@@ -200,7 +205,7 @@ public class DashboardActivity extends AppCompatActivity implements View.OnClick
break;
}
case R.id.linear_topap : {
Intent next = new Intent(getApplicationContext(), TopapActivity.class);
Intent next = new Intent(getApplicationContext(), TopapActivityV2.class);
next.putExtra("session",session);
startActivity(next);
break;
......@@ -226,6 +231,28 @@ public class DashboardActivity extends AppCompatActivity implements View.OnClick
startActivity(next);
break;
}
case R.id.linear_user_search_c: {
Intent next = new Intent(getApplicationContext(),UserSearchActivity.class);
next.putExtra("session",session);
startActivity(next);
break;
}
case R.id.linear_user_all: {
Intent next = new Intent(getApplicationContext(),UserSearchActivity.class);
next.putExtra("session",session);
startActivity(next);
break;
}
case R.id.textView_topap_ledger:{
Intent next = new Intent(getApplicationContext(),TopupLedgerActivity.class);
next.putExtra("session",session);
startActivity(next);
break;
}
}
}
......
......@@ -51,6 +51,8 @@ public class LoginActivity extends AppCompatActivity {
editText_password = findViewById(R.id.editText_password);
button_login = findViewById(R.id.button_login);
editText_email.setText("maxcdd@maxmoney.com");
editText_password.setText("moos");
button_login.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
......
......@@ -2,6 +2,7 @@ package com.maxmoney.maxcddconsole.Activity;
import android.content.Intent;
import android.media.Image;
import android.os.Handler;
import android.support.design.widget.TextInputEditText;
import android.support.v7.app.AlertDialog;
import android.support.v7.app.AppCompatActivity;
......@@ -19,7 +20,10 @@ 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.RetryPolicy;
import com.android.volley.VolleyError;
import com.android.volley.toolbox.StringRequest;
import com.android.volley.toolbox.Volley;
......@@ -61,6 +65,7 @@ public class TopapActivity extends AppCompatActivity implements View.OnClickList
String current_topap_operator = "",current_operator_id="";
TextView textView_amount,textView_topapRate,textView_serviceFee,textView_totalAmout;
LinearLayout linear_details;
boolean status_select = false;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
......@@ -174,6 +179,7 @@ public class TopapActivity extends AppCompatActivity implements View.OnClickList
if(editText_receiver.getText().toString().equals("")){
editText_receiver.setError("Please insert value");
}else{
standardProgressDialog.show();
getTopapProduct();
}
break;
......@@ -185,6 +191,8 @@ public class TopapActivity extends AppCompatActivity implements View.OnClickList
Toast.makeText(getApplicationContext(),"Please insert sender phone num and choose operator",Toast.LENGTH_SHORT).show();
}else{
standardProgressDialog.show();
current_operator_id = "";
current_topap_operator = "";
topap();
}
......@@ -238,7 +246,7 @@ public class TopapActivity extends AppCompatActivity implements View.OnClickList
params.put("operatorId",operatorId);
}
Log.d("param",params.toString());
return params;
}
......@@ -249,7 +257,10 @@ public class TopapActivity extends AppCompatActivity implements View.OnClickList
return headers;
}
};
RequestQueue requestQueue = Volley.newRequestQueue(getApplicationContext());
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);
}
......@@ -275,7 +286,7 @@ public class TopapActivity extends AppCompatActivity implements View.OnClickList
@Override
public void onResponse(String response) {
standardProgressDialog.dismiss();
Log.d("RESPONSE ",response);
Log.d("RESPONSE getTopap",response);
try {
JSONObject obj = new JSONObject(response);
current_topap_operator = obj.getString("operator");
......@@ -307,11 +318,14 @@ public class TopapActivity extends AppCompatActivity implements View.OnClickList
return headers;
}
};
RequestQueue requestQueue = Volley.newRequestQueue(getApplicationContext());
stringRequest.setRetryPolicy(new DefaultRetryPolicy( 50000, 5, DefaultRetryPolicy.DEFAULT_BACKOFF_MULT));
RequestQueue requestQueue = Volley.newRequestQueue(this);
requestQueue.add(stringRequest);
}
private void showDialogOperator(String countryId) {
standardProgressDialog.dismiss();
mBuilderOperator = new AlertDialog.Builder(TopapActivity.this, R.style.CustomDialog);
final View mView = getLayoutInflater().inflate(R.layout.dialog_operator, null);
mBuilderOperator.setView(mView);
......@@ -320,12 +334,13 @@ public class TopapActivity extends AppCompatActivity implements View.OnClickList
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);
final 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) {
operatorId = "";
mDialogOperator.dismiss();
status_operator = false;
linear_details.setVisibility(View.GONE);
......@@ -335,16 +350,23 @@ public class TopapActivity extends AppCompatActivity implements View.OnClickList
button_next.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if(spinner_value.getSelectedItem().toString().contains("Please choose top up value in")){
Toast.makeText(mView.getContext(),"Please select top up value first",Toast.LENGTH_SHORT).show();
}else{
mDialogOperator.dismiss();
status_operator = true;
linear_details.setVisibility(View.VISIBLE);
}
}
});
getOperator(mView,spinner_operator,countryId,spinner_value);
}
public void getOperator(final View mView, final Spinner spinner_operator, final String countryId, final Spinner spinner_value){
Log.d("first","first");
operatorNames=new ArrayList<>();
StringRequest stringRequest = new StringRequest(GET, BasedUrl.URL_STAGING +"topup/"+countryId+"/operators",
new com.android.volley.Response.Listener<String>() {
......@@ -359,10 +381,11 @@ public class TopapActivity extends AppCompatActivity implements View.OnClickList
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);
}
operatorOnselect(mView,spinner_operator,countryId,spinner_value);
spinner_operator.setAdapter(new ArrayAdapter<String>(mView.getContext(), android.R.layout.simple_spinner_dropdown_item, operatorNames));
spinner_operator.setSelection(getIndex(spinner_operator, current_topap_operator));
getSpinnerValue(mView,spinner_value,current_operator_id);
Log.d("current_operator_id",current_operator_id);
}
......@@ -391,11 +414,19 @@ public class TopapActivity extends AppCompatActivity implements View.OnClickList
return headers;
}
};
RequestQueue requestQueue = Volley.newRequestQueue(getApplicationContext());
stringRequest.setRetryPolicy(new DefaultRetryPolicy( 50000, 5, DefaultRetryPolicy.DEFAULT_BACKOFF_MULT));
final RequestQueue requestQueue = Volley.newRequestQueue(mView.getContext());
requestQueue.add(stringRequest);
requestQueue.addRequestFinishedListener(new RequestQueue.RequestFinishedListener<Object>() {
@Override
public void onRequestFinished(Request<Object> request) {
requestQueue.getCache().clear();
}
});
}
public void operatorOnselect(final View mView, final Spinner spinner_operator, final String countryId, final Spinner spinner_value){
Log.d("second","second");
StringRequest stringRequest = new StringRequest(GET, BasedUrl.URL_STAGING +"topup/"+countryId+"/operators",
new com.android.volley.Response.Listener<String>() {
@Override
......@@ -412,7 +443,6 @@ public class TopapActivity extends AppCompatActivity implements View.OnClickList
JSONObject objOPP = arrOPerator.getJSONObject(i);
if(spinner.equals(objOPP.getString("operator"))){
operatorId = objOPP.getString("operatorId");
getSpinnerValue(mView,spinner_value,operatorId);
Log.d("operatorId",operatorId);
}
......@@ -447,16 +477,25 @@ public class TopapActivity extends AppCompatActivity implements View.OnClickList
return headers;
}
};
RequestQueue requestQueue = Volley.newRequestQueue(getApplicationContext());
stringRequest.setRetryPolicy(new DefaultRetryPolicy( 50000, 5, DefaultRetryPolicy.DEFAULT_BACKOFF_MULT));
final RequestQueue requestQueue = Volley.newRequestQueue(mView.getContext());
requestQueue.add(stringRequest);
requestQueue.addRequestFinishedListener(new RequestQueue.RequestFinishedListener<Object>() {
@Override
public void onRequestFinished(Request<Object> request) {
requestQueue.getCache().clear();
}
});
}
public void getSpinnerValue(final View mView, final Spinner spinner_value, String operatorId){
Log.d("third","third");
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) {
Log.d("RESPONSE getSpinner",response);
standardProgressDialog.dismiss();
try {
JSONObject obj = new JSONObject(response);
......@@ -466,8 +505,9 @@ public class TopapActivity extends AppCompatActivity implements View.OnClickList
for(int i = 0; i <arrOPerator.length(); i++){
valueNames.add(arrOPerator.getString(i));
}
valueOnselect(mView,spinner_value,spinner_value);
valueOnselect(mView,spinner_value);
spinner_value.setAdapter(new ArrayAdapter<String>(mView.getContext(), android.R.layout.simple_spinner_dropdown_item, valueNames));
}
} catch (JSONException e) {
e.printStackTrace();
......@@ -494,51 +534,71 @@ public class TopapActivity extends AppCompatActivity implements View.OnClickList
return headers;
}
};
RequestQueue requestQueue = Volley.newRequestQueue(getApplicationContext());
stringRequest.setRetryPolicy(new DefaultRetryPolicy( 50000, 5, DefaultRetryPolicy.DEFAULT_BACKOFF_MULT));
final RequestQueue requestQueue = Volley.newRequestQueue(mView.getContext());
requestQueue.add(stringRequest);
requestQueue.addRequestFinishedListener(new RequestQueue.RequestFinishedListener<Object>() {
@Override
public void onRequestFinished(Request<Object> request) {
requestQueue.getCache().clear();
}
});
}
public void valueOnselect(final View mView, final Spinner spinner_operator, final Spinner spinner_value){
public void valueOnselect(final View mView, final Spinner spinner_operator){
if(operatorId.equals("")){
operatorId = current_operator_id;
}
Log.d("operatorId",operatorId);
Log.d("current_operator_id",current_operator_id);
spinner_operator.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
final String spinner = parent.getItemAtPosition(position).toString();
Log.d("spinner",spinner);
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();
Log.d("four",response);
try {
JSONObject obj = new JSONObject(response);
if(obj.has("productList")){
JSONArray arrs = new JSONArray(obj.getString("retailPriceList"));
JSONArray who = new JSONArray(obj.getString("wholeSalePriceList"));
destinationCurrency = obj.getString("destinationCurrency");
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);
destinationCurrency = obj.getString("destinationCurrency");
Log.d("value",value);
Log.d("destinationCurrency",destinationCurrency);
Log.d("retails_value",retails_value);
textView_amount.setText(value+" "+destinationCurrency);
textView_topapRate.setText(retails_value+" "+destinationCurrency);
textView_topapRate.setText(retails_value+" MYR");
textView_serviceFee.setText("0 MYR");
textView_totalAmout.setText(retails_value+" "+destinationCurrency);
textView_totalAmout.setText(retails_value+" MYR");
}
}
}
}catch (JSONException e){
e.printStackTrace();
}
}
public void onNothingSelected(AdapterView<?> parent) {
}
});
}
},
new com.android.volley.Response.ErrorListener() {
......@@ -561,14 +621,29 @@ public class TopapActivity extends AppCompatActivity implements View.OnClickList
return headers;
}
};
RequestQueue requestQueue = Volley.newRequestQueue(getApplicationContext());
RequestQueue requestQueue = Volley.newRequestQueue(mView.getContext());
requestQueue.add(stringRequest);
}
public void onNothingSelected(AdapterView<?> parent) {
}
});
}
private void test(String response, String spinner) {
}
private int getIndex(Spinner spinner, String myString){
for (int i=0;i<spinner.getCount();i++){
if (spinner.getItemAtPosition(i).toString().equalsIgnoreCase(myString)){
return i;
}
}
......
package com.maxmoney.maxcddconsole.Activity;
import android.app.DownloadManager;
import android.content.ActivityNotFoundException;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Build;
import android.os.Environment;
import android.os.StrictMode;
import android.support.v4.content.FileProvider;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.text.Html;
import android.util.Log;
import android.view.View;
import android.webkit.MimeTypeMap;
import android.widget.AbsListView;
import android.widget.ListView;
import android.widget.TextView;
import android.widget.Toast;
import com.android.volley.AuthFailureError;
import com.android.volley.Header;
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.TopUpLedgerAdapter;
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.BufferedInputStream;
import java.io.BufferedWriter;
import java.io.ByteArrayInputStream;
import java.io.DataInputStream;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.UnsupportedEncodingException;
import java.io.Writer;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLConnection;
import java.net.URLEncoder;
import java.sql.Blob;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import static android.os.Environment.DIRECTORY_DCIM;
import static com.android.volley.Request.Method.GET;
import static com.android.volley.Request.Method.POST;
public class TopupLedgerActivity extends AppCompatActivity implements AbsListView.OnScrollListener{
ListView list;
String session;
StandardProgressDialog standardProgressDialog;
private ArrayList<Map<String, String>> data = null;
private TopUpLedgerAdapter mPLAdapter;
private int currentPagination = 1;
private int total = 100;
TextView textView_downloadSUmmary;
DownloadManager downloadManager;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_topup_ledger);
StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();
StrictMode.setThreadPolicy(policy);
session = getIntent().getStringExtra("session");
standardProgressDialog = new StandardProgressDialog(this.getWindow().getContext());
list = findViewById(R.id.listView);
textView_downloadSUmmary = findViewById(R.id.textView_downloadSUmmary);
standardProgressDialog.show();
getTotalTopap();
textView_downloadSUmmary.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
standardProgressDialog.show();
downloadFile();
}
});
}
@Override
public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) {
if (totalItemCount >0 && list != null) {
int lastPosition = list.getLastVisiblePosition();
if (lastPosition + 1 == totalItemCount && data.size() < total) {
Log.d("data", String.valueOf(data.size()));
Log.d("data", String.valueOf(total));
currentPagination++;
getDetailsTopap();
}
}
}
@Override
public void onScrollStateChanged(AbsListView view, int scrollState) {
}
private void getTotalTopap() {
data = new ArrayList<Map<String, String>>(); // data
mPLAdapter = new TopUpLedgerAdapter(getApplicationContext(), data);
list.setAdapter(mPLAdapter);
list.setOnScrollListener(this);
StringRequest stringRequest = new StringRequest(GET, BasedUrl.URL_STAGING +"topup/my-ledger",
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));
getDetailsTopap();
standardProgressDialog.dismiss();
} 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);
}
private void getDetailsTopap() {
StringRequest stringRequest = new StringRequest(GET, BasedUrl.URL_STAGING +"topup/my-ledger?page="+currentPagination,
new com.android.volley.Response.Listener<String>() {
@Override
public void onResponse(String response) {
try {
Log.d("response",response);
JSONObject obj1 = new JSONObject(response);
JSONArray array = obj1.getJSONArray("entries");
for(int i = 0; i< array.length(); i++){
JSONObject product = array.getJSONObject(i);
double profit = 0.0;
if(product.has("retailPrice")){
if(!product.getString("retailPrice").equals("") && !product.getString("agentPrice").equals("")){
profit = Double.parseDouble(product.getString("retailPrice")) - Double.parseDouble(product.getString("agentPrice"));
}
}
Map<String, String> addData = new HashMap<String, String>();
addData.put("msg1", "MOBILE NO :"+product.getString("mobileNo"));
addData.put("msg2", product.getString("status"));
addData.put("msg3", product.getString("country"));
addData.put("msg4", product.getString("product"));
addData.put("msg5", product.getString("debit"));
addData.put("msg6", "RM "+product.getString("balance"));
addData.put("msg7", String.format("%.3f",profit));
addData.put("msg8", product.getString("time"));
addData.put("msg9", product.getString("description"));
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);
}
private void downloadFile(){
downloadManager = (DownloadManager) getSystemService(Context.DOWNLOAD_SERVICE);
Uri uri = Uri.parse("https://www.maxmoney.com/my/app/android/excel.php?api-key="+session);
DownloadManager.Request request = new DownloadManager.Request(uri);
request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED);
Long reference = downloadManager.enqueue(request);
standardProgressDialog.dismiss();
Toast.makeText(getApplicationContext(),"File download",Toast.LENGTH_SHORT).show();
}
}
package com.maxmoney.maxcddconsole.Activity;
import android.content.Intent;
import android.support.v7.app.AlertDialog;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
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.github.chrisbanes.photoview.PhotoView;
import com.maxmoney.maxcddconsole.Common.StandardProgressDialog;
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.io.UnsupportedEncodingException;
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 UserSearchActivity extends AppCompatActivity {
LinearLayout linear_user_details;
TextView textView_customerType,textView_pid,textView_status;
EditText editText_fullName,editText_email,editText_idType,editText_idNo,editText_dob,editText_address,
editText_city,editText_country,editText_nationality,editText_mobile,editText_state,editText_postalCode,
editText_companyName,editText_companyType,editText_incomeSource,editText_natureSource,editText_createTime,
editText_createBy,editText_validateAt,editText_validateBy,editText_complienceAt,editText_complienceBy,editText_search;
ImageView image_front,image_back;
ImageView imageView_back;
Button button_sms,button_search;
StandardProgressDialog standardProgressDialog;
String session,imageBack,imageFront;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_user_search);
session = getIntent().getStringExtra("session");
standardProgressDialog = new StandardProgressDialog(this.getWindow().getContext());
linear_user_details = findViewById(R.id.linear_user_details);
textView_customerType = findViewById(R.id.textView_customerType);
textView_pid = findViewById(R.id.textView_pid);
textView_status = findViewById(R.id.textView_status);
editText_fullName = findViewById(R.id.editText_fullName);
editText_fullName.setFocusable(false);
editText_email = findViewById(R.id.editText_email);
editText_email.setFocusable(false);
editText_idType = findViewById(R.id.editText_idType);
editText_idType.setFocusable(false);
editText_idNo = findViewById(R.id.editText_idNo);
editText_idType.setFocusable(false);
editText_dob = findViewById(R.id.editText_dob);
editText_dob.setFocusable(false);
editText_address = findViewById(R.id.editText_address);
editText_address.setFocusable(false);
editText_city = findViewById(R.id.editText_city);
editText_city.setFocusable(false);
editText_country = findViewById(R.id.editText_country);
editText_country.setFocusable(false);
editText_nationality = findViewById(R.id.editText_nationality);
editText_nationality.setFocusable(false);
editText_mobile = findViewById(R.id.editText_mobile);
editText_mobile.setFocusable(false);
editText_state = findViewById(R.id.editText_state);
editText_state.setFocusable(false);
editText_postalCode = findViewById(R.id.editText_postalCode);
editText_postalCode.setFocusable(false);
editText_companyName = findViewById(R.id.editText_companyName);
editText_companyName.setFocusable(false);
editText_companyType = findViewById(R.id.editText_companyType);
editText_companyType.setFocusable(false);
editText_incomeSource = findViewById(R.id.editText_incomeSource);
editText_incomeSource.setFocusable(false);
editText_natureSource = findViewById(R.id.editText_natureSource);
editText_natureSource.setFocusable(false);
editText_createTime = findViewById(R.id.editText_createTime);
editText_createTime.setFocusable(false);
editText_createBy = findViewById(R.id.editText_createBy);
editText_createBy.setFocusable(false);
editText_validateAt = findViewById(R.id.editText_validateAt);
editText_validateAt.setFocusable(false);
editText_validateBy = findViewById(R.id.editText_validateBy);
editText_validateBy.setFocusable(false);
editText_complienceAt = findViewById(R.id.editText_complienceAt);
editText_complienceAt.setFocusable(false);
editText_complienceBy = findViewById(R.id.editText_complienceBy);
editText_complienceBy.setFocusable(false);
image_front = findViewById(R.id.image_front);
image_back = findViewById(R.id.image_back);
button_sms = findViewById(R.id.button_sms);
imageView_back = findViewById(R.id.imageView_back);
button_search = findViewById(R.id.button_search);
editText_search = findViewById(R.id.editText_search);
button_search.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if(editText_search.getText().toString().equals("")){
editText_search.setError("Please enter id");
}else{
standardProgressDialog.show();
userSearch();
}
}
});
imageView_back.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
onBackPressed();
}
});
image_front.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
AlertDialog.Builder mBuilder = new AlertDialog.Builder(UserSearchActivity.this);
View mView = getLayoutInflater().inflate(R.layout.dialog_custom_layout, null);
PhotoView photoView = mView.findViewById(R.id.imageView);
Picasso.get().load(imageFront).into(photoView);
mBuilder.setView(mView);
AlertDialog mDialog = mBuilder.create();
mDialog.show();
}
});
image_back.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
AlertDialog.Builder mBuilder = new AlertDialog.Builder(UserSearchActivity.this);
View mView = getLayoutInflater().inflate(R.layout.dialog_custom_layout, null);
PhotoView photoView = mView.findViewById(R.id.imageView);
Picasso.get().load(imageBack).into(photoView);
mBuilder.setView(mView);
AlertDialog mDialog = mBuilder.create();
mDialog.show();
}
});
}
@Override
public void onBackPressed() {
super.onBackPressed();
}
@Override
protected void onStart() {
super.onStart();
linear_user_details.setVisibility(View.GONE);
}
private void userSearch() {
StringRequest stringRequest = new StringRequest(GET, BasedUrl.URL_STAGING +"users/identification-document/"+editText_search.getText().toString(),
new com.android.volley.Response.Listener<String>() {
@Override
public void onResponse(String response) {
standardProgressDialog.dismiss();
linear_user_details.setVisibility(View.VISIBLE);
try {
JSONObject object = new JSONObject(response);
textView_customerType.setText("Customer Type : "+object.getString("customerType"));
textView_pid.setText("PID : "+object.getString("idNo"));
textView_status.setText("Status : "+object.getString("status"));
editText_fullName.setText(object.getString("fullName"));
editText_email.setText(object.getString("email"));
editText_idType.setText(object.getString("idType"));
editText_idNo.setText(object.getString("idNo"));
editText_dob.setText(createDate(Long.parseLong(object.getString("dob"))));
editText_mobile.setText(object.getString("mobile"));
editText_companyName.setText(object.getString("companyName"));
editText_companyType.setText(object.getString("companyType"));
editText_createTime.setText(createDate(Long.parseLong(object.getString("created"))));
editText_createBy.setText(object.getString("createdBy"));
editText_validateAt.setText(createDate(Long.parseLong(object.getString("validatedAt"))));
editText_validateBy.setText(object.getString("validatedBy"));
editText_complienceAt.setText(object.getString("complicateDoneAt"));
editText_complienceBy.setText(object.getString("complianceDoneBy"));
if(object.has("images")){
JSONObject img = new JSONObject(object.getString("images"));
if(object.getString("idType").equals("Passport")){
imageBack = BasedUrl.URL_STAGING+"customers/"+object.getString("idNo")+"/images/"+img.getString("Back")+"?api-key="+session;
imageFront = BasedUrl.URL_STAGING+"customers/"+object.getString("idNo")+"/images/"+img.getString("Front")+"?api-key="+session;
Picasso.get().load(imageBack).into(image_back);
Picasso.get().load(imageFront).into(image_front);
}else{
imageBack = BasedUrl.URL_STAGING+"customers/"+object.getString("idNo")+"/images/"+img.getString("Back")+"?api-key="+session;
imageFront = BasedUrl.URL_STAGING+"customers/"+object.getString("idNo")+"/images/"+img.getString("Front")+"?api-key="+session;
Picasso.get().load(imageBack).into(image_back);
Picasso.get().load(imageFront).into(image_front);
}
}
JSONObject riskProfile = new JSONObject(object.getString("riskProfile"));
JSONObject cddOBJ = new JSONObject(riskProfile.getString("cdd"));
editText_address.setText(cddOBJ.getString("address"));
editText_city.setText(cddOBJ.getString("city"));
editText_country.setText(cddOBJ.getString("country"));
editText_nationality.setText(cddOBJ.getString("nationality"));
editText_state.setText(cddOBJ.getString("state"));
editText_postalCode.setText(cddOBJ.getString("postalCode"));
JSONObject eddOBJ = new JSONObject(riskProfile.getString("edd"));
editText_incomeSource.setText(eddOBJ.getString("incomeSource"));
editText_natureSource.setText(eddOBJ.getString("natureOfBusiness"));
} catch (JSONException e) {
e.printStackTrace();
}
}
},
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>();
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) {
linear_user_details.setVisibility(View.GONE);
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) {
}
}
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);
}
}
package com.maxmoney.maxcddconsole.Activity;
import android.app.DownloadManager;
import android.content.DialogInterface;
import android.content.Intent;
import android.net.Uri;
import android.net.http.SslError;
import android.os.Environment;
import android.support.v7.app.AlertDialog;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Base64;
import android.util.Log;
import android.webkit.CookieManager;
import android.webkit.DownloadListener;
import android.webkit.GeolocationPermissions;
import android.webkit.SslErrorHandler;
import android.webkit.URLUtil;
import android.webkit.WebChromeClient;
import android.webkit.WebResourceResponse;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.Toast;
import com.maxmoney.maxcddconsole.R;
import java.net.URLEncoder;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;
public class downloadWebView extends AppCompatActivity {
WebView webView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_download_web_view);
webView = findViewById(R.id.webView);
webView.getSettings().setJavaScriptEnabled(true);
webView.getSettings().setAppCacheEnabled(true);
webView.getSettings().setDatabaseEnabled(true);
webView.getSettings().setDomStorageEnabled(true);
webView.getSettings().setSupportZoom(true);
webView.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);
webView.getSettings().setBuiltInZoomControls(true);
webView.getSettings().setGeolocationEnabled(true);
webView.setWebViewClient(new WebViewClient(){
@Override
public void onReceivedSslError(WebView view, final SslErrorHandler handler, SslError error) {
final AlertDialog.Builder builder = new AlertDialog.Builder(getApplicationContext());
String message = "SSL Certificate error.";
switch (error.getPrimaryError()) {
case SslError.SSL_UNTRUSTED:
message = "The certificate authority is not trusted.";
break;
case SslError.SSL_EXPIRED:
message = "The certificate has expired.";
break;
case SslError.SSL_IDMISMATCH:
message = "The certificate Hostname mismatch.";
break;
case SslError.SSL_NOTYETVALID:
message = "The certificate is not yet valid.";
break;
}
message += " Do you want to continue anyway?";
builder.setTitle("SSL Certificate Error");
builder.setMessage(message);
builder.setPositiveButton("continue", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
handler.proceed();
}
});
builder.setNegativeButton("cancel", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
handler.cancel();
}
});
final AlertDialog dialog = builder.create();
dialog.show();
}
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
// Here put your code for redirect
Log.d("url",url);
// return true; //Indicates WebView to NOT load the url;
return false; //Allow WebView to load url
}
});
webView.setWebChromeClient(new WebChromeClient(){
@Override
public void onGeolocationPermissionsShowPrompt(String origin, GeolocationPermissions.Callback callback) {
callback.invoke(origin, true, false);
}
});
String postData= "";
webView.postUrl("https://api-staging.maxmoney.com/v1/topup/my-reports?accountName=&mode=Summary&api-key=",postData.getBytes());
}
}
package com.maxmoney.maxcddconsole.ActivityV2;
import android.content.Intent;
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.DefaultRetryPolicy;
import com.android.volley.Request;
import com.android.volley.RequestQueue;
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.Activity.DashboardActivity;
import com.maxmoney.maxcddconsole.Activity.LoginActivity;
import com.maxmoney.maxcddconsole.Activity.TopapActivity;
import com.maxmoney.maxcddconsole.Common.StandardProgressDialog;
import com.maxmoney.maxcddconsole.Connectivity.BasedUrl;
import com.maxmoney.maxcddconsole.R;
import com.squareup.picasso.Picasso;
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 TopapActivityV2 extends AppCompatActivity implements View.OnClickListener {
// String image_operator_url = "https://fm.transfer-to.com:5443/logo_operator/logo-"++"-2.png";
SearchableSpinner spinner_country;
EditText editText_receiver;
Button button_continue;
String session;
StandardProgressDialog standardProgressDialog;
TextView textView_receiver,textView_changeOperator;
ArrayAdapter<String> spinnerNationalityAdapter;
ImageView imageView_operator;
Spinner spinner_value;
LinearLayout linear_operator;
String operator="",operatorId="",countryId="",retails_value = "",value="",whosale_price ="";
ArrayList<String> valueNames;
String destinationCurrency="";
AlertDialog.Builder mBuilderOperator;
AlertDialog mDialogOperator;
ArrayList<String> operatorNames;
LinearLayout linear_details;
TextView textView_amount,textView_topapRate,textView_serviceFee,textView_totalAmout;
TextView textView_sender;
EditText editText_sender;
TextInputEditText et_reference;
Button button_topap;
ImageView imageView_back;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_topap_v2);
session = getIntent().getStringExtra("session");
standardProgressDialog = new StandardProgressDialog(this.getWindow().getContext());
editText_receiver = findViewById(R.id.editText_receiver);
spinner_country = findViewById(R.id.spinner_country);
textView_receiver = findViewById(R.id.textView_receiver);
button_continue = findViewById(R.id.button_continue);
textView_changeOperator = findViewById(R.id.textView_changeOperator);
imageView_operator = findViewById(R.id.imageView_operator);
spinner_value = findViewById(R.id.spinner_value);
linear_operator = findViewById(R.id.linear_operator);
linear_details = findViewById(R.id.linear_details);
textView_amount = findViewById(R.id.textView_amount);
textView_topapRate = findViewById(R.id.textView_topapRate);
textView_serviceFee = findViewById(R.id.textView_serviceFee);
textView_totalAmout = findViewById(R.id.textView_totalAmout);
textView_sender = findViewById(R.id.textView_sender);
editText_sender = findViewById(R.id.editText_sender);
button_topap = findViewById(R.id.button_topap);
et_reference = findViewById(R.id.et_reference);
imageView_back = findViewById(R.id.imageView_back);
imageView_back.setOnClickListener(this);
button_continue.setOnClickListener(this);
textView_changeOperator.setOnClickListener(this);
button_topap.setOnClickListener(this);
linear_operator.setVisibility(View.GONE);
linear_details.setVisibility(View.GONE);
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"));
linear_operator.setVisibility(View.GONE);
linear_details.setVisibility(View.GONE);
// 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() {
super.onBackPressed();
}
@Override
public void onClick(View v) {
switch (v.getId()) {
case R.id.button_continue: {
linear_operator.setVisibility(View.GONE);
linear_details.setVisibility(View.GONE);
if (editText_receiver.getText().toString().equals("")) {
editText_receiver.setError("Please enter mobile no");
} else {
standardProgressDialog.show();
getOperator();
}
break;
}
case R.id.textView_changeOperator: {
openDialog();
break;
}
case R.id.button_topap:{
if(operatorId.equals("") || value.equals("")){
Toast.makeText(getApplicationContext(),"Operator not selected",Toast.LENGTH_SHORT).show();
}else {
standardProgressDialog.show();
topap();
}
break;
}
case R.id.imageView_back:{
onBackPressed();
break;
}
}
}
private void openDialog() {
linear_details.setVisibility(View.GONE);
mBuilderOperator = new AlertDialog.Builder(TopapActivityV2.this, R.style.CustomDialog);
final View mView = getLayoutInflater().inflate(R.layout.dialog_operator_v2, 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);
final Spinner spinner_value = mView.findViewById(R.id.spinner_value);
imageView_cancel.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mDialogOperator.dismiss();
}
});
getOperatorChoose(mView,spinner_operator);
}
public void getOperatorChoose(final View mView, final Spinner spinner_operator){
Log.d("first","first");
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);
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;
}
};
stringRequest.setRetryPolicy(new DefaultRetryPolicy( 50000, 5, DefaultRetryPolicy.DEFAULT_BACKOFF_MULT));
final RequestQueue requestQueue = Volley.newRequestQueue(mView.getContext());
requestQueue.add(stringRequest);
requestQueue.addRequestFinishedListener(new RequestQueue.RequestFinishedListener<Object>() {
@Override
public void onRequestFinished(Request<Object> request) {
requestQueue.getCache().clear();
}
});
}
public void operatorOnselect(final View mView, final Spinner spinner_operator){
valueNames =new ArrayList<>();
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");
operator = objOPP.getString("operator");
getSpinnerTopap();
}
}
}
}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;
}
};
stringRequest.setRetryPolicy(new DefaultRetryPolicy( 50000, 5, DefaultRetryPolicy.DEFAULT_BACKOFF_MULT));
final RequestQueue requestQueue = Volley.newRequestQueue(mView.getContext());
requestQueue.add(stringRequest);
requestQueue.addRequestFinishedListener(new RequestQueue.RequestFinishedListener<Object>() {
@Override
public void onRequestFinished(Request<Object> request) {
requestQueue.getCache().clear();
}
});
}
public void getSpinnerTopap(){
mDialogOperator.dismiss();
valueNames =new ArrayList<>();
String mobileNo = textView_receiver.getText().toString() + "" + editText_receiver.getText().toString();
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();
Log.d("RESPONSE getTopap", response);
try {
JSONObject obj = new JSONObject(response);
linear_operator.setVisibility(View.VISIBLE);
operator = obj.getString("operator");
operatorId = obj.getString("operatorId");
countryId = obj.getString("countryId");
Picasso.get().load("https://fm.transfer-to.com:5443/logo_operator/logo-"+operatorId+"-2.png").into(imageView_operator);
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));
}
spinner_value.setAdapter(new ArrayAdapter<String>(getApplicationContext(), android.R.layout.simple_spinner_dropdown_item, valueNames));
valueOnselect(spinner_value);
} 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;
}
};
stringRequest.setRetryPolicy(new DefaultRetryPolicy(50000, 5, DefaultRetryPolicy.DEFAULT_BACKOFF_MULT));
RequestQueue requestQueue = Volley.newRequestQueue(this);
requestQueue.add(stringRequest);
}
public void getOperator() {
valueNames =new ArrayList<>();
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();
Log.d("RESPONSE getTopap", response);
try {
JSONObject obj = new JSONObject(response);
linear_operator.setVisibility(View.VISIBLE);
operator = obj.getString("operator");
operatorId = obj.getString("operatorId");
countryId = obj.getString("countryId");
Picasso.get().load("https://fm.transfer-to.com:5443/logo_operator/logo-"+operatorId+"-2.png").into(imageView_operator);
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));
}
spinner_value.setAdapter(new ArrayAdapter<String>(getApplicationContext(), android.R.layout.simple_spinner_dropdown_item, valueNames));
valueOnselect(spinner_value);
} 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;
}
};
stringRequest.setRetryPolicy(new DefaultRetryPolicy(50000, 5, DefaultRetryPolicy.DEFAULT_BACKOFF_MULT));
RequestQueue requestQueue = Volley.newRequestQueue(this);
requestQueue.add(stringRequest);
}
public void valueOnselect(final Spinner spinner_operator){
spinner_operator.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
final String spinner = parent.getItemAtPosition(position).toString();
Log.d("spinner",spinner);
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();
try {
JSONObject obj = new JSONObject(response);
JSONArray arrs = new JSONArray(obj.getString("retailPriceList"));
JSONArray who = new JSONArray(obj.getString("wholeSalePriceList"));
destinationCurrency = obj.getString("destinationCurrency");
JSONArray arrOPerator = new JSONArray(obj.getString("productList"));
for(int i = 0; i <arrOPerator.length(); i++){
if(spinner.equals(arrOPerator.getString(i))){
value = spinner;
retails_value = arrs.getString(i);
whosale_price = who.getString(i);
Log.d("value",value);
Log.d("destinationCurrency",destinationCurrency);
Log.d("retails_value",retails_value);
linear_details.setVisibility(View.VISIBLE);
textView_amount.setText(value+" "+destinationCurrency);
textView_topapRate.setText(retails_value+" MYR");
textView_serviceFee.setText("0 MYR");
textView_totalAmout.setText(retails_value+" MYR");
}
}
}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 onNothingSelected(AdapterView<?> parent) {
}
});
}
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);
Log.d("param",params.toString());
return params;
}
@Override
public Map<String, String> getHeaders() throws AuthFailureError {
HashMap<String, String> headers = new HashMap();
headers.put("api-key",session);
return headers;
}
};
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);
}
}
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) {
}
}
}
package com.maxmoney.maxcddconsole.Adapter;
import android.content.Context;
import android.graphics.Color;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.LinearLayout;
import android.widget.TextView;
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 TopUpLedgerAdapter 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;
TextView tv4;
TextView tv5;
TextView tv6;
TextView tv7;
TextView tv8;
TextView tv9;
LinearLayout linear_status;
}
public TopUpLedgerAdapter(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_adapter_topap_ledger, null);
holder = new ViewHolder();
holder.linear_status = view.findViewById(R.id.linear_status);
holder.tv1 = view.findViewById(R.id.textView_mobile);
holder.tv2 = view.findViewById(R.id.textView_status);
holder.tv3 = view.findViewById(R.id.textView_country);
holder.tv4 = view.findViewById(R.id.textView_product);
holder.tv5 = view.findViewById(R.id.textView_debit);
holder.tv6 = view.findViewById(R.id.textView_balance);
holder.tv7 = view.findViewById(R.id.textView_profit);
holder.tv8 = view.findViewById(R.id.textView_time);
holder.tv9 = view.findViewById(R.id.textView_des);
view.setTag(holder);
} else {
holder = (ViewHolder) view.getTag();
}
if(data.get(position).get("msg2").equals("FAILURE")){
holder.linear_status.setBackgroundColor(Color.RED);
}else{
holder.linear_status.setBackgroundColor(Color.parseColor("#39B449"));
}
holder.tv1.setText(data.get(position).get("msg1"));
holder.tv2.setText(data.get(position).get("msg2"));
holder.tv3.setText(data.get(position).get("msg3"));
holder.tv4.setText(data.get(position).get("msg4"));
holder.tv5.setText(data.get(position).get("msg5"));
holder.tv6.setText(data.get(position).get("msg6"));
holder.tv7.setText(data.get(position).get("msg7"));
holder.tv8.setText(data.get(position).get("msg8"));
holder.tv9.setText(data.get(position).get("msg9"));
return view;
}
public void refreshData(ArrayList<Map<String, String>> newData) {
this.data = newData;
this.notifyDataSetChanged();
}
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);
}
}
\ No newline at end of file
......@@ -106,6 +106,17 @@
android:textColor="@android:color/black" />
</LinearLayout>
</LinearLayout>
<TextView
android:id="@+id/textView_topap_ledger"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:gravity="center"
android:text="View My TopUp Ledger"
android:textColor="@color/colorBackground"
android:textStyle="bold|italic" />
</LinearLayout>
</LinearLayout>
......
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout 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"
tools:context=".Activity.downloadWebView">
<WebView
android:id="@+id/webView"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</android.support.constraint.ConstraintLayout>
\ 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=".ActivityV2.TopapActivityV2">
<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>
<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:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="30dp"
android:layout_marginTop="20dp"
android:layout_marginRight="30dp"
android:layout_marginBottom="15dp"
android:orientation="vertical">
<TextView
android:id="@+id/textView24"
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="match_parent"
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="match_parent"
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_continue"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:background="@color/colorBackground"
android:text="Continue"
android:textColor="@android:color/white" />
<LinearLayout
android:id="@+id/linear_operator"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="20dp"
android:orientation="vertical">
<ImageView
android:id="@+id/imageView_operator"
android:layout_width="match_parent"
android:layout_height="100dp"
app:srcCompat="@drawable/icon_customer" />
<TextView
android:id="@+id/textView_changeOperator"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="CLICK HERE FOR CHANGE OPERATOR"
android:textColor="@color/colorBackground"
android:textStyle="bold" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="15dp"
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/black" />
<Spinner
android:id="@+id/spinner_value"
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@drawable/custom_spinner_topap_activity" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/linear_details"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="20dp"
android:layout_marginBottom="10dp"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="5dp"
android:orientation="horizontal">
<TextView
android:id="@+id/textView19"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Top Up Amount" />
<TextView
android:id="@+id/textView_amount"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="TextView" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="5dp"
android:orientation="horizontal">
<TextView
android:id="@+id/textView19"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Top Up Rate" />
<TextView
android:id="@+id/textView_topapRate"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="TextView" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="5dp"
android:orientation="horizontal">
<TextView
android:id="@+id/textView19"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Service Fee" />
<TextView
android:id="@+id/textView_serviceFee"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="TextView" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="5dp"
android:orientation="horizontal">
<TextView
android:id="@+id/textView19"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Total Amount" />
<TextView
android:id="@+id/textView_totalAmout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="TextView" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/linear_sender"
android:layout_width="match_parent"
android:layout_height="match_parent"
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="match_parent"
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>
</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.TopupLedgerActivity">
<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="MY TOPUP LEDGER"
android:textColor="@android:color/white"
android:textSize="18sp" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="30dp"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginBottom="10dp"
android:orientation="horizontal">
<TextView
android:id="@+id/textView22"
android:layout_width="100dp"
android:layout_height="match_parent"
android:layout_marginRight="10dp"
android:gravity="center"
android:text="From (dd-mm-yyyy)" />
<EditText
android:id="@+id/editText"
android:layout_width="match_parent"
android:layout_height="40dp"
android:background="@drawable/custom_edit_text_register_activity"
android:ems="10"
android:inputType="textPersonName"
android:paddingLeft="10dp"
android:textSize="12sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<TextView
android:id="@+id/textView22"
android:layout_width="100dp"
android:layout_height="match_parent"
android:layout_marginRight="10dp"
android:gravity="center"
android:text="To (dd-mm-yyyy)" />
<EditText
android:id="@+id/editText"
android:layout_width="match_parent"
android:layout_height="40dp"
android:background="@drawable/custom_edit_text_register_activity"
android:ems="10"
android:inputType="textPersonName"
android:paddingLeft="10dp"
android:textSize="12sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
android:orientation="horizontal">
<Button
android:id="@+id/button"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@android:color/holo_red_light"
android:text="SEARCH"
android:textColor="@android:color/white" />
<Button
android:id="@+id/button"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@color/colorBackground"
android:text="RESET"
android:textColor="@android:color/white" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginBottom="10dp"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<TextView
android:id="@+id/textView_downloadSUmmary"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="Download summary report"
android:textColor="@color/colorBackground"
android:textStyle="bold" />
<TextView
android:id="@+id/textView23"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="Download detailed report"
android:textColor="@color/colorBackground"
android:textStyle="bold" />
</LinearLayout>
</LinearLayout>
<ListView
android:id="@+id/listView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp">
</ListView>
</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.UserSearchActivity">
<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="USER SEARCH"
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:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="30dp"
android:orientation="vertical">
<TextView
android:id="@+id/textView21"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:text="IC/Passport No " />
<EditText
android:id="@+id/editText_search"
android:layout_width="match_parent"
android:layout_height="45dp"
android:background="@drawable/custom_edit_text_register_activity"
android:ems="10"
android:hint="Search user by id"
android:inputType="textPersonName"
android:paddingLeft="10dp"
android:paddingRight="10dp" />
<Button
android:id="@+id/button_search"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:background="@color/colorButtonHijau"
android:text="SEARCH"
android:textColor="@android:color/white" />
</LinearLayout>
<LinearLayout
android:id="@+id/linear_user_details"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="30dp"
android:layout_marginRight="30dp"
android:layout_marginBottom="20dp"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="@drawable/custom_linear_button"
android:gravity="center"
android:orientation="vertical">
<TextView
android:id="@+id/textView_customerType"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="Customer Type : Individual"
android:textColor="@android:color/black" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="@drawable/custom_linear_button"
android:gravity="center"
android:orientation="vertical">
<TextView
android:id="@+id/textView_pid"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="PID : 930531045023"
android:textColor="@android:color/black" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="@drawable/custom_linear_button"
android:gravity="center"
android:orientation="vertical">
<TextView
android:id="@+id/textView_status"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="Status : inactive "
android:textColor="@android:color/black" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:orientation="horizontal">
<TextView
android:id="@+id/textView25"
android:layout_width="100dp"
android:layout_height="match_parent"
android:gravity="center"
android:text="Name / Full Name" />
<EditText
android:id="@+id/editText_fullName"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_weight="1"
android:background="@drawable/custom_edit_text_register_activity"
android:inputType="textPersonName"
android:paddingLeft="10dp"
android:textSize="12sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:orientation="horizontal">
<TextView
android:id="@+id/textView25"
android:layout_width="100dp"
android:layout_height="match_parent"
android:gravity="center"
android:text="Email Id" />
<EditText
android:id="@+id/editText_email"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_weight="1"
android:background="@drawable/custom_edit_text_register_activity"
android:inputType="textPersonName"
android:paddingLeft="10dp"
android:textSize="12sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:orientation="horizontal">
<TextView
android:id="@+id/textView25"
android:layout_width="100dp"
android:layout_height="match_parent"
android:gravity="center"
android:text="Id Type" />
<EditText
android:id="@+id/editText_idType"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_weight="1"
android:background="@drawable/custom_edit_text_register_activity"
android:inputType="textPersonName"
android:paddingLeft="10dp"
android:textSize="12sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:orientation="horizontal">
<TextView
android:id="@+id/textView25"
android:layout_width="100dp"
android:layout_height="match_parent"
android:gravity="center"
android:text="Id No" />
<EditText
android:id="@+id/editText_idNo"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_weight="1"
android:background="@drawable/custom_edit_text_register_activity"
android:inputType="textPersonName"
android:paddingLeft="10dp"
android:textSize="12sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:orientation="horizontal">
<TextView
android:id="@+id/textView25"
android:layout_width="100dp"
android:layout_height="match_parent"
android:gravity="center"
android:text="Date Of Birth" />
<EditText
android:id="@+id/editText_dob"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_weight="1"
android:background="@drawable/custom_edit_text_register_activity"
android:inputType="textPersonName"
android:paddingLeft="10dp"
android:textSize="12sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:orientation="horizontal">
<TextView
android:id="@+id/textView25"
android:layout_width="100dp"
android:layout_height="match_parent"
android:gravity="center"
android:text="Address" />
<EditText
android:id="@+id/editText_address"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_weight="1"
android:background="@drawable/custom_edit_text_register_activity"
android:inputType="textPersonName"
android:paddingLeft="10dp"
android:textSize="12sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:orientation="horizontal">
<TextView
android:id="@+id/textView25"
android:layout_width="100dp"
android:layout_height="match_parent"
android:gravity="center"
android:text="City" />
<EditText
android:id="@+id/editText_city"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_weight="1"
android:background="@drawable/custom_edit_text_register_activity"
android:inputType="textPersonName"
android:paddingLeft="10dp"
android:textSize="12sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:orientation="horizontal">
<TextView
android:id="@+id/textView25"
android:layout_width="100dp"
android:layout_height="match_parent"
android:gravity="center"
android:text="Country" />
<EditText
android:id="@+id/editText_country"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_weight="1"
android:background="@drawable/custom_edit_text_register_activity"
android:inputType="textPersonName"
android:paddingLeft="10dp"
android:textSize="12sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:orientation="horizontal">
<TextView
android:id="@+id/textView25"
android:layout_width="100dp"
android:layout_height="match_parent"
android:gravity="center"
android:text="Nationality" />
<EditText
android:id="@+id/editText_nationality"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_weight="1"
android:background="@drawable/custom_edit_text_register_activity"
android:inputType="textPersonName"
android:paddingLeft="10dp"
android:textSize="12sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:orientation="horizontal">
<TextView
android:id="@+id/textView25"
android:layout_width="100dp"
android:layout_height="match_parent"
android:gravity="center"
android:text="Mobile" />
<EditText
android:id="@+id/editText_mobile"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_weight="1"
android:background="@drawable/custom_edit_text_register_activity"
android:inputType="textPersonName"
android:paddingLeft="10dp"
android:textSize="12sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:orientation="horizontal">
<TextView
android:id="@+id/textView25"
android:layout_width="100dp"
android:layout_height="match_parent"
android:gravity="center"
android:text="State" />
<EditText
android:id="@+id/editText_state"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_weight="1"
android:background="@drawable/custom_edit_text_register_activity"
android:inputType="textPersonName"
android:paddingLeft="10dp"
android:textSize="12sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:orientation="horizontal">
<TextView
android:id="@+id/textView25"
android:layout_width="100dp"
android:layout_height="match_parent"
android:gravity="center"
android:text="Postal Code" />
<EditText
android:id="@+id/editText_postalCode"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_weight="1"
android:background="@drawable/custom_edit_text_register_activity"
android:inputType="textPersonName"
android:paddingLeft="10dp"
android:textSize="12sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:orientation="horizontal">
<TextView
android:id="@+id/textView25"
android:layout_width="100dp"
android:layout_height="match_parent"
android:gravity="center"
android:text="Company Name" />
<EditText
android:id="@+id/editText_companyName"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_weight="1"
android:background="@drawable/custom_edit_text_register_activity"
android:inputType="textPersonName"
android:paddingLeft="10dp"
android:textSize="12sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:orientation="horizontal">
<TextView
android:id="@+id/textView25"
android:layout_width="100dp"
android:layout_height="match_parent"
android:gravity="center"
android:text="Company Type" />
<EditText
android:id="@+id/editText_companyType"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_weight="1"
android:background="@drawable/custom_edit_text_register_activity"
android:inputType="textPersonName"
android:paddingLeft="10dp"
android:textSize="12sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:orientation="horizontal">
<TextView
android:id="@+id/textView25"
android:layout_width="100dp"
android:layout_height="match_parent"
android:gravity="center"
android:text="Income Source" />
<EditText
android:id="@+id/editText_incomeSource"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_weight="1"
android:background="@drawable/custom_edit_text_register_activity"
android:inputType="textPersonName"
android:paddingLeft="10dp"
android:textSize="12sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:orientation="horizontal">
<TextView
android:id="@+id/textView25"
android:layout_width="100dp"
android:layout_height="match_parent"
android:gravity="center"
android:text="Nature Of Business" />
<EditText
android:id="@+id/editText_natureSource"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_weight="1"
android:background="@drawable/custom_edit_text_register_activity"
android:inputType="textPersonName"
android:paddingLeft="10dp"
android:textSize="12sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:orientation="horizontal">
<TextView
android:id="@+id/textView25"
android:layout_width="100dp"
android:layout_height="match_parent"
android:gravity="center"
android:text="Created Time" />
<EditText
android:id="@+id/editText_createTime"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_weight="1"
android:background="@drawable/custom_edit_text_register_activity"
android:inputType="textPersonName"
android:paddingLeft="10dp"
android:textSize="12sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:orientation="horizontal">
<TextView
android:id="@+id/textView25"
android:layout_width="100dp"
android:layout_height="match_parent"
android:gravity="center"
android:text="Created By" />
<EditText
android:id="@+id/editText_createBy"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_weight="1"
android:background="@drawable/custom_edit_text_register_activity"
android:inputType="textPersonName"
android:paddingLeft="10dp"
android:textSize="12sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:orientation="horizontal">
<TextView
android:id="@+id/textView25"
android:layout_width="100dp"
android:layout_height="match_parent"
android:gravity="center"
android:text="Validated At" />
<EditText
android:id="@+id/editText_validateAt"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_weight="1"
android:background="@drawable/custom_edit_text_register_activity"
android:inputType="textPersonName"
android:paddingLeft="10dp"
android:textSize="12sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:orientation="horizontal">
<TextView
android:id="@+id/textView25"
android:layout_width="100dp"
android:layout_height="match_parent"
android:gravity="center"
android:text="Validated By" />
<EditText
android:id="@+id/editText_validateBy"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_weight="1"
android:background="@drawable/custom_edit_text_register_activity"
android:inputType="textPersonName"
android:paddingLeft="10dp"
android:textSize="12sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:orientation="horizontal">
<TextView
android:id="@+id/textView25"
android:layout_width="100dp"
android:layout_height="match_parent"
android:gravity="center"
android:text="Compliance Done At" />
<EditText
android:id="@+id/editText_complienceAt"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_weight="1"
android:background="@drawable/custom_edit_text_register_activity"
android:inputType="textPersonName"
android:paddingLeft="10dp"
android:textSize="12sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:orientation="horizontal">
<TextView
android:id="@+id/textView25"
android:layout_width="100dp"
android:layout_height="match_parent"
android:gravity="center"
android:text="Compliance Done By" />
<EditText
android:id="@+id/editText_complienceBy"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_weight="1"
android:background="@drawable/custom_edit_text_register_activity"
android:inputType="textPersonName"
android:paddingLeft="10dp"
android:textSize="12sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:orientation="vertical">
<TextView
android:id="@+id/editText3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="FRONT ID " />
<ImageView
android:id="@+id/image_front"
android:layout_width="match_parent"
android:layout_height="250dp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:orientation="vertical">
<TextView
android:id="@+id/editText3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="BACK ID " />
<ImageView
android:id="@+id/image_back"
android:layout_width="match_parent"
android:layout_height="250dp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:orientation="vertical">
<Button
android:id="@+id/button_sms"
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@android:color/holo_red_light"
android:text="RESEND SMS"
android:textColor="@android:color/white" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</ScrollView>
</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:focusable="true"
android:focusableInTouchMode="true"
android:minWidth="300dp"
android:minHeight="350dp"
android:orientation="vertical">
<com.github.chrisbanes.photoview.PhotoView
android:id="@+id/imageView"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</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="200dp"
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>
<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>
\ 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="wrap_content"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:id="@+id/linear_status"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/colorButtonHijau"
android:orientation="horizontal">
<TextView
android:id="@+id/textView_mobile"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_weight="1"
android:text="MOBILE NO : 60136081985"
android:textColor="@android:color/white" />
<TextView
android:id="@+id/textView_status"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginRight="5dp"
android:layout_weight="2"
android:gravity="right"
android:text="SUCCESS"
android:textColor="@android:color/white" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="5dp"
android:layout_weight="1"
android:orientation="horizontal">
<TextView
android:id="@+id/textView35"
android:layout_width="75dp"
android:layout_height="wrap_content"
android:layout_marginRight="10dp"
android:text="Country"
android:textColor="@android:color/black" />
<TextView
android:id="@+id/textView_country"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="5" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="5dp"
android:layout_weight="1"
android:orientation="horizontal">
<TextView
android:id="@+id/textView35"
android:layout_width="75dp"
android:layout_height="wrap_content"
android:layout_marginRight="10dp"
android:text="Product"
android:textColor="@android:color/black" />
<TextView
android:id="@+id/textView_product"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="5" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="5dp"
android:layout_weight="1"
android:orientation="horizontal">
<TextView
android:id="@+id/textView35"
android:layout_width="75dp"
android:layout_height="wrap_content"
android:layout_marginRight="10dp"
android:text="Debit"
android:textColor="@android:color/black" />
<TextView
android:id="@+id/textView_debit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="5" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="horizontal">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="5dp"
android:layout_weight="1"
android:orientation="horizontal">
<TextView
android:id="@+id/textView35"
android:layout_width="75dp"
android:layout_height="wrap_content"
android:layout_marginRight="10dp"
android:text="Profit Share"
android:textColor="@android:color/black" />
<TextView
android:id="@+id/textView_profit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="5" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="5dp"
android:layout_weight="1"
android:orientation="horizontal">
<TextView
android:id="@+id/textView35"
android:layout_width="75dp"
android:layout_height="wrap_content"
android:layout_marginRight="10dp"
android:text="Time"
android:textColor="@android:color/black" />
<TextView
android:id="@+id/textView_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="5" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="5dp"
android:layout_weight="1"
android:orientation="horizontal">
<TextView
android:id="@+id/textView35"
android:layout_width="75dp"
android:layout_height="wrap_content"
android:layout_marginRight="10dp"
android:text="Balance"
android:textColor="@android:color/black" />
<TextView
android:id="@+id/textView_balance"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="5" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="5dp"
android:layout_weight="1"
android:orientation="horizontal">
<TextView
android:id="@+id/textView35"
android:layout_width="75dp"
android:layout_height="wrap_content"
android:layout_marginRight="10dp"
android:text="Description"
android:textColor="@android:color/black" />
<TextView
android:id="@+id/textView_des"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="5" />
</LinearLayout>
</LinearLayout>
\ No newline at end of file
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