<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.NestedScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/scrollView_comment"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
.....此处省略
<LinearLayout
android:layout_width="match_parent"
android:layout_height="44dp"
android:gravity="center">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<ImageView
android:layout_width="20dp"
android:layout_height="20dp"
android:src="@color/text_msg_33"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="12dp"
android:layout_marginRight="12dp"
android:text="1"
android:textColor="#8c8c8c"
android:textSize="15sp"/>
<ImageView
android:layout_width="20dp"
android:layout_height="20dp"
android:src="@color/text_msg_33"/>
</LinearLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="20dp"
android:layout_marginRight="10dp"
android:background="@drawable/bg_shop_card"
android:gravity="center"
android:paddingLeft="8dp"
android:paddingRight="8dp"
android:text="加入购物车"
android:textColor="@color/white"
android:textSize="14sp"/>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="10dp"
android:background="#f2f2f2"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="35dp"
android:gravity="center_vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="11dp"
android:text="用户评价"
android:textColor="#666666"
android:textSize="13sp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/line_1px"
android:layout_marginRight="20dp"
android:text="(21313)"
android:textColor="#666666"
android:textSize="13sp"/>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="0.5dp"
android:background="#dcdcdc"/>
<android.support.v7.widget.RecyclerView
android:id="@+id/recycler_seller_comment"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:descendantFocusability="blocksDescendants"
android:nestedScrollingEnabled="false"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="查看更多"
android:textColor="#8c8c8c"
android:textSize="13sp"/>
</LinearLayout>
</android.support.v4.widget.NestedScrollView>
android:nestedScrollingEnabled="false"
mRecycler.setNestedScrollingEnabled(false);
mRecycler.setHasFixedSize(false);
LinearLayoutManager layoutManager = new LinearLayoutManager(this); layoutManager.setSmoothScrollbarEnabled(true); layoutManager.setAutoMeasureEnabled(true); recyclerView.setLayoutManager(layoutManager); recyclerView.setHasFixedSize(true); recyclerView.setNestedScrollingEnabled(false);
recyclerView.setHasFixedSize( true); recyclerView.setNestedScrollingEnabled(false);
public class RecycleScrollView extends ScrollView {
private int downX;
private int downY;
private int mTouchSlop;
public RecycleScrollView(Context context) {
super(context);
mTouchSlop = ViewConfiguration.get(context).getScaledTouchSlop();
}
public RecycleScrollView(Context context, AttributeSet attrs) {
super(context, attrs);
mTouchSlop = ViewConfiguration.get(context).getScaledTouchSlop();
}
public RecycleScrollView(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
mTouchSlop = ViewConfiguration.get(context).getScaledTouchSlop();
}
@Override
public boolean onInterceptTouchEvent(MotionEvent e) {
int action = e.getAction();
switch (action) {
case MotionEvent.ACTION_DOWN:
downX = (int) e.getRawX();
downY = (int) e.getRawY();
break;
case MotionEvent.ACTION_MOVE:
int moveY = (int) e.getRawY();
if (Math.abs(moveY - downY) > mTouchSlop) {
return true;
}
}
return super.onInterceptTouchEvent(e);
}
}
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有