如何插入overridePendingTransition
`GridView
适配器?以这种方式不起作用,没有过渡 startactivity 完美地工作
bt.setOnLongClickListener(new OnLongClickListener(){
@Override
public boolean onLongClick(View v) {
final String selectedPad = Drum.pads[position];
Intent modPad = new Intent(v.getContext(), ModifyPad.class);
modPad.putExtra("pad", selectedPad);
context.startActivity(modPad);
overridePendingTransition(R.anim.exit_slid_in, R.anim.exit_slid_out);
return false;
}
});
我读过这篇文章:
android start Activity in adapter (transition animation direction problem) ,以及相关的评论,但我不知道如何通过Activity
. Adapter
有什么帮助吗?