can anyone explain this lines please.

private ArrayList<View> history;

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

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

    replaceView(view);

}

public void replaceView(View v) {
    history.add(v);
    setContentView(v);

}

what does the line

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

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

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

swipeytabs:bottomBarColor="#ff96aa39"
swipeytabs:bottomBarHeight="2dip"
swipeytabs:tabIndicatorHeight="3dip"

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?

<net.peterkuterna.android.apps.swipeytabs.SwipeyTabs
        android:id="@+id/swipeytabs"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        swipeytabs:bottomBarColor="#ff96aa39"
        swipeytabs:bottomBarHeight="2dip"
        swipeytabs:tabIndicatorHeight="3dip"
        android:background="#ff3b3b3b"/>

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.support.v4.view.ViewPager
    android:id="@+id/viewpager"
    android:layout_width="fill_parent"
    android:layout_height="0px"
    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, networking, learning, and sharing knowledge.