public void deleteButtonClick(View v) {
//TODO Remove favorite - DB + file system
Toast.makeText(this, "Deleting bookmark", Toast.LENGTH_SHORT).show();
final int position = getListView().getPositionForView((LinearLayout)v.getParent());
if (position >= 0) {
Favorite o = (Favorite) this.getListAdapter().getItem(position);
}
}
getPositionForView
最新推荐文章于 2022-03-14 19:44:22 发布