开发者

Get Current Activity in Android Application

开发者 https://www.devze.com 2023-03-24 13:19 出处:网络
I want to know in which activity is currently running in my appliction . I\'m used View view =(View)getCurrentFocus(); but it returns null value. Is there any function开发者_StackOverflow社区 like get

I want to know in which activity is currently running in my appliction . I'm used View view =(View)getCurrentFocus(); but it returns null value. Is there any function开发者_StackOverflow社区 like getCurrentActivity()?

Thanks in advance


To get the Class name of the current activity.

this.getLocalClassName()
0

精彩评论

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