1

I'm working on an Android app that will display a ListView with items loaded from the web. The ListView must be displayed after logging in to the app.

What I've done so far:

  • I created a Main Activity with tabs on the top.
  • In one of the tabs (activity's) you have to log in.
  • Then I use the AsyncTask to do the authenticating in the background.

Now that's what I've done so far. I then need to make the following:

When the username and password meet requirements, the app should start a NEW activity, that will show the ListView with the remote items from the web. I need this to be done in a proper fashion, so i will also use an AsyncTask to do this. The Problem is...

I don't know how to approach this. Because when I verify the username it will load... and it will load again when it's loading the list items.. Is there a way to get this all working nicely and within the tabs interface as it currently is?

4

1 回答 1

1

我不确定我是否完全理解您的要求。

据我所知,您想在身份验证后添加一个列表视图选项卡。因此,一旦您的异步任务返回登录成功,只需使用TabHost.newTabSpec()创建一个新选项卡。

对不起,如果我误解了。希望有帮助。

于 2012-06-04T15:08:38.780 回答