애니메이션 텍스트 뷰

    private void countDown(final TextView tv, final int count) {
        if (count == 0) {
            tv.setText(""); // Note: the TextView will be visible again here.
            return;
        }
        tv.setText(String.valueOf(count));
        AlphaAnimation animation = new AlphaAnimation(1.0f, 0.0f);
        animation.setDuration(1000);
        animation.setAnimationListener(new AnimationListener() {
            public void onAnimationEnd(Animation anim) {
                countDown(tv, count - 1);
            }

            @Override
            public void onAnimationRepeat(Animation animation) {
                // TODO Auto-generated method stub

            }

            @Override
            public void onAnimationStart(Animation animation) {
                // TODO Auto-generated method stub

            }
        });
        tv.startAnimation(animation);
    }

댓글

이 블로그의 인기 게시물

ViewPager offscreenPageLimit 메모리 상태

eskimo esim 사용기 - 일본 / 오사카(23/08/06 ~ 23/08/08)

ASP에서 C# 언어로 만든 DLL 호출