can anyone explain this lines please.

private ArrayList<View> history;

protected void onCreate(Bundle savedInstanceState) {
    this.history = new ArrayList<View>();
    group = this;

    View view = getLocalActivityManager().startActivity("Sales",
            new Intent(this, SalesRouteActivity.class).addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP))



public void replaceView(View v) {


what does the line

 View view = getLocalActivityManager().startActivity("Sales",
                new Intent(this, SalesRouteActivity.class).addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP))

do. I am just getting the same code in each and every site with no explanation to this one. Please can anyone help me in this code
thanks in advance

Recommended Answers

All 8 Replies

Can you explay what you trying to do? I ask because getLocalActivityManager() is returning deprecated class LocalActivityManager that you shouldnot really use. You should replace it with fragments

Thanks for the reply peter budo
I am trying to use tabs and activity groups and found an example where the entire code is used.
i didnt understand it and so i thought to get some knowledge about the lines and start the work on it.

can u give me few useful links how fragments are used and why they are used

Read this for better solution

Thanks peter budo.
I will try that post.

Telling layout manager that there is custom schema that is defined somewhere and swipeytabs will be used as reference signature to access it, like it is done just few lines bellow


Thanks peter budo and sorry to bother you again (just wanted to know each and every thing completely so that i could explain the same to others who find difficulty in this)
1. then what is this code?


Is this the code similar to using a google map?
i mean we are having some code given by google to display maps.
Is it the same?

  1. and even i am not having any view like viewpager instead am having few views like viewflipper ,viewanimater and viewswitcher..
    can i know how to use this code

    android:layout_weight="1" />

Thanks in advance.

Not really. The guy just created custom component that extends Fragment, so that is why you still able to pass some of the android paramenters, and then there are some custom things like colour of the tab, tab height that you could still manipulate through android params but it would be complicated and he provided easier way where you pass what you wish to change and all the stuff is handled internaly

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.