popwin.setFocusable(true);//设置可以获取焦点
//设置背景,否则popupwindow获取焦点后其他控件或按键无响应
popwin.setBackgroundDrawable(getResources().getDrawable(R.drawable.bg_pop_shape));
popwin.setOnDismissListener(new OnDismissListener() {
@Override
public void onDismiss() {
// TODO Auto-generated method stub
btn_expand.setBackgroundResource(R.drawable.arrow_up);
}
});
RotateAnimation rotate = new RotateAnimation(0, 90, widOrg / 2,
heightOrg / 2);
rotate.setFillAfter(true);//设置保存动画执行后结果
rotate.setDuration(5000);
rotate.setInterpolator(this,
android.R.anim.accelerate_decelerate_interpolator);
// xml设置android:fillAfter="true"未起作用
// Animation ani = AnimationUtils.loadAnimation(this, R.anim.rotate);
myImageView1.setAnimation(rotate);
rotate.start();