-Add the new buttons push animation to the buttons in the activity_licence.xml and java source
This commit is contained in:
parent
24dba53c5f
commit
074e37076d
1 changed files with 31 additions and 0 deletions
|
@ -4,7 +4,11 @@ import android.content.Intent;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.support.annotation.Nullable;
|
import android.support.annotation.Nullable;
|
||||||
import android.support.v7.app.AppCompatActivity;
|
import android.support.v7.app.AppCompatActivity;
|
||||||
|
import android.view.View;
|
||||||
import android.webkit.WebView;
|
import android.webkit.WebView;
|
||||||
|
import android.widget.Button;
|
||||||
|
|
||||||
|
import com.thekhaeng.pushdownanim.PushDownAnim;
|
||||||
|
|
||||||
import butterknife.BindView;
|
import butterknife.BindView;
|
||||||
import butterknife.ButterKnife;
|
import butterknife.ButterKnife;
|
||||||
|
@ -20,8 +24,17 @@ public class LicenseActivity extends AppCompatActivity {
|
||||||
|
|
||||||
@BindView(R.id.wvEULA) WebView wvEULA;
|
@BindView(R.id.wvEULA) WebView wvEULA;
|
||||||
|
|
||||||
|
@BindView(R.id.btnDisAgree)
|
||||||
|
Button btnDisAgree;
|
||||||
|
|
||||||
|
@BindView(R.id.btnAgree)
|
||||||
|
Button btnAgree;
|
||||||
|
|
||||||
CrystalDatabase db;
|
CrystalDatabase db;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
@ -29,6 +42,24 @@ public class LicenseActivity extends AppCompatActivity {
|
||||||
|
|
||||||
ButterKnife.bind(this);
|
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());
|
db = CrystalDatabase.getAppDatabase(this.getApplicationContext());
|
||||||
int licenseVersion = getResources().getInteger(R.integer.license_version);
|
int licenseVersion = getResources().getInteger(R.integer.license_version);
|
||||||
GeneralSetting generalSettingLastLicenseRead = db.generalSettingDao().getSettingByName(GeneralSetting.SETTING_LAST_LICENSE_READ);
|
GeneralSetting generalSettingLastLicenseRead = db.generalSettingDao().getSettingByName(GeneralSetting.SETTING_LAST_LICENSE_READ);
|
||||||
|
|
Loading…
Reference in a new issue