我创建了一个意图对象以及单击Bundle
a 时CardView
,然后我启动Activity
. 我如何overridePendingTransition
在里面声明?代码如下:
@Override
public void onBindViewHolder(final ViewHolder holder, final int position) {
holder.textView.setText(strings[position]);
holder.cardView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent = new Intent(holder.itemView.getContext(),SecondActivity.class);
Bundle bundle = new Bundle();
bundle.putString("list",strings[position]);
intent.putExtras(bundle);
holder.itemView.getContext().startActivity(intent);
//overridePendingTransition(R.anim.abc_fade_in,R.anim.abc_fade_out);
}
});
}