我目前正在我的 Android 应用程序中集成 FlipView 库 ( https://github.com/emilsjolander/android-FlipView )。我绝对需要启用 onClick,但它与 ListView 的工作方式不同。我知道我需要调整 FlipView,但我真的不知道怎么做。
这是我迄今为止用来处理 onClick 事件的代码:
@Override
public void onListItemClick(FlipView listView, View view, int position, long id) {
if (id >= 0) { // should not happen, but I had a crash with this on PlayStore...
startActivity(new Intent(Intent.ACTION_VIEW, ContentUris.withAppendedId(mUri, id)));
}
}
有人可以帮助我吗?任何帮助将不胜感激!!!
谢谢