From b4cc708970137db71184d904292ce0155cb9a826 Mon Sep 17 00:00:00 2001 From: dtvv Date: Fri, 12 Oct 2018 03:41:36 -0500 Subject: [PATCH] =?UTF-8?q?-Change=20the=20buttons=20style=20to=20the=20bu?= =?UTF-8?q?ttons=20to=20material=20one=20in=20the=20import=5Fseed.xml=20an?= =?UTF-8?q?d=20java=20source=20-Add=20the=20new=20buttons=20push=20animati?= =?UTF-8?q?on=20to=20the=20buttons=20in=20the=20import=5Fseed.xml=20and=20?= =?UTF-8?q?java=20source=20-Include=20layout=20in=20the=20buttons=20to=20f?= =?UTF-8?q?ix=20orientaci=C3=B3n=20and=20correct=20size=20with=20the=20new?= =?UTF-8?q?=20properties?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../activities/ImportSeedActivity.java | 28 ++++++++++++++++-- app/src/main/res/layout/activity_license.xml | 1 + app/src/main/res/layout/import_seed.xml | 29 ++++++++++--------- 3 files changed, 43 insertions(+), 15 deletions(-) diff --git a/app/src/main/java/cy/agorise/crystalwallet/activities/ImportSeedActivity.java b/app/src/main/java/cy/agorise/crystalwallet/activities/ImportSeedActivity.java index cfac83f..1085a4b 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/activities/ImportSeedActivity.java +++ b/app/src/main/java/cy/agorise/crystalwallet/activities/ImportSeedActivity.java @@ -7,10 +7,13 @@ import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.text.Editable; import android.text.TextWatcher; +import android.view.View; import android.widget.Button; import android.widget.EditText; import android.widget.Toast; +import com.thekhaeng.pushdownanim.PushDownAnim; + import butterknife.BindView; import butterknife.ButterKnife; import butterknife.OnClick; @@ -58,6 +61,9 @@ public class ImportSeedActivity extends AppCompatActivity implements UIValidator final Activity activity = this; + + + @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); @@ -65,6 +71,24 @@ public class ImportSeedActivity extends AppCompatActivity implements UIValidator ButterKnife.bind(this); + /* + * Integration of library with button efects + * */ + PushDownAnim.setPushDownAnimTo(btnCancel) + .setOnClickListener( new View.OnClickListener(){ + @Override + public void onClick( View view ){ + cancel(); + } + } ); + PushDownAnim.setPushDownAnimTo(btnImport) + .setOnClickListener( new View.OnClickListener(){ + @Override + public void onClick( View view ){ + importSeed(); + } + } ); + /* * Initially the button CREATE WALLET should be disabled * */ @@ -354,7 +378,7 @@ public class ImportSeedActivity extends AppCompatActivity implements UIValidator runOnUiThread(new Runnable() { @Override public void run() { - btnImport.setBackgroundColor(getResources().getColor(R.color.colorPrimary)); + //btnImport.setBackgroundColor(getResources().getColor(R.color.colorPrimary)); btnImport.setEnabled(true); } }); @@ -368,7 +392,7 @@ public class ImportSeedActivity extends AppCompatActivity implements UIValidator @Override public void run() { btnImport.setEnabled(false); - btnImport.setBackground(getDrawable(R.drawable.disable_style)); + //btnImport.setBackground(getDrawable(R.drawable.disable_style)); } }); } diff --git a/app/src/main/res/layout/activity_license.xml b/app/src/main/res/layout/activity_license.xml index f78bf4e..f2889e9 100644 --- a/app/src/main/res/layout/activity_license.xml +++ b/app/src/main/res/layout/activity_license.xml @@ -33,6 +33,7 @@ android:id="@+id/btnDisAgree" android:layout_width="match_parent" android:layout_height="wrap_content" + android:layout_gravity="center" android:layout_weight="0.50" android:layout_marginEnd="8dp" android:theme="@style/RedButton" diff --git a/app/src/main/res/layout/import_seed.xml b/app/src/main/res/layout/import_seed.xml index ca6172f..4b68d61 100644 --- a/app/src/main/res/layout/import_seed.xml +++ b/app/src/main/res/layout/import_seed.xml @@ -90,33 +90,36 @@