[英]Android Back Arrow Animation throughout entire Application
I have successfully achieved the Drawer Hamburger/ Arrow Spin Navigation in Home Activity. 我已经在家庭活动中成功实现了“抽屉汉堡/箭头旋转导航”。
It is working fine but is limited to that specific activity . 它工作正常,但仅限于该特定活动 。
When I start an intent to Activity B I am unable to do the same spin animation. 当我开始进行活动B时,我无法执行相同的旋转动画。
Can I use it in my entire app, Just like Google Play. 我可以像Google Play一样在我的整个应用程序中使用它吗? And how to do it? 以及如何做?
Lets say Activity A extends BaseActivity so in oncreate of Activity A you will do setContentView (childview); 可以说活动A扩展了BaseActivity,因此在活动A的oncreate中,您将执行setContentView(childview); Now this will give call to overrided method of BaseActivity. 现在,这将调用BaseActivity的重写方法。 Lets say BaseActivity has layout abc.xml with containerview. 可以说BaseActivity具有带有containerview的布局abc.xml。
Add this view to the container. 将此视图添加到容器。 Inflate from abc.xml and put it in view. 从abc.xml进行膨胀并将其显示。
This is it. 就是这个。 You can have a common layout structure throughout apps. 您可以在整个应用程序中使用通用的布局结构。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.