开发者

Android - show webview in same tab containing a list

开发者 https://www.devze.com 2023-01-01 19:21 出处:网络
I am using a TabWidget that contai开发者_如何学运维ns a List in one tab. What I want to do is when a user selects an item, a webview is shown in that tab.

I am using a TabWidget that contai开发者_如何学运维ns a List in one tab. What I want to do is when a user selects an item, a webview is shown in that tab.

If the user then wants to go back to the list, they would click on the list tab.

I can get the webview up that replaces the whole tabwidget but don't know how to leave the tabs and show a webview.

Any help greatly appreciated


The trick is to use ActivityGroup!

Launching activities within a tab in Android

The fun bit then becomes how to be able to disable the original view in the tab....

This can be done by adding a OnClickListener for the partciular tab

getTabWidget().getChildAt().setOnClickListener(new OnClickListener() {

public void onClick(View v) {

}

0

精彩评论

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