开发者

how to open activity in diffrent tab from one tab?

开发者 https://www.devze.com 2023-03-28 08:08 出处:网络
This is my class: public class DumyDisplay extends TabGroupActivity I am calling new activity which is part of other tab:
  1. This is my class:

    public class DumyDisplay extends TabGroupActivity
    
  2. I am calling new activity which is part of other tab:

    Intent i = new Intent(DumyDisplay.this,SmsActivity.class);
    i.putExtra(BODY_SMS, dataInboxBody);
    startChildActivity("DumyDisplay", i);
    

The problem is that it's opening in the same tab but I want to o开发者_如何学运维pen it in different tab.


try this to call a new Activity of another Tab,

Intent i= new Intent(getParent(), SmsActivity.class);
TabGroupActivity parentActivity = (TabGroupActivity)getParent();
parentActivity.startChildActivity("SmsActivity", i);    
0

精彩评论

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