0

我想在我侧滚动时打开活动mainActivity:“Like Playstore”。

我创建了 3 个活动,但我不知道如何插入到我的mainActivity.

public CharSequence getPageTitle(int position) {
    switch (position) {
        case 0:
            return getString(R.string.title_section1).toUpperCase();
            /** Here I must add the code to open activity but I don't know how ;-) **/
        case 1:
            return getString(R.string.title_section2).toUpperCase();
        case 2:
            return getString(R.string.title_section3).toUpperCase();
    }
    return null;
}
4

1 回答 1

0

看着

http://developer.android.com/guide/components/activities.html#StartingAnActivity

http://developer.android.com/reference/android/content/Context.html#startActivity(android.content.Intent )

它应该阐明您如何从您的活动开始新活动。

于 2013-01-24T00:03:21.673 回答