开发者

How to start an activity inside any layout, android

开发者 https://www.devze.com 2023-01-17 15:42 出处:网络
I have created a an activity named Example which have 3 LinearLayouts . I want to start an activity.So I used the following lines of code

I have created a an activity named Example which have 3 LinearLayouts . I want to start an activity. So I used the following lines of code

Intent jumpToStationModule = new Intent();
jumpToStationModule.setClassName("com.xxx", "com.xxx.Test");
startActivity(jumpToStationModule);

Test is another activity. As a result of the above code a new activity is called i开发者_开发知识库n new page. But I want to get the same resule or start the activity inside 2nd layout of Example class.

How to achieve this.

Thanks Sunil Kumar Sahoo


You can use ActivityGroup to achieve this.

Check for samples where you can add multiple activities to an ActivityGroup.

0

精彩评论

暂无评论...
验证码 换一张
取 消