Android中的Listview导航 [英] Listview navigation in Android

查看:57
本文介绍了Android中的Listview导航的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的Android应用程序中有自定义Listview,在列表项目上单击,我能够导航到其他活动,其中显示了有关列表项的所有详细信息!现在我的问题是,我想通过第二个活动导航到下一个/上一个listitem'的详细信息..我怎么能这样做。??



我'' m新手到android ..



提前致谢!

I have a custom Listview in my android app and on list item click, I''m able to navigate to other activity, which shows all the details about list item !! Now my question is, I want to navigate to next/previous listitem''s details through second activity.. how can i do this.??

I''m new to android..

Thanks in advance !

推荐答案

你可以尝试开始你的第二个活动使用 Intent 获取结果,如果用户(在secondt活动时)决定导航到下一个项目,则使用结果中的信息完成第二个活动以告诉第一个活动,用下一个项目的细节开始第二个活动。



希望这会有所帮助,

Fredrik
You can try starting your second activity with an Intent for result, and if the user (whilst on the secondt activity) decides to navigate to the next item then finish the second activity with information in the result to tell the first activity to start the second activity with the details of the next item.

Hope this helps,
Fredrik


这篇关于Android中的Listview导航的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆