android start Activity in adapter (transition anim

2019-06-12 21:52发布

I was having the problem in here : How to start Activity in adapter? . however, i would like to modify the transition animation direction. since, inside an adapter, you cannot call overridePendingTransition(). So do you guys know how to do it by using context and intent?

also, i have an activity using my customized adapter, and do you guys know how to call my own function in activity from the adapter?

thank you so much! penny

2条回答
仙女界的扛把子
2楼-- · 2019-06-12 22:48

Sounds like you need to pass a Context into your adapter, can you override the constructor and pass one in then?

查看更多
相关推荐>>
3楼-- · 2019-06-12 22:49
((Activity)  context).overridePendingTransition(R.anim.slide_out_right,R.anim.slide_in_left);
查看更多
登录 后发表回答