From 074e37076de2aae5fe996d1729f093e781513127 Mon Sep 17 00:00:00 2001 From: dtvv Date: Fri, 12 Oct 2018 03:04:07 -0500 Subject: [PATCH] -Add the new buttons push animation to the buttons in the activity_licence.xml and java source --- .../activities/LicenseActivity.java | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/app/src/main/java/cy/agorise/crystalwallet/activities/LicenseActivity.java b/app/src/main/java/cy/agorise/crystalwallet/activities/LicenseActivity.java index 6e9a0d7..2c2d26b 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/activities/LicenseActivity.java +++ b/app/src/main/java/cy/agorise/crystalwallet/activities/LicenseActivity.java @@ -4,7 +4,11 @@ import android.content.Intent; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v7.app.AppCompatActivity; +import android.view.View; import android.webkit.WebView; +import android.widget.Button; + +import com.thekhaeng.pushdownanim.PushDownAnim; import butterknife.BindView; import butterknife.ButterKnife; @@ -20,8 +24,17 @@ public class LicenseActivity extends AppCompatActivity { @BindView(R.id.wvEULA) WebView wvEULA; + @BindView(R.id.btnDisAgree) + Button btnDisAgree; + + @BindView(R.id.btnAgree) + Button btnAgree; + CrystalDatabase db; + + + @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); @@ -29,6 +42,24 @@ public class LicenseActivity extends AppCompatActivity { ButterKnife.bind(this); + /* + * Integration of library with button efects + * */ + PushDownAnim.setPushDownAnimTo(btnDisAgree) + .setOnClickListener( new View.OnClickListener(){ + @Override + public void onClick( View view ){ + onDisagree(); + } + } ); + PushDownAnim.setPushDownAnimTo(btnAgree) + .setOnClickListener( new View.OnClickListener(){ + @Override + public void onClick( View view ){ + onAgree(); + } + } ); + db = CrystalDatabase.getAppDatabase(this.getApplicationContext()); int licenseVersion = getResources().getInteger(R.integer.license_version); GeneralSetting generalSettingLastLicenseRead = db.generalSettingDao().getSettingByName(GeneralSetting.SETTING_LAST_LICENSE_READ);