From c40ab5711d9025a5e25a85b5b24be72cfa90e375 Mon Sep 17 00:00:00 2001 From: 陈奇 <1650699704@qq.com> Date: Fri, 30 Nov 2018 11:34:33 +0800 Subject: [PATCH] [*]修改页面动画 --- app/src/main/java/com/moral/yunfushao/activity/LoginActivity.java | 19 +++++++++++++++++-- 1 files changed, 17 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/moral/yunfushao/activity/LoginActivity.java b/app/src/main/java/com/moral/yunfushao/activity/LoginActivity.java index 8074f2b..bd3d80a 100644 --- a/app/src/main/java/com/moral/yunfushao/activity/LoginActivity.java +++ b/app/src/main/java/com/moral/yunfushao/activity/LoginActivity.java @@ -1,5 +1,6 @@ package com.moral.yunfushao.activity; +import android.animation.ObjectAnimator; import android.content.Intent; import android.os.Bundle; import android.support.annotation.Nullable; @@ -36,6 +37,7 @@ private TextView tv_forget, tv_register; private EditText et_phone, et_pwd; private IWXAPI iwxapi; + private ObjectAnimator animator; @Override protected void getBundleExtras(Bundle extras) { @@ -77,8 +79,20 @@ et_phone = findView(R.id.et_phone); et_pwd = findView(R.id.et_pwd); weixinlogin = findView(R.id.weixinlogin); -// et_phone.setText("18362724160"); -// et_pwd.setText("123456"); + initAnimator(); + } + + private void initAnimator() { +// ObjectAnimator an = ObjectAnimator.ofFloat(bt_sure, "translationX", 500f, 0f); +// an.start(); +//// ObjectAnimator translationY = ObjectAnimator.ofFloat(bt_sure, "rotation", 360f, 0f); +// ObjectAnimator scaleY = ObjectAnimator.ofFloat(bt_sure, "scaleY", 0f, 1f); +// ObjectAnimator scaleX = ObjectAnimator.ofFloat(bt_sure, "scaleX", 0f, 1f); +// +// AnimatorSet oo = new AnimatorSet(); +// oo.playTogether(scaleY, scaleX); +// oo.setDuration(500); +// oo.start(); } @Override @@ -86,6 +100,7 @@ bt_sure.setOnClickListener(this); tv_forget.setOnClickListener(this); tv_register.setOnClickListener(this); + weixinlogin.setOnClickListener(this); } @Override -- Gitblit v1.8.0