我们如何可以调用使用片段选项卡选择其他的活动? [英] How can we call another activity by using fragment tabs?
本文介绍了我们如何可以调用使用片段选项卡选择其他的活动?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用的片段,制表符,我用listfragment的标签,我想,我使用下面code去项目clicklistner另一种活性的研究:
I am using fragment with tabs, and i use listfragment in tab,i want to go another acitivity on item clicklistner, i am using below code:
Activity activity = getActivity();
Intent i = new Intent(activity, Motherboard.class);
startActivity(i);
这是要另外一个活动,但它没有显示tabbars。 我想如果有活动的呼叫,然后使用TabBar保持盈。 请帮我。
it is going to another activity but it not showing tabbars. I want if any activity call then the tabbar remain infront. Please help me out.
推荐答案
除非你想编写一个超类,实现了标签栏在所有的活动中,从这个超类继承,你可以试试与其他片段取代您的片段。节省很多的内存以及。
unless you do want to write a super-class that implements a tab-bar in all of your activities that inherit from this super-class, you can just try to replace your fragment with another fragment. Saves alot of memory aswell.
这篇关于我们如何可以调用使用片段选项卡选择其他的活动?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文