去掉背景:
view.setBackgroundResource(0);
使用系统背景:selectableItemBackground
xml中设置:
<LinearLayout
android:id="@+id/high_public_ll"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?android:attr/selectableItemBackground"
android:orientation="vertical">
</LinearLayout>
java代码:
TypedValue typedValue = new TypedValue();
mContext.getTheme().resolveAttribute(android.R.attr.selectableItemBackground, typedValue, true);
int resourceId = typedValue.resourceId;
mViewHolder.mLl.setBackgroundResource(resourceId);