开发者

Android custom Listview with clickable links in each element

In my android application I am using a custom listview to display my re开发者_高级运维cords. each element in the list view have 7 textviews which displays information from database.

what I want to do is to disable the entire element selected property completely in the listview, because some textviews in each element itself are clickable links and i want access them using device trackball. Untill it select entire listview elements I cant access those links that resides in each element in the listview using device trackball and to click them.


You can set the

android:clickable=false

property of listview. To handle the clicks of the links, you should handle the onClickListener() of the link from within the getView() method of Adapter.


In your ListAdapter override the two methods:

@Override
public boolean areAllItemsEnabled() {
    return false;
}

@Override
public boolean isEnabled(int position) {
    return false;
}
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜