开发者

android start Activity in adapter (transition animiation direction problem)

开发者 https://www.devze.com 2023-01-25 13:29 出处:网络
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 overridePendingTran

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 f开发者_JAVA技巧rom the adapter?

thank you so much! penny


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


((Activity)  context).overridePendingTransition(R.anim.slide_out_right,R.anim.slide_in_left);
0

精彩评论

暂无评论...
验证码 换一张
取 消