标签:listener nim pat logs final div http bsp log
import android.animation.ValueAnimator; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.widget.TextView; public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); final TextView tv = (TextView) findViewById(R.id.tv_values); ValueAnimator va = ValueAnimator.ofInt(0,100); va.setDuration(15000); va.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() { @Override public void onAnimationUpdate(ValueAnimator animation) { Integer value = (Integer) animation.getAnimatedValue(); tv.setText(""+value); } }); va.start(); } }
标签:listener nim pat logs final div http bsp log
原文地址:http://www.cnblogs.com/loaderman/p/6437436.html