This commit is contained in:
GME 2019-06-14 15:46:45 +02:00
parent 259df4c00b
commit 32f5d4c99b
15 changed files with 371 additions and 271 deletions

View file

@ -35,6 +35,7 @@ import monnethic.mobile.restApi.TransactionApiHandler;
import monnethic.mobile.transaction.TransactionAdapter;
public class HistoryActivity extends AppCompatActivity {
private ArrayList<Transaction> receivedT;
private String wallet_hash;
private String user_hash;
private String user_password;
@ -65,18 +66,39 @@ public class HistoryActivity extends AppCompatActivity {
user_password = intent.getStringExtra("USER_PWD");
session_id = intent.getStringExtra("SESSION_ID");
wallet_hash = intent.getStringExtra("WALLET_HASH");
receivedT = (ArrayList<Transaction>) intent.getSerializableExtra("data");
}
private void initView(){
inputSize = findViewById(R.id.inputSize);
listView = findViewById(R.id.listViewTransactions);
inputSize.setText(String.valueOf(10));
dateInit();
buttonInit();
switchInit();
spinnerInit();
listViewHandler("0");
initListView();
}
private void initListView(){
TransactionAdapter adapter = new TransactionAdapter(HistoryActivity.this,receivedT,wallet_hash);
listView.setAdapter(adapter);
listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
Transaction t = (Transaction) listView.getItemAtPosition(i);
Intent transactionDetailsIntent = new Intent(HistoryActivity.this, HistoryDetailsActivity.class);
transactionDetailsIntent.putExtra("USER_HASH",user_hash);
transactionDetailsIntent.putExtra("USER_PWD",user_password);
transactionDetailsIntent.putExtra("SESSION_ID",session_id);
transactionDetailsIntent.putExtra("WALLET_HASH",wallet_hash);
transactionDetailsIntent.putExtra("TRANSACTION",t);
HistoryActivity.this.startActivity(transactionDetailsIntent);
}
});
}
public void dateInit(){
DatePickerDialog.OnDateSetListener fromDatePicker = new DatePickerDialog.OnDateSetListener() {
@Override

View file

@ -121,14 +121,6 @@ public class LoginActivity extends AppCompatActivity {
walletHomeIntent.putExtra("email",email.getText().toString());
Boolean approved = new CheckApprovalTask().execute(jsonObject.getString("user_hash"),email.getText().toString()).get();
walletHomeIntent.putExtra("approved", approved.toString());
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE);
progress.setVisibility(View.GONE);
email.setEnabled(true);
password.setEnabled(true);
buttonCancel.setEnabled(true);
buttonOk.setEnabled(true);
LoginActivity.this.startActivity(walletHomeIntent);
finish();
} else {

View file

@ -149,7 +149,10 @@ public class RegisterActivity extends AppCompatActivity {
walletHomeIntent.putExtra("SESSION_ID",jsonObject.getString("session_id"));
walletHomeIntent.putExtra("email",email.getText().toString());
walletHomeIntent.putExtra("approved","false");
RegisterActivity.this.startActivity(walletHomeIntent);
finish();
}else{
Toast.makeText(mContext, "AN ERROR OCCURED", Toast.LENGTH_SHORT).show();
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE);
progress.setVisibility(View.GONE);
name.setEnabled(true);
@ -161,16 +164,20 @@ public class RegisterActivity extends AppCompatActivity {
confirmPassword.setEnabled(true);
buttonCancel.setEnabled(true);
buttonOk.setEnabled(true);
RegisterActivity.this.startActivity(walletHomeIntent);
finish();
}else{
Toast.makeText(mContext, "AN ERROR OCCURED", Toast.LENGTH_SHORT).show();
}
}catch (Exception e){
e.printStackTrace();
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE);
progress.setVisibility(View.GONE);
name.setEnabled(true);
firstname.setEnabled(true);
email.setEnabled(true);
confirmEmail.setEnabled(true);
phone.setEnabled(true);
password.setEnabled(true);
confirmPassword.setEnabled(true);
buttonCancel.setEnabled(true);
buttonOk.setEnabled(true);
}
}

View file

@ -24,6 +24,7 @@ public class TransactionApiHandler {
map.put("transaction_amount",sendingTransaction.getTransaction_amount());
map.put("transaction_unit",sendingTransaction.getTransaction_unit());
String response = httpCallHandler.postHttp(new URL(url),map);
System.out.println("TRANSACTION: "+response);
JSONObject jsonObject = new JSONObject(response);
return jsonObject.getString("response");
}catch (Exception e){

View file

@ -45,40 +45,6 @@ public class DisplayWalletSearch extends AppCompatActivity {
});
}
/*
private class SearchWalletTask extends AsyncTask<String,String,ArrayList<Wallet>> {
ProgressDialog progDailog = new ProgressDialog(DisplayWalletSearch.this);
@Override
protected void onPreExecute() {
super.onPreExecute();
progDailog.setMessage("Searching user wallets...");
progDailog.setIndeterminate(false);
progDailog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
progDailog.setCancelable(true);
progDailog.show();
}
@Override
protected void onPostExecute(ArrayList<Wallet> listWallet) {
progDailog.dismiss();
}
@Override
protected ArrayList<Wallet> doInBackground(String... strings) {
ArrayList<Wallet> walletsList = new ArrayList<>();
try{
WalletApiHandler walletApiHandler = new WalletApiHandler();
walletsList = walletApiHandler.getUserWallets(strings);
}catch (Exception e){
e.printStackTrace();
}
return walletsList;
}
}
*/
@Override
protected void onStop() {
super.onStop(); // Always call the superclass method first

View file

@ -112,19 +112,10 @@ public class SearchUser extends AppCompatActivity {
for(Wallet w : wallets){
displayWallets.add(new DisplayWallet(u_dest_n,u_dest_fn,w.getWallet_hash(),w.getType()));
}
Intent displayWalletIntent = new Intent(SearchUser.this, DisplayWalletSearch.class);
displayWalletIntent.putExtra("data",displayWallets);
displayWalletIntent.putExtra("SESSION_ID",session_id);
displayWalletIntent.addFlags(Intent.FLAG_ACTIVITY_FORWARD_RESULT);
emailAddress.setEnabled(true);
phoneNumber.setEnabled(true);
buttonCancel.setEnabled(true);
buttonOk.setEnabled(true);
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE);
progress.setVisibility(View.GONE);
SearchUser.this.startActivity(displayWalletIntent);
finish();
}else{

View file

@ -310,6 +310,15 @@ public class SettingsActivity extends AppCompatActivity {
@Override
protected void onPostExecute(String v) {
if(Boolean.parseBoolean(v)){
Toast.makeText(SettingsActivity.this,"Password updated",Toast.LENGTH_SHORT).show();
Intent intent = new Intent();
intent.putExtra("new_password",newPassword.getText().toString());
setResult(1,intent);
finish();
}else{
Toast.makeText(SettingsActivity.this,"An error occured",Toast.LENGTH_SHORT).show();
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE);
progress.setVisibility(View.GONE);
@ -320,18 +329,7 @@ public class SettingsActivity extends AppCompatActivity {
buttonConfirm.setEnabled(true);
enableChangePassword.setEnabled(true);
enableChangePassword.setChecked(false);
if(Boolean.parseBoolean(v)){
Toast.makeText(SettingsActivity.this,"Password updated",Toast.LENGTH_SHORT).show();
Intent intent = new Intent();
intent.putExtra("new_password",newPassword.getText().toString());
setResult(1,intent);
finish();
}else{
Toast.makeText(SettingsActivity.this,"An error occured",Toast.LENGTH_SHORT).show();
}
}
}
@ -369,6 +367,14 @@ public class SettingsActivity extends AppCompatActivity {
@Override
protected void onPostExecute(String v) {
if(Boolean.parseBoolean(v)){
Toast.makeText(SettingsActivity.this,"Wallet has been deleted",Toast.LENGTH_SHORT).show();
Intent intent = new Intent();
intent.putExtra("new_password",user_password);
setResult(1,intent);
finish();
}else{
Toast.makeText(SettingsActivity.this,"An error occured",Toast.LENGTH_SHORT).show();
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE);
progress.setVisibility(View.GONE);
@ -379,15 +385,6 @@ public class SettingsActivity extends AppCompatActivity {
buttonConfirm.setEnabled(true);
enableDeleteWallet.setEnabled(true);
enableDeleteWallet.setChecked(false);
if(Boolean.parseBoolean(v)){
Toast.makeText(SettingsActivity.this,"Wallet has been deleted",Toast.LENGTH_SHORT).show();
Intent intent = new Intent();
intent.putExtra("new_password",user_password);
setResult(1,intent);
finish();
}else{
Toast.makeText(SettingsActivity.this,"An error occured",Toast.LENGTH_SHORT).show();
}
}
@ -433,6 +430,14 @@ public class SettingsActivity extends AppCompatActivity {
@Override
protected void onPostExecute(String v) {
if(Boolean.parseBoolean(v)){
Toast.makeText(SettingsActivity.this,"Password updated & Wallet deleted",Toast.LENGTH_SHORT).show();
Intent intent = new Intent();
intent.putExtra("new_password",newPassword.getText().toString());
setResult(1,intent);
finish();
}else{
Toast.makeText(SettingsActivity.this,"An error occured",Toast.LENGTH_SHORT).show();
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE);
progress.setVisibility(View.GONE);
@ -451,15 +456,6 @@ public class SettingsActivity extends AppCompatActivity {
buttonConfirm.setEnabled(true);
enableDeleteWallet.setEnabled(true);
enableDeleteWallet.setChecked(false);
if(Boolean.parseBoolean(v)){
Toast.makeText(SettingsActivity.this,"Password updated & Wallet deleted",Toast.LENGTH_SHORT).show();
Intent intent = new Intent();
intent.putExtra("new_password",user_password);
setResult(1,intent);
finish();
}else{
Toast.makeText(SettingsActivity.this,"An error occured",Toast.LENGTH_SHORT).show();
}
}

View file

@ -97,10 +97,6 @@ public class ApprovePayementActivity extends AppCompatActivity {
} else {
Toast.makeText(ApprovePayementActivity.this, "Couldn't get transaction id", Toast.LENGTH_SHORT).show();
}
buttonCancel.setEnabled(true);
buttonVal.setEnabled(true);
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE);
progress.setVisibility(View.GONE);
finish();
}

View file

@ -83,9 +83,8 @@ public class TransactionActivity extends AppCompatActivity {
} else {
String wallet_dest = addressDestination.getText().toString();
String amount = amountEditText.getText().toString();
SendingTransaction sendingTransaction = new SendingTransaction(user_hash,user_password,wallet_hash,wallet_dest,amount,"gonette");
try {
new TransactionTask().execute(sendingTransaction);
new TransactionTask().execute(new SendingTransaction(user_hash,user_password,wallet_hash,wallet_dest,amount,"gonette"));
} catch (Exception e){
e.printStackTrace();
}
@ -128,6 +127,7 @@ public class TransactionActivity extends AppCompatActivity {
protected String doInBackground(SendingTransaction... sendingTransactions) {
try{
TransactionApiHandler transactionApiHandler = new TransactionApiHandler();
System.out.println("TRANSACTION: "+sendingTransactions[0].toString());
return transactionApiHandler.doTransaction(sendingTransactions[0]);
}catch (Exception e){
e.printStackTrace();
@ -142,13 +142,6 @@ public class TransactionActivity extends AppCompatActivity {
} else {
Toast.makeText(TransactionActivity.this, "Couldn't get transaction id", Toast.LENGTH_SHORT).show();
}
buttonCancel.setEnabled(true);
buttonOk.setEnabled(true);
buttonSearch.setEnabled(true);
amountEditText.setEnabled(true);
addressDestination.setEnabled(true);
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE);
progress.setVisibility(View.GONE);
finish();
}
}

View file

@ -5,13 +5,20 @@ import android.os.AsyncTask;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.view.WindowManager;
import android.widget.Button;
import android.widget.RelativeLayout;
import android.widget.TextView;
import android.widget.Toast;
import com.example.monnthic.monnethicmobile.R;
import java.util.ArrayList;
import monnethic.mobile.database.Transaction;
import monnethic.mobile.history.HistoryActivity;
import monnethic.mobile.restApi.Config;
import monnethic.mobile.restApi.SessionApiHandler;
import monnethic.mobile.restApi.TransactionApiHandler;
import monnethic.mobile.restApi.WalletApiHandler;
import monnethic.mobile.settings.SettingsActivity;
import monnethic.mobile.transaction.MakePayementActivity;
@ -23,6 +30,10 @@ public class UserAccountActivity extends AppCompatActivity {
private String user_hash;
private String user_password;
private String session_id;
private Button buttonPayement;
private Button buttonReceive;
private Button buttonRefresh;
private Button buttonHistory;
@Override
protected void onCreate(Bundle savedInstanceState) {
@ -30,11 +41,11 @@ public class UserAccountActivity extends AppCompatActivity {
setContentView(R.layout.activity_user_account);
balance = findViewById(R.id.balanceView);
TextView walletHashView = findViewById(R.id.walletHash);
Button buttonPayement = findViewById(R.id.buttonPayement);
Button buttonReceive = findViewById(R.id.buttonReceive);
buttonPayement = findViewById(R.id.buttonPayement);
buttonReceive = findViewById(R.id.buttonReceive);
Button buttonRefresh = findViewById(R.id.buttonRefreshBalance);
Button buttonHistory = findViewById(R.id.goToHistory);
buttonRefresh = findViewById(R.id.buttonRefreshBalance);
buttonHistory = findViewById(R.id.goToHistory);
Intent intent = getIntent();
user_hash = intent.getStringExtra("USER_HASH");
@ -94,16 +105,10 @@ public class UserAccountActivity extends AppCompatActivity {
}
public void history(){
Intent historyIntent = new Intent(UserAccountActivity.this, HistoryActivity.class);
historyIntent.putExtra("USER_HASH",user_hash);
historyIntent.putExtra("USER_PWD",user_password);
historyIntent.putExtra("WALLET_HASH",wallet_hash);
historyIntent.putExtra("SESSION_ID",session_id);
UserAccountActivity.this.startActivity(historyIntent);
new GetUserHistoryTask().execute();
}
public class GetUserBalanceTask extends AsyncTask<String,String,Double>
{
public class GetUserBalanceTask extends AsyncTask<String,String,Double> {
@Override
protected void onPreExecute() {
super.onPreExecute();
@ -135,6 +140,57 @@ public class UserAccountActivity extends AppCompatActivity {
}
}
public class GetUserHistoryTask extends AsyncTask<String,Void,ArrayList<Transaction>>{
RelativeLayout progress = findViewById(R.id.progressLayout);
@Override
protected void onPreExecute() {
super.onPreExecute();
buttonPayement.setEnabled(false);
buttonReceive.setEnabled(false);
buttonRefresh.setEnabled(false);
buttonHistory.setEnabled(false);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE, WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE);
progress.setVisibility(View.VISIBLE);
}
@Override
protected void onPostExecute(ArrayList<Transaction> transactions) {
Intent historyIntent = new Intent(UserAccountActivity.this, HistoryActivity.class);
historyIntent.putExtra("USER_HASH",user_hash);
historyIntent.putExtra("USER_PWD",user_password);
historyIntent.putExtra("WALLET_HASH",wallet_hash);
historyIntent.putExtra("SESSION_ID",session_id);
historyIntent.putExtra("data",transactions);
UserAccountActivity.this.startActivity(historyIntent);
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE);
progress.setVisibility(View.GONE);
buttonPayement.setEnabled(true);
buttonReceive.setEnabled(true);
buttonRefresh.setEnabled(true);
buttonHistory.setEnabled(true);
}
@Override
protected ArrayList<Transaction> doInBackground(String... strings) {
ArrayList<Transaction> transactionsList = new ArrayList<>();
try{
TransactionApiHandler transactionApiHandler = new TransactionApiHandler();
transactionsList = transactionApiHandler.getTransactions("0",Config.TRANSACTION_LATEST,wallet_hash,null,null,null);
System.out.println("RECEIVED_T "+transactionsList.toString());
}catch (Exception e){
e.printStackTrace();
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE);
progress.setVisibility(View.GONE);
buttonPayement.setEnabled(true);
buttonReceive.setEnabled(true);
buttonRefresh.setEnabled(true);
buttonHistory.setEnabled(true);
}
return transactionsList;
}
}
@Override
protected void onStop() {
super.onStop(); // Always call the superclass method first

View file

@ -89,18 +89,10 @@ public class CreateWalletActivity extends AppCompatActivity {
accountIntent.putExtra("WALLET_HASH",w.getWallet_hash());
accountIntent.putExtra("WALLET_BALANCE",String.valueOf(w.getBalance()));
accountIntent.putExtra("WALLET_TYPE",w.getType());
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE);
progress.setVisibility(View.GONE);
buttonValidate.setEnabled(true);
buttonCancel.setEnabled(true);
wallet_type.setEnabled(true);
CreateWalletActivity.this.startActivity(accountIntent);
finish();
}catch (Exception e){
e.printStackTrace();
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE);
progress.setVisibility(View.GONE);
buttonValidate.setEnabled(true);

View file

@ -49,6 +49,7 @@ public class HomeWalletActivity extends AppCompatActivity {
Intent intent = getIntent();
user_hash = intent.getStringExtra("USER_HASH");
user_password = intent.getStringExtra("USER_PWD");
System.out.println("USER_PWD: "+user_password);
session_id = intent.getStringExtra("SESSION_ID");
email = intent.getStringExtra("email");
approved = Boolean.parseBoolean(intent.getStringExtra("approved"));
@ -132,12 +133,9 @@ public class HomeWalletActivity extends AppCompatActivity {
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data){
super.onActivityResult(requestCode, resultCode, data);
System.out.println("HERE");
if(requestCode==1){
user_password = data.getStringExtra("new_password");
}
System.out.println("NEW_PWD "+user_password);
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE);
System.out.println("USER_PWD: "+user_password);
buttonCreateWallet.setEnabled(true);
buttonSelectWallet.setEnabled(true);
buttonSettings.setEnabled(true);
@ -199,6 +197,7 @@ public class HomeWalletActivity extends AppCompatActivity {
selectWalletIntent.putExtra("USER_PWD",user_password);
selectWalletIntent.putExtra("SESSION_ID",session_id);
selectWalletIntent.putExtra("data",listWallet);
HomeWalletActivity.this.startActivity(selectWalletIntent);
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE);
progress.setVisibility(View.GONE);
@ -206,8 +205,6 @@ public class HomeWalletActivity extends AppCompatActivity {
buttonSelectWallet.setEnabled(true);
buttonSettings.setEnabled(true);
buttonApproveUser.setEnabled(true);
HomeWalletActivity.this.startActivity(selectWalletIntent);
}else {
Toast.makeText(HomeWalletActivity.this,"You don't have wallets",Toast.LENGTH_SHORT).show();
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE);
@ -258,6 +255,7 @@ public class HomeWalletActivity extends AppCompatActivity {
settingsIntent.putExtra("USER_PWD",user_password);
settingsIntent.putExtra("SESSION_ID",session_id);
settingsIntent.putExtra("data",listWallet);
HomeWalletActivity.this.startActivityForResult(settingsIntent,1);
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE);
progress.setVisibility(View.GONE);
@ -265,8 +263,6 @@ public class HomeWalletActivity extends AppCompatActivity {
buttonSelectWallet.setEnabled(true);
buttonSettings.setEnabled(true);
buttonApproveUser.setEnabled(true);
HomeWalletActivity.this.startActivityForResult(settingsIntent,1);
}
}
private class ApproveTask extends AsyncTask<String,String,String>{

View file

@ -19,16 +19,17 @@ public class SelectWalletActivity extends AppCompatActivity {
private String user_hash;
private String user_password;
private String session_id;
private ListView listView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_select_wallet);
Intent intent = getIntent();
user_hash = intent.getStringExtra("USER_HASH");
user_password = intent.getStringExtra("USER_PWD");
session_id = intent.getStringExtra("SESSION_ID");
listView = (ListView) findViewById(R.id.listViewWallet);
try{
userWallets = (ArrayList<Wallet>) intent.getSerializableExtra("data");
}catch (Exception e){
@ -52,6 +53,10 @@ public class SelectWalletActivity extends AppCompatActivity {
});
}
private void updateWalletList(){
new getUserWalletTask().execute(user_hash);
}
public void launchAcountActivity(Wallet w) {
Intent accountIntent = new Intent(SelectWalletActivity.this, UserAccountActivity.class);
accountIntent.putExtra("USER_HASH",user_hash);
@ -63,6 +68,36 @@ public class SelectWalletActivity extends AppCompatActivity {
SelectWalletActivity.this.startActivity(accountIntent);
}
//AsyncTask to get user wallets
private class getUserWalletTask extends AsyncTask<String,ArrayList<Wallet>,ArrayList<Wallet>> {
@Override
protected ArrayList<Wallet> doInBackground(String... params) {
ArrayList<Wallet> walletsList = new ArrayList<>();
try{
WalletApiHandler walletApiHandler = new WalletApiHandler();
walletsList = walletApiHandler.getUserWallets(params);
}catch (Exception e){
e.printStackTrace();
}
return walletsList;
}
@Override
protected void onPostExecute(ArrayList<Wallet> listWallet) {
if(listWallet!=null && !listWallet.isEmpty()){
WalletAdapter adapter = new WalletAdapter(SelectWalletActivity.this,listWallet);
listView.setAdapter(adapter);
listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
Wallet w = (Wallet) listView.getItemAtPosition(i);
launchAcountActivity(w);
}
});
}
}
}
private class EndSessionTask extends AsyncTask<String,Void,Void> {
@Override
protected Void doInBackground(String... strings) {
@ -76,6 +111,7 @@ public class SelectWalletActivity extends AppCompatActivity {
}
}
@Override
protected void onStop() {
super.onStop(); // Always call the superclass method first
@ -85,6 +121,6 @@ public class SelectWalletActivity extends AppCompatActivity {
@Override
protected void onResume() {
super.onResume();
setupWallet();
updateWalletList();
}
}

View file

@ -37,6 +37,18 @@
android:textColor="@android:color/black" />
</RelativeLayout>
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:fillViewport="true">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:id="@+id/l1"
android:layout_width="match_parent"
@ -169,4 +181,6 @@
android:layout_weight="1"
android:text="Confirm" />
</LinearLayout>
</LinearLayout>
</ScrollView>
</RelativeLayout>

View file

@ -1,14 +1,56 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<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:orientation="vertical"
android:layout_width="match_parent"
android:layout_gravity="center"
android:layout_height="wrap_content">
android:layout_height="match_parent">
<RelativeLayout
android:id="@+id/progressLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:layout_marginStart="0dp"
android:background="@color/gray_transparent"
android:elevation="1dp"
android:gravity="center"
android:visibility="gone">
<ProgressBar
android:id="@+id/progressBar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginRight="5dp"
android:indeterminate="true"
android:max="100"
android:visibility="visible" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginStart="2dp"
android:layout_toEndOf="@+id/progressBar"
android:text="Please wait, Collecting history..."
android:textSize="18dp"
android:textColor="@android:color/black" />
</RelativeLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
android:layout_marginTop="50dp"
android:layout_marginBottom="50dp"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<LinearLayout
android:layout_width="match_parent"
@ -61,7 +103,7 @@
android:inputType="none"
android:textAlignment="center"
android:textSize="18sp"
android:textStyle="bold"/>
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
@ -100,4 +142,4 @@
android:text="History" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</android.support.constraint.ConstraintLayout>