English 中文(简体)
从与TabHost选定的活动中开展新的活动,因此,只有框架变化的内容。
原标题:running new Activity from Activity selected with TabHost so that only contents of Frame change

在我会发现任何这方面的动因时,你会给予帮助。

I have a TabHost with two activities assigned. Tabs are "shops" and "people" Both Activities contain ListViews. Now.. If I click on one of the elements of the ListView I would like to "shoes/people" tab to remain still while only contents of Frame to change (where listView is) so that at any given time I can switch back to other tab and start process from begining.

目前用户在清单调查项目上点击之后

Intent merchant = new Intent(v.getContext(), MerchantView.class);
startActivity(merchant);

一项新的活动已经开始(Tabs dissapear),并完全取而代之。

问题:

  1. 在我点击名单上的陈词时,显然形成了全新的观点。 怎样才能在弗拉梅内开展这一商言活动?

  2. This MerchantView will then have another clickable element which again I would like to behave in similar way (Tab remains still).Is my approach here good?(to change activites per click). I mean maybe instead of running new activities for every screen I should change a view in some way

感谢!

最佳回答

Instead of starting a new activity each time an item is clicked, and you want to use the same view..Why not when the button is clicked you just inflate the new information into the view, instead of launching a whole new activity. This seems like the best solution.

问题回答

暂无回答




相关问题
Android - ListView fling gesture triggers context menu

I m relatively new to Android development. I m developing an app with a ListView. I ve followed the info in #1338475 and have my app recognizing the fling gesture, but after the gesture is complete, ...

AsyncTask and error handling on Android

I m converting my code from using Handler to AsyncTask. The latter is great at what it does - asynchronous updates and handling of results in the main UI thread. What s unclear to me is how to handle ...

Android intent filter for a particular file extension?

I want to be able to download a file with a particular extension from the net, and have it passed to my application to deal with it, but I haven t been able to figure out the intent filter. The ...

Android & Web: What is the equivalent style for the web?

I am quite impressed by the workflow I follow when developing Android applications: Define a layout in an xml file and then write all the code in a code-behind style. Is there an equivalent style for ...

TiledLayer equivalent in Android [duplicate]

To draw landscapes, backgrounds with patterns etc, we used TiledLayer in J2ME. Is there an android counterpart for that. Does android provide an option to set such tiled patterns in the layout XML?

Using Repo with Msysgit

When following the Android Open Source Project instructions on installing repo for use with Git, after running the repo init command, I run into this error: /c/Users/Andrew Rabon/bin/repo: line ...

Android "single top" launch mode and onNewIntent method

I read in the Android documentation that by setting my Activity s launchMode property to singleTop OR by adding the FLAG_ACTIVITY_SINGLE_TOP flag to my Intent, that calling startActivity(intent) would ...

From Web Development to Android Development

I have pretty good skills in PHP , Mysql and Javascript for a junior developer. If I wanted to try my hand as Android Development do you think I might find it tough ? Also what new languages would I ...

热门标签