android 上的列表视图涟漪效应

Listview ripple effect on android

我想在点击 ListView 的项目时禁用连锁反应。 我在 vue 上使用 nativescript 6。我已经为 IOS 禁用了正确的选择颜色,但是对于 android 我正面临这个问题!

只需在 ListView 上添加 loaded 事件和 运行 此代码,

onLoaded: function(args) {
 if (args.object.android) {
    args.object.android.setSelector(new android.graphics.drawable.StateListDrawable());
 }
}