如何创建可点击列表项 [英] how to create a clickable list item

查看:94
本文介绍了如何创建可点击列表项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿朋友们,



我有一个简单的列表视图,从我的sql数据库中填充一个名称列表 - 这部分已经完成,经过测试并且有效。



现在我需要在每个listitem上添加一个处理程序,请你能帮帮我吗?理想情况下,我希望listitem在点击时变为橙色。



每个listview项目代表音乐曲目的名称,当用户点击时应该打开流媒体播放器和播放该项目最好是作为服务,所以它保持打开。



每个轨道存储在我存储在我的数据库中的网络链接的服务器上。



请帮助谢谢

Hey friends,

I have a simple list view that gets filled from my sql database with a list of names - this part is done , tested and it works.

Now I need to do add a handler on each listitem, please can you help me do this? Ideally I would like the listitem to turn orange when clicked.

Each listview item represents a name of a music track that when the user clicks should open up streamingmedia player and play the item preferably as a service so it remains open.

Each track is stored on a server which I store the weblink of in my database.

Please help thanks

推荐答案

谷歌坏了吗?



在Android中使用列表(ListView) - 教程 [ ^ ]

处理Android ListView onItemClick事件 [ ^ ]
Did Google is broken?

Using lists in Android (ListView) - Tutorial [^]
Handling Android ListView onItemClick Event [^]


这篇关于如何创建可点击列表项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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