ActivityGroup is deprecated

I am making an Android application containing three tabs. The third tab has a login screen.

when I press the login button ... I want to replace the action with an activity that contains the button for viewing the list and logging out ....

I used to use an Activity Group to replace activity. But Group activity is now out of date.

Now, how can I replace activity on the third tab?

I am using this code

Intent intent = new Intent(MyApp.this, LoginPage.class);

                    replaceContentVieww("activity4", intent);



  public void replaceContentVieww(String id, Intent newIntent) {
                    // TODO Auto-generated method stub


View view = getLocalActivityManager().startActivity(id,newIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)).getDecorView(); 
                            setContentView(view);


                    }

There is a link with which I found out that this class is deprecated.

+5
source share
2 answers

you should use Fragment and FragmentManager in the compatibility package

http://developer.android.com/sdk/compatibility-library.html

ADT, /Android//v4//

+4

, ?

FrameLayout ( setContent(), ) View ( setContent(), TabContentFactory).

0

All Articles