-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
This commit is contained in:
dtvv 2018-10-12 14:47:12 -05:00
parent d3a55fae02
commit f705de8c60
2 changed files with 36 additions and 9 deletions

View file

@ -15,6 +15,8 @@ import android.widget.Button;
import android.widget.TextView; import android.widget.TextView;
import android.widget.Toast; import android.widget.Toast;
import com.thekhaeng.pushdownanim.PushDownAnim;
import butterknife.BindView; import butterknife.BindView;
import butterknife.ButterKnife; import butterknife.ButterKnife;
import butterknife.OnClick; import butterknife.OnClick;
@ -30,11 +32,12 @@ public class BackupSeedActivity extends AppCompatActivity {
@BindView(R.id.tvBrainKey) @BindView(R.id.tvBrainKey)
TextView textfieldBrainkey; TextView textfieldBrainkey;
@BindView(R.id.btnCancel) @BindView(R.id.btnOK)
Button btnOk; Button btnOk;
@BindView(R.id.btnCopy) @BindView(R.id.btnCopy)
Button btnCopy; Button btnCopy;
@BindView(R.id.btnCancel)
Button btnCancel;
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
@ -43,6 +46,30 @@ public class BackupSeedActivity extends AppCompatActivity {
ButterKnife.bind(this); 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 * If comes from new account creation hide the cancel button
* */ * */

View file

@ -68,9 +68,9 @@
android:layout_marginLeft="20dp" android:layout_marginLeft="20dp"
android:layout_marginTop="35dp" android:layout_marginTop="35dp"
android:layout_toLeftOf="@+id/btnCopy" android:layout_toLeftOf="@+id/btnCopy"
android:background="?android:attr/selectableItemBackground" android:theme="@style/BlueButton"
android:text="@string/cancel" android:text="@string/close"
android:textColor="#0099ff" /> android:textColor="@color/white" />
<Button <Button
android:id="@+id/btnCopy" android:id="@+id/btnCopy"
@ -80,8 +80,8 @@
android:layout_below="@+id/backup_seed_textview_leyend_backup" android:layout_below="@+id/backup_seed_textview_leyend_backup"
android:layout_marginTop="35dp" android:layout_marginTop="35dp"
android:text="@string/window_seed_copy" android:text="@string/window_seed_copy"
android:textColor="#0099ff" android:textColor="@color/white"
android:background="?android:attr/selectableItemBackground"/> android:theme="@style/BlueButton"/>
<Button <Button
android:id="@+id/btnOK" android:id="@+id/btnOK"
@ -91,8 +91,8 @@
android:layout_below="@+id/backup_seed_textview_leyend_backup" android:layout_below="@+id/backup_seed_textview_leyend_backup"
android:layout_marginTop="35dp" android:layout_marginTop="35dp"
android:text="@string/ok" android:text="@string/ok"
android:textColor="#0099ff" android:textColor="@color/white"
android:background="?android:attr/selectableItemBackground"/> android:theme="@style/BlueButton"/>
</RelativeLayout> </RelativeLayout>