登录按钮添加登录中动画

Paste_Image.png

布局
` android:layout_width="match_parent"
android:layout_height="@dimen/dp_45" >

            

Paste_Image.png

然后代码中
loadingLogin = (LinearLayout) findViewById(R.id.login_loading_ll); loginIv = (ImageView) findViewById(R.id.login_loading); loginIv.setColorFilter(Color.WHITE);
动画
Animation operatingAnim = AnimationUtils.loadAnimation(mContext, R.anim.image_rotate);
login_button.setVisibility(View.GONE); loadingLogin.setVisibility(View.VISIBLE); loginIv.startAnimation(operatingAnim);
登录失败
login_button.setVisibility(View.VISIBLE); loadingLogin.setVisibility(View.GONE); loginIv.clearAnimation();
R.anim.image_rotate

你可能感兴趣的:(登录按钮添加登录中动画)