Open child activity in Tab host android

后端 未结 2 831
深忆病人
深忆病人 2020-12-04 01:01

My Tab_Bar.class define define Tabs How I can open child activity

I am using only one single Tab_bar.class for Tab Host

public cla         


        
2条回答
  •  情深已故
    2020-12-04 01:25

    Firstly try using Fragment for creating tabs.

    Feature which you are using is deprecated by now.

    I have posted complete post over Dynamically changing the fragments inside a fragment tab host?

    Please check that out and let me know if you have any concern.

    Simply fallow each of defined steps one by one.

    CONCEPT

    I am putting simple example for clarifying you that exactly how this fragment works.

    Take simple scenario of your bed. Your bed consist of several things such as pillow, bed sheet etc. Now consider a case that your bed sheet is dirty. So what you will do by now. You will simply replace that sheet with a new one and then you will have a tight sleep :)

    Similarly when you need to change your UI... then this fragment is replaced with a new one.

    That's it. Now you are good to go with my post.

    Thanks!

提交回复
热议问题