我有一个动画定义为
scale.xml
xmlns:android="http://schemas.android.com/apk/res/android">
android:fromXScale="1.0"
android:fromYScale="1.0"
android:toXScale="2.0"
android:toYScale="2.0"
android:duration="3000">
通过以下方式以编程方式添加
TextView tv2 = (TextView) pw.getContentView().findViewById(R.id.playresultPopupYardsTextView);
Animation scale = AnimationUtils.loadAnimation(this, R.anim.scale);
scale.setStartOffset(5000);
scale.setFillAfter(true);
tv2.clearAnimation();
tv2.setAnimation(scale);
pw是定义为的PopupWindow
LayoutInflater inflater = (LayoutInflater) this.getSystemService(view.getContext().LAYOUT_INFLATER_SERVICE);
final PopupWindow pw = new PopupWindow(
inflater.inflate(R.layout.playresult_popup