在 onBindViewHolder 中
TypedValue typedValue = new TypedValue();
mActivity.getTheme().resolveAttribute(android.R.attr.selectableItemBackground, typedValue, true);
Drawable background = getResources().getDrawable(typedValue.resourceId);
// Drawable background = getResources().getDrawable(R.drawable.ripple_background);
holder.rootView.setBackground(background);
holder.rootView.setOnClickListener(new View.OnClickListener() {
@
Override public void onClick(View v) {
startActivity(new Intent(getContext(), VideoDetailActivity.class));
// ToastUtils.showToast(mActivity, "av :: " + mRecommendList.get(position).av);
}
});
还是没有用额.