diff --git a/app/src/main/java/cy/agorise/crystalwallet/activities/SendTransactionActivity.java b/app/src/main/java/cy/agorise/crystalwallet/activities/SendTransactionActivity.java
index f34db62..adfa17c 100644
--- a/app/src/main/java/cy/agorise/crystalwallet/activities/SendTransactionActivity.java
+++ b/app/src/main/java/cy/agorise/crystalwallet/activities/SendTransactionActivity.java
@@ -4,6 +4,7 @@ import android.arch.lifecycle.LiveData;
import android.arch.lifecycle.Observer;
import android.os.Bundle;
import android.support.annotation.Nullable;
+import android.support.design.widget.FloatingActionButton;
import android.support.v7.app.AppCompatActivity;
import android.text.Editable;
import android.widget.Button;
@@ -62,6 +63,9 @@ public class SendTransactionActivity extends AppCompatActivity implements UIVali
//@BindView(R.id.btnCancel)
Button btnCancel;
+ @BindView(R.id.fabCloseCamera)
+ FloatingActionButton btnCloseCamera;
+
private long cryptoNetAccountId;
private CryptoNetAccount cryptoNetAccount;
private GrapheneAccount grapheneAccount;
@@ -146,6 +150,15 @@ public class SendTransactionActivity extends AppCompatActivity implements UIVali
this.finish();
}
+
+
+ @OnClick(R.id.fabCloseCamera)
+ public void onClicCloseCamera(){
+
+
+ }
+
+
//@OnClick(R.id.btnSend)
public void importSend(){
if (this.sendTransactionValidator.isValid()) {
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 14bc512..ccad716 100644
--- a/app/src/main/java/cy/agorise/crystalwallet/fragments/SendTransactionFragment.java
+++ b/app/src/main/java/cy/agorise/crystalwallet/fragments/SendTransactionFragment.java
@@ -124,6 +124,9 @@ public class SendTransactionFragment extends DialogFragment implements UIValidat
@BindView(R.id.gravatar)
CircularImageView userImg;
+ @BindView(R.id.viewCamera)
+ View viewCamera;
+
Button btnScanQrCode;
private long cryptoNetAccountId;
@@ -356,6 +359,33 @@ public class SendTransactionFragment extends DialogFragment implements UIValidat
}
+ @OnClick(R.id.fabCloseCamera)
+ public void onClicCloseCamera(){
+ mScannerView.stopCamera();
+
+ /*
+ * Hide the camera
+ * */
+ hideCamera();
+ }
+
+ /*
+ * Show the camera and hide the black background
+ * */
+ private void showCamera(){
+ viewCamera.setVisibility(View.GONE);
+ mScannerView.setVisibility(View.VISIBLE);
+ }
+
+
+ /*
+ * Hide the camera and show the black background
+ * */
+ private void hideCamera(){
+ viewCamera.setVisibility(View.VISIBLE);
+ mScannerView.setVisibility(View.INVISIBLE);
+ }
+
@OnTextChanged(value = R.id.etMemo,
callback = OnTextChanged.Callback.AFTER_TEXT_CHANGED)
void afterMemoChanged(Editable editable) {
diff --git a/app/src/main/res/layout/send_transaction.xml b/app/src/main/res/layout/send_transaction.xml
index 584e511..6223254 100644
--- a/app/src/main/res/layout/send_transaction.xml
+++ b/app/src/main/res/layout/send_transaction.xml
@@ -186,6 +186,21 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvMemoError" />
+
+
+
+