From f705de8c60f6370c1ca4c82a4a9bf0e19f1e6982 Mon Sep 17 00:00:00 2001 From: dtvv Date: Fri, 12 Oct 2018 14:47:12 -0500 Subject: [PATCH] -Add the new buttons push animation to the buttons in the baclup_seed.xml and java source -Test the code so it works as before after changes -Change the text from cancel to CLOSE in the BackUpSeedActivity --- .../activities/BackupSeedActivity.java | 31 +++++++++++++++++-- app/src/main/res/layout/backup_seed.xml | 14 ++++----- 2 files changed, 36 insertions(+), 9 deletions(-) diff --git a/app/src/main/java/cy/agorise/crystalwallet/activities/BackupSeedActivity.java b/app/src/main/java/cy/agorise/crystalwallet/activities/BackupSeedActivity.java index 999d66a..31cc6bb 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/activities/BackupSeedActivity.java +++ b/app/src/main/java/cy/agorise/crystalwallet/activities/BackupSeedActivity.java @@ -15,6 +15,8 @@ import android.widget.Button; import android.widget.TextView; import android.widget.Toast; +import com.thekhaeng.pushdownanim.PushDownAnim; + import butterknife.BindView; import butterknife.ButterKnife; import butterknife.OnClick; @@ -30,11 +32,12 @@ public class BackupSeedActivity extends AppCompatActivity { @BindView(R.id.tvBrainKey) TextView textfieldBrainkey; - @BindView(R.id.btnCancel) + @BindView(R.id.btnOK) Button btnOk; @BindView(R.id.btnCopy) Button btnCopy; - + @BindView(R.id.btnCancel) + Button btnCancel; @Override protected void onCreate(Bundle savedInstanceState) { @@ -43,6 +46,30 @@ public class BackupSeedActivity extends AppCompatActivity { ButterKnife.bind(this); + /* + * Integration of library with button efects + * */ + PushDownAnim.setPushDownAnimTo(btnCancel) + .setOnClickListener( new View.OnClickListener(){ + @Override + public void onClick( View view ){ + btnCancelClick(); + } + } ); + PushDownAnim.setPushDownAnimTo(btnOk) + .setOnClickListener( new View.OnClickListener(){ + @Override + public void onClick( View view ){ + btnOkClick(); + } + } ); + PushDownAnim.setPushDownAnimTo(btnCopy) + .setOnClickListener( new View.OnClickListener(){ + @Override + public void onClick( View view ){ + btnCopyClick(); + } + } ); /* * If comes from new account creation hide the cancel button * */ diff --git a/app/src/main/res/layout/backup_seed.xml b/app/src/main/res/layout/backup_seed.xml index bff1e5d..b45b770 100644 --- a/app/src/main/res/layout/backup_seed.xml +++ b/app/src/main/res/layout/backup_seed.xml @@ -68,9 +68,9 @@ android:layout_marginLeft="20dp" android:layout_marginTop="35dp" android:layout_toLeftOf="@+id/btnCopy" - android:background="?android:attr/selectableItemBackground" - android:text="@string/cancel" - android:textColor="#0099ff" /> + android:theme="@style/BlueButton" + android:text="@string/close" + android:textColor="@color/white" />