diff --git a/app/src/main/ic_launcher-web.png b/app/src/main/ic_launcher-web.png
index e13b27c..a3a8d20 100644
Binary files a/app/src/main/ic_launcher-web.png and b/app/src/main/ic_launcher-web.png differ
diff --git a/app/src/main/java/cy/agorise/crystalwallet/fragments/SendTransactionFragment.java b/app/src/main/java/cy/agorise/crystalwallet/fragments/SendTransactionFragment.java
index 2b56179..018c77b 100644
--- a/app/src/main/java/cy/agorise/crystalwallet/fragments/SendTransactionFragment.java
+++ b/app/src/main/java/cy/agorise/crystalwallet/fragments/SendTransactionFragment.java
@@ -31,7 +31,6 @@ import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import android.widget.ArrayAdapter;
-import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.Spinner;
@@ -133,12 +132,8 @@ public class SendTransactionFragment extends DialogFragment implements UIValidat
@BindView(R.id.viewCamera)
View viewCamera;
- /*
- * Flag to control when the camera is visible and when is hide
- * */
- private boolean cameraVisible = true;
-
- Button btnScanQrCode;
+ /* Flag to control when the camera is visible and when is hidden */
+ private boolean cameraVisible = false;
private long cryptoNetAccountId;
private CryptoNetAccount cryptoNetAccount;
@@ -233,41 +228,9 @@ public class SendTransactionFragment extends DialogFragment implements UIValidat
loadUserImage();
- /*
- * Check for CAMERA permission
- * */
- if (Build.VERSION.SDK_INT >= 23) {
- if (checkPermission()) {
- // Code for above or equal 23 API Oriented Device
- // Your Permission granted already .Do next code
-
- /*
- * Init the camera
- * */
- try {
- beginScanQrCode();
- }catch(Exception e){
- e.printStackTrace();
- }
-
- } else {
- requestPermission(); // Code for permission
- }
- }
- else {
-
- // Code for Below 23 API Oriented Device
- // Do next code
-
- /*
- * Init the camera
- * */
- try {
- beginScanQrCode();
- }catch(Exception e){
- e.printStackTrace();
- }
- }
+ /* Check for CAMERA permission */
+ if (Build.VERSION.SDK_INT >= 23 && !checkCameraPermission())
+ requestCameraPermission();
return builder.setView(view).create();
}
@@ -325,38 +288,24 @@ public class SendTransactionFragment extends DialogFragment implements UIValidat
}
}
- private void requestPermission() {
+ private boolean checkCameraPermission() {
+ int result = ContextCompat.checkSelfPermission(getActivity(), Manifest.permission.CAMERA);
+ return result == PackageManager.PERMISSION_GRANTED;
+ }
+
+ private void requestCameraPermission() {
if (ActivityCompat.shouldShowRequestPermissionRationale(getActivity(), Manifest.permission.CAMERA)) {
Toast.makeText(getActivity(), getActivity().getString(R.string.permission_denied_camera), Toast.LENGTH_LONG).show();
- /*
- * Disable the button of the camera visibility
- * */
- disableVisibilityCamera();
+ /* Disable the button of the camera visibility */
+ btnCloseCamera.setVisibility(View.INVISIBLE);
} else {
requestPermissions(new String[] {android.Manifest.permission.CAMERA}, REQUEST_CAMERA_PERMISSION);
}
}
- private void disableVisibilityCamera(){
-
- /*
- * Hide the button, the user can not modify the visibility
- * */
- btnCloseCamera.setVisibility(View.INVISIBLE);
- }
-
- private boolean checkPermission() {
- int result = ContextCompat.checkSelfPermission(getActivity(), Manifest.permission.CAMERA);
- if (result == PackageManager.PERMISSION_GRANTED) {
- return true;
- } else {
- return false;
- }
- }
-
@Override
@@ -374,15 +323,6 @@ public class SendTransactionFragment extends DialogFragment implements UIValidat
}
});
- /*
- * Init the camera
- * */
- try {
- beginScanQrCode();
- }catch(Exception e){
- e.printStackTrace();
- }
-
} else {
Log.e("value", "Permission Denied, You cannot use the camera.");
@@ -401,12 +341,6 @@ public class SendTransactionFragment extends DialogFragment implements UIValidat
super.onResume();
mScannerView.setResultHandler(this);
mScannerView.startCamera();
- /*builder.setNeutralButton("Scan QR Code", new DialogInterface.OnClickListener() {
- @Override
- public void onClick(DialogInterface dialogInterface, int i) {
- beginScanQrCode();
- }
- });*/
// Force dialog fragment to use the full width of the screen
Window dialogWindow = getDialog().getWindow();
@@ -475,67 +409,44 @@ public class SendTransactionFragment extends DialogFragment implements UIValidat
@OnClick(R.id.fabCloseCamera)
- public void onClicCloseCamera(){
- mScannerView.stopCamera();
-
- /*
- * Hide the camera or show it
- * */
- if(cameraVisible){
+ public void onClickCloseCamera(){
+ if(cameraVisible)
hideCamera();
- }
- else{
+ else
showCamera();
- }
}
- /*
- * Show the camera and hide the black background
+ /**
+ * Shows the camera and hide the black background
* */
private void showCamera(){
-
- /*
- * Change visibilities of views
- * */
+ /* Change visibilities of views */
viewCamera.setVisibility(View.GONE);
mScannerView.setVisibility(View.VISIBLE);
- /*
- * Change icon
- * */
+ /* Change icon */
btnCloseCamera.setImageDrawable(getResources().getDrawable(R.drawable.ic_close));
- /*
- * Reset variable
- * */
+ /* Reset variable */
cameraVisible = true;
- /*
- * Star the camera again
- * */
+ /* Star the camera again */
beginScanQrCode();
}
- /*
- * Hide the camera and show the black background
+ /**
+ * Hides the camera and show the black background
* */
private void hideCamera(){
-
- /*
- * Change visibilities of views
- * */
+ /* Change visibilities of views */
viewCamera.setVisibility(View.VISIBLE);
mScannerView.setVisibility(View.INVISIBLE);
- /*
- * Change icon
- * */
+ /* Change icon */
btnCloseCamera.setImageDrawable(getResources().getDrawable(R.drawable.ok));
- /*
- * Reset variable
- * */
+ /* Reset variable */
cameraVisible = false;
}
diff --git a/app/src/main/java/cy/agorise/crystalwallet/util/SquaredImageView.java b/app/src/main/java/cy/agorise/crystalwallet/util/SquaredImageView.java
deleted file mode 100644
index 8d984a0..0000000
--- a/app/src/main/java/cy/agorise/crystalwallet/util/SquaredImageView.java
+++ /dev/null
@@ -1,33 +0,0 @@
-package cy.agorise.crystalwallet.util;
-
-import android.content.Context;
-import android.support.annotation.Nullable;
-import android.support.v7.widget.AppCompatImageView;
-import android.util.AttributeSet;
-
-/**
- * Created by xd on 1/24/18.
- * ImageView which adjusts its size to always create a square
- */
-
-public class SquaredImageView extends AppCompatImageView {
- public SquaredImageView(Context context) {
- super(context);
- }
-
- public SquaredImageView(Context context, @Nullable AttributeSet attrs) {
- super(context, attrs);
- }
-
- public SquaredImageView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
- super(context, attrs, defStyleAttr);
- }
-
- @Override
- protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
- super.onMeasure(widthMeasureSpec, heightMeasureSpec);
-
- int size = Math.min(getMeasuredWidth(), getMeasuredHeight());
- setMeasuredDimension(size, size);
- }
-}
diff --git a/app/src/main/res/drawable/crystal_logo_white.xml b/app/src/main/res/drawable/crystal_logo_white.xml
new file mode 100644
index 0000000..de13169
--- /dev/null
+++ b/app/src/main/res/drawable/crystal_logo_white.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
diff --git a/app/src/main/res/drawable/gradient.xml b/app/src/main/res/drawable/gradient.xml
index eae5453..89997bb 100644
--- a/app/src/main/res/drawable/gradient.xml
+++ b/app/src/main/res/drawable/gradient.xml
@@ -2,7 +2,9 @@
+ android:type="linear"
+ android:startColor="#43E8D8"
+ android:centerColor="@color/colorPrimary"
+ android:endColor="@color/colorPrimaryDark"
+ android:angle="0"/>
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_intro.xml b/app/src/main/res/layout/activity_intro.xml
index 6a1fe1a..f5d8feb 100644
--- a/app/src/main/res/layout/activity_intro.xml
+++ b/app/src/main/res/layout/activity_intro.xml
@@ -31,8 +31,9 @@
android:id="@+id/ivLogo"
android:layout_width="wrap_content"
android:layout_height="100dp"
+ android:padding="16dp"
android:contentDescription="@string/crystal_logo"
- android:src="@drawable/crystal_logo"
+ android:src="@drawable/crystal_logo_white"
tools:layout_editor_absoluteY="114dp"
app:layout_constraintTop_toTopOf="@id/ivAnimation"
app:layout_constraintBottom_toBottomOf="@id/ivAnimation"/>
diff --git a/app/src/main/res/layout/board.xml b/app/src/main/res/layout/board.xml
index 8ed629b..aeaebed 100644
--- a/app/src/main/res/layout/board.xml
+++ b/app/src/main/res/layout/board.xml
@@ -53,8 +53,9 @@
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginStart="16dp"
+ android:padding="8dp"
android:adjustViewBounds="true"
- android:src="@drawable/crystal_logo"
+ android:src="@drawable/crystal_logo_white"
android:contentDescription="@string/crystal_logo"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
diff --git a/app/src/main/res/layout/receive_transaction.xml b/app/src/main/res/layout/receive_transaction.xml
index 5a11900..2002da3 100644
--- a/app/src/main/res/layout/receive_transaction.xml
+++ b/app/src/main/res/layout/receive_transaction.xml
@@ -5,20 +5,28 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
-
+
+
+ android:background="@drawable/receive_transaction_top_view"
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintStart_toStartOf="parent" />
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintStart_toStartOf="parent" />
+ android:src="@drawable/avatar_placeholder"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toBottomOf="@+id/txtTittle" />
+ android:layout_marginEnd="20dp"
+ app:layout_constraintTop_toBottomOf="@+id/txtTittle"
+ app:layout_constraintEnd_toEndOf="parent" />
+ app:layout_constraintTop_toBottomOf="@+id/spTo"
+ app:layout_constraintStart_toStartOf="@id/spTo"
+ app:layout_constraintEnd_toEndOf="@id/spTo" />
+ android:textSize="20sp"
+ app:layout_constraintTop_toBottomOf="@+id/tvFromError"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintEnd_toStartOf="@id/centeredVerticalGuideline"/>
+ app:layout_constraintTop_toBottomOf="@+id/etAmount"
+ app:layout_constraintStart_toStartOf="@id/etAmount"
+ app:layout_constraintEnd_toEndOf="@id/etAmount"/>
+ app:layout_constraintStart_toEndOf="@id/centeredVerticalGuideline"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintBottom_toTopOf="@id/viewSpinner"/>
+ android:layout_height="1dp"
+ android:layout_marginBottom="8dp"
+ android:background="@color/gray"
+ app:layout_constraintBottom_toBottomOf="@id/etAmount"
+ app:layout_constraintStart_toStartOf="@id/spAsset"
+ app:layout_constraintEnd_toEndOf="@id/spAsset"/>
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toBottomOf="@+id/spAsset" />
-
-
-
+ app:layout_constraintDimensionRatio="w,1:1"
+ app:layout_constraintLeft_toLeftOf="parent"
+ app:layout_constraintRight_toRightOf="parent"
+ app:layout_constraintTop_toBottomOf="@+id/tvAmountError" />
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toBottomOf="@+id/ivQrCode" />
+ app:layout_constraintTop_toBottomOf="@+id/ivQrCode"
+ app:layout_constraintRight_toRightOf="parent" />
-
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/send_transaction.xml b/app/src/main/res/layout/send_transaction.xml
index 9ec993e..57ed73d 100644
--- a/app/src/main/res/layout/send_transaction.xml
+++ b/app/src/main/res/layout/send_transaction.xml
@@ -120,15 +120,17 @@
+ app:layout_constraintEnd_toStartOf="@id/centeredVerticalGuideline"/>
+ app:layout_constraintStart_toEndOf="@id/centeredVerticalGuideline"/>
+ app:srcCompat="@drawable/ok" />
-
+
\ No newline at end of file
diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
index c5c9e8f..79ac9af 100644
--- a/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
+++ b/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
@@ -1,5 +1,5 @@
-
+
\ No newline at end of file
diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher.png b/app/src/main/res/mipmap-hdpi/ic_launcher.png
index 65293aa..6446ed8 100644
Binary files a/app/src/main/res/mipmap-hdpi/ic_launcher.png and b/app/src/main/res/mipmap-hdpi/ic_launcher.png differ
diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png b/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png
index 078ae58..ec58683 100644
Binary files a/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png and b/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png differ
diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
index 838afce..09dea2d 100644
Binary files a/app/src/main/res/mipmap-hdpi/ic_launcher_round.png and b/app/src/main/res/mipmap-hdpi/ic_launcher_round.png differ
diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher.png b/app/src/main/res/mipmap-mdpi/ic_launcher.png
index 990c8f1..90dc5bb 100644
Binary files a/app/src/main/res/mipmap-mdpi/ic_launcher.png and b/app/src/main/res/mipmap-mdpi/ic_launcher.png differ
diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png b/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png
index 1039e24..5a3a55c 100644
Binary files a/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png and b/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png differ
diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
index dabe340..d9364dc 100644
Binary files a/app/src/main/res/mipmap-mdpi/ic_launcher_round.png and b/app/src/main/res/mipmap-mdpi/ic_launcher_round.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/app/src/main/res/mipmap-xhdpi/ic_launcher.png
index aed84cc..53f9650 100644
Binary files a/app/src/main/res/mipmap-xhdpi/ic_launcher.png and b/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png b/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png
index 2bfd5c7..9f6fd63 100644
Binary files a/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png and b/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
index c8cf845..7342614 100644
Binary files a/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png and b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png differ
diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
index 83de844..371570c 100644
Binary files a/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and b/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ
diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png b/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png
index 42a16a3..44b80cd 100644
Binary files a/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png and b/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png differ
diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
index e75c0fd..7704a02 100644
Binary files a/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png and b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png differ
diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
index 09d0fe5..80a56c5 100644
Binary files a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ
diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png
index 8ce490e..7ca315e 100644
Binary files a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png differ
diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
index 44606ef..c333b12 100644
Binary files a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png differ
diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml
index ae86da4..227f199 100644
--- a/app/src/main/res/values/colors.xml
+++ b/app/src/main/res/values/colors.xml
@@ -1,15 +1,15 @@
- #0099d6
- #006fd6
- #0099d6
+ #3BD6C6
+ #12A394
+ #3BD6C6
#808080
#686767
#e0e0e0
#ffffff
#f0006b
#00ffffff
- #330099d6
+ #443BD6C6
#8fff
#147b00
diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml
index 3dcc4e6..6b258e1 100644
--- a/app/src/main/res/values/styles.xml
+++ b/app/src/main/res/values/styles.xml
@@ -14,6 +14,7 @@