This commit is contained in:
Javier Varona 2018-07-26 22:58:49 -04:00
commit 44f43cd126
95 changed files with 287 additions and 698 deletions

View file

@ -48,6 +48,7 @@ dependencies {
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:support-v4:27.1.1'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support:cardview-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
implementation 'android.arch.lifecycle:runtime:1.1.1'
implementation 'android.arch.lifecycle:extensions:1.1.1'

View file

@ -85,7 +85,7 @@ public class ContactListView extends RelativeLayout {
final LinearLayoutManager linearLayoutManager = new LinearLayoutManager(this.getContext());
this.listView.setLayoutManager(linearLayoutManager);
//Prevents the list to start again when scrolling to the end
this.listView.setNestedScrollingEnabled(false);
//this.listView.setNestedScrollingEnabled(false);
}

View file

@ -32,9 +32,9 @@ import cy.agorise.crystalwallet.models.CryptoCoinTransactionExtended;
public class TransactionListAdapter extends PagedListAdapter<CryptoCoinTransactionExtended, TransactionViewHolder> {
Fragment fragment;
private Fragment fragment;
public TransactionListAdapter(Fragment fragment) {
TransactionListAdapter(Fragment fragment) {
super(CryptoCoinTransactionExtended.DIFF_CALLBACK);
this.fragment = fragment;
}

View file

@ -1,26 +1,21 @@
package cy.agorise.crystalwallet.views;
import android.arch.lifecycle.LifecycleOwner;
import android.arch.lifecycle.LiveData;
import android.arch.lifecycle.Observer;
import android.arch.lifecycle.ViewModelProviders;
import android.content.Context;
import android.content.Intent;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.widget.RelativeLayout;
import android.widget.ImageView;
import android.widget.TextView;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.time.LocalDateTime;
import java.util.TimeZone;
import cy.agorise.crystalwallet.R;
import cy.agorise.crystalwallet.activities.CryptoCoinTransactionReceiptActivity;
import cy.agorise.crystalwallet.models.CryptoCoinTransaction;
import cy.agorise.crystalwallet.models.CryptoCoinTransactionExtended;
import cy.agorise.crystalwallet.models.CryptoCurrency;
import cy.agorise.crystalwallet.models.CryptoNetAccount;
@ -36,45 +31,40 @@ import cy.agorise.crystalwallet.viewmodels.GeneralSettingListViewModel;
*/
public class TransactionViewHolder extends RecyclerView.ViewHolder {
/*
* The view holding the transaction "from"
*/
private View vPaymentDirection;
private TextView tvFrom;
/*
* The view holding the transaction "to"
*/
private ImageView ivDirectionArrow;
private TextView tvTo;
/*
* The view holding the transaction amount
*/
private TextView tvAmount;
private TextView tvEquivalent;
private TextView tvTransactionDate;
private TextView tvTransactionHour;
private View rootView;
private TextView tvCryptoAmount;
private TextView tvFiatEquivalent;
private TextView tvDate;
private TextView tvTime;
private Fragment fragment;
private long cryptoCoinTransactionId;
public TransactionViewHolder(View itemView, Fragment fragment) {
TransactionViewHolder(View itemView, Fragment fragment) {
super(itemView);
//TODO: use ButterKnife to load this
this.cryptoCoinTransactionId = -1;
rootView = itemView.findViewById(R.id.rlTransactionItem);
tvFrom = (TextView) itemView.findViewById(R.id.fromText);
tvTo = (TextView) itemView.findViewById(R.id.toText);
tvAmount = (TextView) itemView.findViewById(R.id.tvAmount);
tvEquivalent = (TextView) itemView.findViewById(R.id.tvEquivalent);
tvTransactionDate = (TextView) itemView.findViewById(R.id.tvTransactionDate);
tvTransactionHour = (TextView) itemView.findViewById(R.id.tvTransactionHour);
View rootView = itemView.findViewById(R.id.rootView);
vPaymentDirection = itemView.findViewById(R.id.vPaymentDirection);
tvFrom = itemView.findViewById(R.id.tvFrom);
ivDirectionArrow = itemView.findViewById(R.id.ivDirectionArrow);
tvTo = itemView.findViewById(R.id.tvTo);
tvDate = itemView.findViewById(R.id.tvDate);
tvTime = itemView.findViewById(R.id.tvTime);
tvCryptoAmount = itemView.findViewById(R.id.tvCryptoAmount);
tvFiatEquivalent = itemView.findViewById(R.id.tvFiatEquivalent);
this.fragment = fragment;
rootView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
ereceiptOfThisTransaction();
eReceiptOfThisTransaction();
}
});
}
@ -82,7 +72,7 @@ public class TransactionViewHolder extends RecyclerView.ViewHolder {
/*
* dispatch the user to the receipt activity using this transaction
*/
public void ereceiptOfThisTransaction(){
private void eReceiptOfThisTransaction(){
//if the transaction was loaded
if (this.cryptoCoinTransactionId >= 0) {
Context context = fragment.getContext();
@ -104,10 +94,10 @@ public class TransactionViewHolder extends RecyclerView.ViewHolder {
public void clear(){
tvFrom.setText("loading...");
tvTo.setText("");
tvAmount.setText("");
tvEquivalent.setText("");
tvTransactionDate.setText("");
tvTransactionHour.setText("");
tvCryptoAmount.setText("");
tvFiatEquivalent.setText("");
tvDate.setText("");
tvTime.setText("");
}
/*
@ -140,8 +130,16 @@ public class TransactionViewHolder extends RecyclerView.ViewHolder {
DateFormat hourFormat = new SimpleDateFormat("HH:mm:ss");
hourFormat.setTimeZone(userTimeZone);
tvTransactionDate.setText(dateFormat.format(transaction.getDate()));
tvTransactionHour.setText(hourFormat.format(transaction.getDate()));
if(transaction.getInput()) {
vPaymentDirection.setBackgroundColor(fragment.getContext().getResources().getColor(R.color.receiveAmount));
ivDirectionArrow.setImageDrawable(fragment.getContext().getDrawable(R.drawable.ic_arrow_forward_receive));
} else {
vPaymentDirection.setBackgroundColor(fragment.getContext().getResources().getColor(R.color.sendAmount));
ivDirectionArrow.setImageDrawable(fragment.getContext().getDrawable(R.drawable.ic_arrow_forward_send));
}
tvDate.setText(dateFormat.format(transaction.getDate()));
tvTime.setText(hourFormat.format(transaction.getDate()));
tvFrom.setText(transaction.getFrom());
tvTo.setText(transaction.getTo());
@ -151,6 +149,7 @@ public class TransactionViewHolder extends RecyclerView.ViewHolder {
//cryptoNetAccountLiveData.observe(this.fragment, new Observer<CryptoNetAccount>() {
// @Override
// public void onChanged(@Nullable CryptoNetAccount cryptoNetAccount) {
// TODO is this useful??
if (transaction.getInput()){
tvTo.setText(transaction.getUserAccountName());
@ -171,26 +170,9 @@ public class TransactionViewHolder extends RecyclerView.ViewHolder {
// }
//});
String finalAmountText = "";
if (transaction.getInput()) {
tvAmount.setTextColor(itemView.getContext().getResources().getColor(R.color.green));
finalAmountText = "+ "+amountString
+ " "
+ cryptoCurrency.getName();
} else {
tvAmount.setTextColor(itemView.getContext().getResources().getColor(R.color.red));
finalAmountText = amountString
+ " "
+ cryptoCurrency.getName();
}
tvAmount.setText(finalAmountText);
//This will load the transaction receipt when the user clicks this view
/*itemView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
listener.onUserClick(user);
}
});*/
String finalAmountText = transaction.getInput() ? "+ " : "";
finalAmountText += amountString + " " + cryptoCurrency.getName();
tvCryptoAmount.setText(finalAmountText);
}
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 616 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 348 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 633 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

View file

@ -1,5 +0,0 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" >
<solid android:color="#ffffff" />
<stroke android:width="3sp" android:color="@color/gray"/>
<!--<padding android:left="9dp" android:right="9dp" android:top="9dp" android:bottom="9dp"/>-->
</shape>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

View file

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

View file

@ -1,5 +0,0 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" >
<solid android:color="#ffffff" />
<stroke android:width="0.1dp" android:color="#BFE4F4"/>
<!--<padding android:left="9dp" android:right="9dp" android:top="9dp" android:bottom="9dp"/>-->
</shape>

View file

@ -1,4 +0,0 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" >
<solid android:color="#ffffff" />
<stroke android:width="0.1dp" android:color="#BFE4F4"/>
</shape>

View file

@ -1,16 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:state_pressed="true"
android:state_enabled="true"
android:drawable="@color/red" />
<item
android:state_focused="true"
android:state_enabled="true"
android:drawable="@color/white" />
<item
android:state_focused="false"
android:state_enabled="false"
android:drawable="@color/white" />
<item android:drawable="@drawable/border_digtis"/>
</selector>

View file

@ -1,9 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true"
android:color="#fff"/> <!-- pressed -->
<item android:state_focused="true"
android:color="#ff0000ff"/> <!-- focused -->
<item android:color="#ff000000"/> <!-- default -->
</selector>

View file

@ -1,25 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<solid
android:color="@color/whiteColor"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<corners
android:radius="2dp"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<padding
android:left="0dp"
android:top="0dp"
android:right="0dp"
android:bottom="0dp"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<size
android:layout_width="match_parent"
android:layout_height="match_parent" />
</shape>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

View file

@ -1,14 +0,0 @@
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:top="-2dp" android:right="-2dp" android:left="-2dp">
<shape>
<solid android:color="@android:color/transparent" />
<stroke
android:width="2dp"
android:color="#70882E" />
</shape>
</item>
</layer-list>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

View file

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<gradient
android:angle="90"
android:startColor="@color/light_blue"
android:endColor="@color/white"
android:type="linear"/>
</shape>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

View file

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="@color/receiveAmount"
android:pathData="M12,4l-1.41,1.41L16.17,11H4v2h12.17l-5.58,5.59L12,20l8,-8z"/>
</vector>

View file

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="@color/sendAmount"
android:pathData="M12,4l-1.41,1.41L16.17,11H4v2h12.17l-5.58,5.59L12,20l8,-8z"/>
</vector>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 436 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 790 B

View file

@ -1,24 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval"
android:layout_width="match_parent"
android:layout_height="match_parent">
<solid
android:color="@color/whiteColor"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<corners
android:radius="0dp"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<padding
android:left="0dp"
android:top="0dp"
android:right="0dp"
android:bottom="0dp"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<size
android:layout_width="match_parent"
android:layout_height="match_parent" />
</shape>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

View file

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/transparent" />
<corners android:radius="20dp" />
</shape>

View file

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#fff"/>
<stroke android:width="1dip" android:color="@color/gray" />
<corners android:radius="10dip"/>
</shape>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

View file

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_enabled="true" android:drawable="@color/redColor"/>
<item android:state_enabled="false" android:drawable="@color/gray"/>
</selector>

View file

@ -1,24 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval"
android:layout_width="match_parent"
android:layout_height="match_parent">
<solid
android:color="@color/whiteColor"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<corners
android:radius="2dp"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<padding
android:left="0dp"
android:top="0dp"
android:right="0dp"
android:bottom="0dp"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<size
android:layout_width="match_parent"
android:layout_height="match_parent" />
</shape>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

View file

@ -1,21 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval">
<stroke
android:width="5dp"
android:color="#EBDDE2" />
<padding
android:bottom="2dp"
android:left="2dp"
android:right="2dp"
android:top="2dp" />
<gradient
android:centerColor="@color/white"
android:endColor="@color/white"
android:startColor="@color/white" />
<corners android:radius="4dp" />
</shape>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

View file

@ -31,7 +31,7 @@
android:id="@+id/user_img"
android:layout_width="90dp"
android:layout_height="90dp"
android:src="@drawable/gravtr"
android:src="@drawable/avatar_placeholder"
android:transitionName="gravatarTransition"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"

View file

@ -2,7 +2,6 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/gradient_background"
android:orientation="vertical"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="20dp"

View file

@ -1,277 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#fff"
>
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="60sp"
android:id="@+id/header"
android:background="#0099D5"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin">
<Button
android:layout_width="30sp"
android:layout_height="30sp"
android:background="@drawable/righticon"
android:layout_gravity="center"
/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/logoicon"
android:layout_gravity="center"
/>
<TextView
android:layout_width="10sp"
android:layout_height="wrap_content"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="eReceipt"
android:gravity="center"
android:layout_gravity="center"
android:textColor="@color/whiteColor"
android:textSize="20sp"
/>
</LinearLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:background="@drawable/edittext_bg"
android:id="@+id/relativelayout"
>
<ImageButton
android:layout_width="50dp"
android:layout_height="50dp"
android:text="@string/email_pdf"
android:id="@+id/buttonSend"
android:src="@drawable/share_icon"
android:layout_alignParentRight="true"
android:background="@color/white"
/>
<ImageView
android:layout_marginTop="10sp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/imageEmail"
android:layout_weight="3"
android:layout_gravity="right"
android:layout_alignParentRight="true"
android:layout_below="@+id/buttonSend"
/>
<LinearLayout
android:layout_marginTop="10sp"
android:layout_width="match_parent"
android:layout_height="@dimen/layout_margin"
android:orientation="horizontal"
android:weightSum="3"
android:layout_below="@+id/imageEmail"
android:id="@+id/ll_First"
android:background="@drawable/edittext_bg"
>
<TextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="@string/id_s"
android:textColor="@color/black"
android:gravity="left|center"
/>
<TextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="2"
android:gravity="left|center"
android:textColor="@color/black"
android:text=""
android:id="@+id/TvId"
/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="@dimen/layout_margin"
android:orientation="horizontal"
android:weightSum="3"
android:layout_below="@+id/ll_First"
android:id="@+id/ll_Sec"
android:background="@drawable/edittext_bg"
>
<TextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="@string/time_stamp"
android:gravity="left|center"
android:textColor="@color/black"
/>
<TextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="2"
android:gravity="left|center"
android:textColor="@color/black"
android:text=""
android:id="@+id/TvBlockNum"
/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="@dimen/layout_margin"
android:orientation="horizontal"
android:weightSum="3"
android:layout_below="@+id/ll_Sec"
android:id="@+id/ll_Third"
android:background="@drawable/edittext_bg"
>
<TextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="@string/trx_in_block"
android:gravity="left|center"
android:textColor="@color/black"
/>
<TextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="2"
android:gravity="left|center"
android:textColor="@color/black"
android:text=""
android:id="@+id/TvTrxInBlock"
/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/ll_Third"
android:id="@+id/ll_Third_op"
android:orientation="vertical"
android:background="@drawable/edittext_bg"
>
<TextView
android:layout_width="match_parent"
android:layout_height="@dimen/layout_margin"
android:gravity="left|center"
android:textColor="@color/black"
android:text="@string/operations"
android:id="@+id/tv_op_heading"
/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/ll_operations"
android:orientation="vertical"
>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="@dimen/layout_margin"
android:orientation="horizontal"
android:weightSum="3"
android:layout_below="@+id/ll_Third_op"
android:id="@+id/ll_Fourth"
android:background="@drawable/edittext_bg"
>
<TextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="@string/op_in_trx"
android:gravity="left|center"
android:textColor="@color/black"
/>
<TextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="2"
android:gravity="left|center"
android:textColor="@color/black"
android:text=""
android:id="@+id/TvOpInTrx"
/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="@dimen/layout_margin"
android:orientation="horizontal"
android:weightSum="3"
android:layout_below="@+id/ll_Fourth"
android:id="@+id/ll_Fifth"
android:background="@drawable/edittext_bg"
>
<TextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="@string/virtual_op"
android:gravity="left|center"
android:textColor="@color/black"
/>
<TextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="2"
android:gravity="left|center"
android:id="@+id/TvVirtualOp"
android:textColor="@color/black"
android:text=""
/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="@dimen/layout_margin"
android:orientation="horizontal"
android:weightSum="3"
android:layout_below="@+id/ll_Fifth"
android:id="@+id/ll_Sixth"
android:background="@drawable/edittext_bg"
>
<TextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="@string/operation_results"
android:gravity="left|center"
android:textColor="@color/black"
/>
<TextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="2"
android:gravity="left|center"
android:textColor="@color/black"
android:text=""
android:id="@+id/TvOperationsResults"
/>
</LinearLayout>
</RelativeLayout>
</LinearLayout>
</ScrollView>

View file

@ -65,7 +65,7 @@
android:layout_width="?attr/actionBarSize"
android:layout_height="?attr/actionBarSize"
android:layout_marginEnd="32dp"
android:src="@drawable/gravtr"
android:src="@drawable/avatar_placeholder"
android:transitionName="gravatarTransition"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"

View file

@ -25,7 +25,7 @@
android:layout_width="50dp"
android:layout_height="50dp"
android:background="@color/white"
android:src="@drawable/share"
android:src="@drawable/share_icon"
android:text="@string/email_pdf" />
<ProgressBar

View file

@ -22,7 +22,7 @@
android:id="@+id/user_img"
android:layout_width="90dp"
android:layout_height="90dp"
android:src="@drawable/ken_code_gravatar"
android:src="@drawable/avatar_placeholder"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

View file

@ -40,7 +40,7 @@
android:layout_height="60dp"
android:layout_marginStart="32dp"
android:layout_marginTop="90dp"
android:src="@drawable/gravtr"
android:src="@drawable/avatar_placeholder"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

View file

@ -40,7 +40,7 @@
android:layout_height="60dp"
android:layout_marginStart="32dp"
android:layout_marginTop="90dp"
android:src="@drawable/gravtr"
android:src="@drawable/avatar_placeholder"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

View file

@ -1,13 +1,11 @@
<?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:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<RelativeLayout
android:id="@+id/rlTransactionToolsHeader"
android:layout_width="wrap_content"
@ -17,9 +15,8 @@
android:id="@+id/etTransactionSearch"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_toLeftOf="@+id/btnTransactionsFilterDisplay" />
android:layout_toStartOf="@+id/btnTransactionsFilterDisplay" />
<Button
android:id="@+id/btnTransactionsFilterDisplay"
@ -37,11 +34,13 @@
android:background="@drawable/sort_transactions_icon"
android:text="order" />
</RelativeLayout>
<android.support.v7.widget.RecyclerView
android:id="@+id/transactionListView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/rlTransactionToolsHeader"
android:padding="4dp"
android:clipToPadding="false"
tools:listitem="@layout/transaction_list_item"
/>
</RelativeLayout>
</LinearLayout>

View file

@ -1,111 +1,195 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<android.support.v7.widget.CardView
xmlns:card_view="http://schemas.android.com/apk/res-auto"
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"
android:paddingBottom="5dp"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:paddingTop="5dp">
android:layout_gravity="center"
card_view:cardElevation="4dp"
card_view:cardCornerRadius="4dp"
android:layout_margin="4dp">
<RelativeLayout
android:id="@+id/rlTransactionItem"
<android.support.constraint.ConstraintLayout
android:id="@+id/rootView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:background="@drawable/transaction_list_item_background">
android:clickable="true"
android:focusable="true"
android:foreground="?android:attr/selectableItemBackground">
<android.support.constraint.Guideline
android:id="@+id/firstVerticalGuideline"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
app:layout_constraintGuide_percent="0.05"/>
<android.support.constraint.Guideline
android:id="@+id/secondVerticalGuideline"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
app:layout_constraintGuide_percent="0.45"/>
<android.support.constraint.Guideline
android:id="@+id/thirdVerticalGuideline"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
app:layout_constraintGuide_percent="0.55"/>
<android.support.constraint.Guideline
android:id="@+id/fourthVerticalGuideline"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
app:layout_constraintGuide_percent="0.95"/>
<android.support.constraint.Guideline
android:id="@+id/centeredVerticalGuideline"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
app:layout_constraintGuide_percent="0.50"/>
<View
android:id="@+id/vPaymentDirection"
android:layout_width="8dp"
android:layout_height="0dp"
android:background="@color/receiveAmount"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"/>
<TextView
android:id="@+id/fromText"
android:layout_width="wrap_content"
android:id="@+id/tvFrom"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_marginLeft="5dp"
android:layout_toStartOf="@+id/ivArrowFromTo"
android:ems="10"
android:inputType="text"
android:text="from" />
android:layout_marginTop="16dp"
android:maxLines="1"
tools:text="denzel-washington"
android:textAppearance="@style/TextAppearance.Body2"
android:textColor="@color/gray"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toEndOf="@id/firstVerticalGuideline"
app:layout_constraintEnd_toStartOf="@id/secondVerticalGuideline"/>
<ImageView
android:id="@+id/ivArrowFromTo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:tint="@color/black"
app:srcCompat="@drawable/ic_arrow_forward" />
android:id="@+id/ivDirectionArrow"
android:layout_width="0dp"
android:layout_height="0dp"
android:src="@drawable/ic_arrow_forward_receive"
app:layout_constraintTop_toTopOf="@id/tvFrom"
app:layout_constraintBottom_toBottomOf="@id/tvFrom"
app:layout_constraintStart_toEndOf="@id/secondVerticalGuideline"
app:layout_constraintEnd_toStartOf="@id/thirdVerticalGuideline"
tools:ignore="ContentDescription" />
<TextView
android:id="@+id/toText"
android:layout_width="wrap_content"
android:id="@+id/tvTo"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_toEndOf="@+id/ivArrowFromTo"
android:ems="10"
android:inputType="text"
android:text="to"
android:textAlignment="textEnd" />
<Space
android:id="@+id/sAfterFromTo"
android:layout_marginTop="5dp"
android:layout_marginBottom="5dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/fromText"/>
<TextView
android:id="@+id/tvTransactionDate"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/sAfterFromTo"
android:layout_marginLeft="5dp"
android:layout_toStartOf="@+id/ivArrowFromTo"
android:ems="10"
android:text="02 Oct"
android:textSize="14sp"
android:textStyle="bold" />
<TextView
android:id="@+id/tvTransactionHour"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/tvTransactionDate"
android:layout_marginLeft="5dp"
android:layout_toStartOf="@+id/ivArrowFromTo"
android:ems="10"
android:text="15:01:18 CET" />
<TextView
android:id="@+id/tvAmount"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignWithParentIfMissing="false"
android:layout_below="@id/sAfterFromTo"
android:layout_toEndOf="@+id/ivArrowFromTo"
android:ems="10"
android:inputType="text"
android:text="+ 1 BTS"
android:maxLines="1"
tools:text="joes-grocery-13"
android:textAppearance="@style/TextAppearance.Body2"
android:textColor="@color/gray"
android:textAlignment="textEnd"
android:textSize="14sp"
android:textStyle="bold" />
app:layout_constraintTop_toTopOf="@id/tvFrom"
app:layout_constraintStart_toEndOf="@id/thirdVerticalGuideline"
app:layout_constraintEnd_toStartOf="@id/fourthVerticalGuideline"/>
<View
android:id="@+id/vSeparator"
android:layout_width="0dp"
android:layout_height="1dp"
android:layout_marginTop="12dp"
android:background="@color/lightGray"
app:layout_constraintTop_toBottomOf="@id/tvFrom"
app:layout_constraintStart_toEndOf="@id/firstVerticalGuideline"
app:layout_constraintEnd_toStartOf="@id/fourthVerticalGuideline" />
<LinearLayout
android:id="@+id/llMemo"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:orientation="vertical"
android:visibility="gone"
card_view:layout_constraintTop_toBottomOf="@id/vSeparator"
card_view:layout_constraintStart_toEndOf="@id/firstVerticalGuideline"
card_view:layout_constraintEnd_toStartOf="@id/fourthVerticalGuideline">
<TextView
android:id="@+id/tvEquivalent"
android:layout_width="wrap_content"
android:id="@+id/tvMemo"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignWithParentIfMissing="false"
android:layout_below="@id/tvAmount"
android:layout_toEndOf="@+id/ivArrowFromTo"
android:ems="10"
android:inputType="text"
android:text="0.005€"
android:textAlignment="textEnd" />
android:layout_marginTop="12dp"
android:maxLines="2"
android:textAppearance="@android:style/TextAppearance.Material.Caption"
tools:text="Here is a memo if exists and can span up to 2 lines, if it get lager we will have problems with the rendering"/>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginTop="12dp"
android:background="@color/lightGray"/>
</LinearLayout>
</RelativeLayout>
</LinearLayout>
<TextView
android:id="@+id/tvDate"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:maxLines="1"
tools:text="02 Oct"
android:textStyle="bold"
android:textAppearance="@style/TextAppearance.Body1"
app:layout_constraintTop_toBottomOf="@id/llMemo"
app:layout_constraintStart_toEndOf="@id/firstVerticalGuideline"
app:layout_constraintEnd_toStartOf="@id/centeredVerticalGuideline"/>
<TextView
android:id="@+id/tvTime"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:maxLines="1"
tools:text="15:01:18 CET"
android:textAppearance="@style/TextAppearance.Body2"
android:textColor="@color/gray"
app:layout_constraintTop_toBottomOf="@+id/tvDate"
app:layout_constraintStart_toEndOf="@id/firstVerticalGuideline"
app:layout_constraintEnd_toStartOf="@id/centeredVerticalGuideline"/>
<TextView
android:id="@+id/tvCryptoAmount"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:maxLines="1"
tools:text="1234567.1234 BTS"
android:textAppearance="@style/TextAppearance.Body1"
android:textStyle="bold"
android:textAlignment="textEnd"
app:layout_constraintTop_toTopOf="@id/tvDate"
app:layout_constraintStart_toEndOf="@id/centeredVerticalGuideline"
app:layout_constraintEnd_toStartOf="@id/fourthVerticalGuideline" />
<TextView
android:id="@+id/tvFiatEquivalent"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp"
android:maxLines="1"
tools:text="4119.75 $"
android:textAppearance="@style/TextAppearance.Body2"
android:textColor="@color/gray"
android:textAlignment="textEnd"
app:layout_constraintTop_toBottomOf="@+id/tvCryptoAmount"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@id/centeredVerticalGuideline"
app:layout_constraintEnd_toStartOf="@id/fourthVerticalGuideline"/>
</android.support.constraint.ConstraintLayout>
</android.support.v7.widget.CardView>

View file

@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<transitionSet xmlns:android="http://schemas.android.com/apk/res/android">
<changeImageTransform/>
</transitionSet>

View file

@ -3,9 +3,9 @@
<color name="colorPrimary">#0099d6</color>
<color name="colorPrimaryDark">#006fd6</color>
<color name="colorAccent">#0099d6</color>
<color name="gray">#d3d3d3</color>
<color name="gray">#808080</color>
<color name="darkGray">#686767</color>
<color name="lightGray">#E3E3E3</color>
<color name="lightGray">#e0e0e0</color>
<color name="white">#ffffff</color>
<color name="pink">#f0006b</color>
<color name="transparent">#00ffffff</color>
@ -15,11 +15,8 @@
<color name="green">#147b00</color>
<color name="black">#000000</color>
<color name="skyblue">#BFD1FF</color>
<color name="light_blue">#f2f6ff</color>
<color name="greencolor">#70882E</color>
<color name="red">#ff0000</color>
<color name="pinkColor">#FF4081</color>
<color name="redColor">#DD4739</color>
<color name="textColorPrimary">#FFFFFF</color>
@ -29,12 +26,8 @@
<color name="bottomBarColor">#dddddd</color>
<color name="whiteColor">#ffffff</color>
<color name="receive_amount">#669900</color>
<color name="receive_amount_light">#c5e1a5</color>
<color name="send_amount">#DC473A</color>
<color name="send_amount_light">#ef9a9a</color>
<color name="transactionsHeader">#BFE5F5</color>
<color name="transactionsseparator">#CCCCCC</color>
<color name="receiveAmount">#669900</color>
<color name="sendAmount">#DC473A</color>
<color name="color_preloader_start">#000000</color>
<color name="color_preloader_center">#000000</color>

View file

@ -1,46 +1,14 @@
<resources>
<style name="stylishDialog" parent="android:Theme.Dialog">
<item name="android:windowBackground">@color/whiteColor</item>
<item name="android:textColor">@color/black</item>
<item name="android:textSize">24sp</item>
<item name="android:textStyle">normal</item>
<item name="android:gravity">center</item>
</style>
<style name="MyMaterialTheme" parent="MyMaterialTheme.Base">
</style>
<style name="MyMaterialTheme.Base" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="windowNoTitle">true</item>
<item name="windowActionBar">false</item>
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="android:dialogTheme">@style/CustomDialog</item>
</style>
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="android:homeAsUpIndicator">@drawable/back_button_image</item>
<item name="android:dialogTheme">@style/CustomDialog</item>
<item name="android:colorButtonNormal">@color/white</item>
<item name="android:fontFamily">@font/opensans</item>
<item name="fontFamily">@font/opensans</item> <!-- target android sdk versions < 26 and > 14 if theme other than AppCompat -->
<!-- enable window content transitions -->
<item name="android:windowContentTransitions">true</item>
<!-- specify shared element transitions
<item name="android:windowSharedElementEnterTransition">
@transition/change_image_transform</item>
<item name="android:windowSharedElementExitTransition">
@transition/change_image_transform</item> -->
</style>
<style name="ActivityDialog" parent="Theme.AppCompat.Light.NoActionBar">
@ -56,28 +24,17 @@
<item name="windowNoTitle">true</item>
</style>
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark" >
</style>
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark" />
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
<style name="splashTheme" parent="Theme.AppCompat.Light.NoActionBar">
<!-- Customize your theme here. -->
<item name="android:windowNoTitle">true</item>
<item name="android:background">@color/white</item>
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>
<style name="CustomDialog" parent="@style/Theme.AppCompat.Light.Dialog">
<item name="android:windowNoTitle">true</item>
</style>
<!-- TODO use pendingTransition instead -->
<style name="SendTransactionTheme" parent="Theme.AppCompat.Light.Dialog">
<item name="android:windowAnimationStyle">@style/SendTransactionAnimation.Window</item>
</style>
<style name="SendTransactionAnimation.Window" parent="@android:style/Animation.Activity">
<item name="android:windowEnterAnimation">@anim/send_transaction_in</item>
<item name="android:windowExitAnimation">@anim/send_transaction_out</item>
@ -86,7 +43,6 @@
<style name="ReceiveTransactionTheme" parent="Theme.AppCompat.Light.Dialog">
<item name="android:windowAnimationStyle">@style/ReceiveTransactionAnimation.Window</item>
</style>
<style name="ReceiveTransactionAnimation.Window" parent="@android:style/Animation.Activity">
<item name="android:windowEnterAnimation">@anim/receive_transaction_in</item>
<item name="android:windowExitAnimation">@anim/receive_transaction_out</item>
@ -97,6 +53,7 @@
<item name="android:windowExitAnimation">@anim/accounts_out</item>
</style>
<!-- TODO Remove this style and use the other button styles -->
<style name="Widget.Button" parent="android:Widget.Button">
<item name="android:paddingTop">8dp</item>
<item name="android:paddingBottom">8dp</item>
@ -119,4 +76,10 @@
<item name="colorButtonNormal">@color/gray</item>
<item name="android:buttonStyle">@style/Widget.AppCompat.Button.Colored</item>
</style>
<!-- Text styles -->
<style name="TextAppearance.Body1" parent="Base.TextAppearance.AppCompat.Body1" >
<item name="android:textSize">16sp</item>
</style>
<style name="TextAppearance.Body2" parent="Base.TextAppearance.AppCompat.Body2" />
</resources>