开发者

need help for calling Listactivity from the Activity

I need help to know, how can I call 开发者_运维百科ListActivity from the Activity class? Can anyone help me?


I'm not sure what you mean by "call ListActivity from the Activity class".

If you're looking for information on using ListActivity and/or ListViews, take a look at http://developer.android.com/guide/tutorials/views/hello-listview.html and Is it realizable on Android? for examples.

If you're looking for information on starting a ListActivity from another Activity, for example when a button on the non-ListView activity is pressed, note that this isn't much different from just starting a second Activity from some other Activity. See http://developer.android.com/resources/tutorials/notepad/index.html for such an example.

The notepad tutorial also includes an example of a ListActivity starting a non-ListView Activity, which is very close to what you may be originally asking about.

If you're still stuck, try to ask a very specific question about what you're stuck on, including complete minimal code to replicate any problems you're having.


You have to include in the Manifest file.

<activity android:name=".MyListActivity" android:label="@string/app_name" />
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜