<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/product_detail_root"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
> <ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/scrollview_product"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:descendantFocusability="blocksDescendants"
android:fillViewport="true"
android:scrollbars="none"> <LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:focusable="true"
android:focusableInTouchMode="true"
android:orientation="vertical"> <RelativeLayout
android:layout_width="match_parent"
android:layout_height="@dimen/y680"> <android.support.v4.view.ViewPager
android:id="@+id/viewPager"
android:layout_width="match_parent"
android:layout_height="@dimen/y680"></android.support.v4.view.ViewPager> <View
android:layout_width="match_parent"
android:layout_height="@dimen/y48"
android:layout_alignBottom="@+id/viewPager"
android:alpha="0.3"
android:background="@drawable/icon_gradient_bg"/> <LinearLayout
android:id="@+id/indicator"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/viewPager"
android:layout_marginBottom="@dimen/y16"
android:gravity="center_horizontal"
android:orientation="horizontal"> </LinearLayout>
</RelativeLayout> <com.github.lzyzsd.jsbridge.BridgeWebView
android:id="@+id/product_webviiew"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
</com.github.lzyzsd.jsbridge.BridgeWebView> </LinearLayout>
</ScrollView>
<TextView
android:id="@+id/tvBuyItNow"
android:layout_width="match_parent"
android:layout_height="@dimen/y84"
android:layout_centerVertical="true"
android:layout_gravity="bottom"
android:background="@color/btn_redlight"
android:clickable="true"
android:focusable="false"
android:gravity="center"
android:text="立即购买"
android:textColor="@color/white"
android:textSize="14sp"/></FrameLayout>
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/product_detail_root"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
> <ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/scrollview_product"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:descendantFocusability="blocksDescendants"
android:fillViewport="true"
android:scrollbars="none"> <LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:focusable="true"
android:focusableInTouchMode="true"
android:orientation="vertical"> <RelativeLayout
android:layout_width="match_parent"
android:layout_height="@dimen/y680"> <android.support.v4.view.ViewPager
android:id="@+id/viewPager"
android:layout_width="match_parent"
android:layout_height="@dimen/y680"></android.support.v4.view.ViewPager> <View
android:layout_width="match_parent"
android:layout_height="@dimen/y48"
android:layout_alignBottom="@+id/viewPager"
android:alpha="0.3"
android:background="@drawable/icon_gradient_bg"/> <LinearLayout
android:id="@+id/indicator"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/viewPager"
android:layout_marginBottom="@dimen/y16"
android:gravity="center_horizontal"
android:orientation="horizontal"> </LinearLayout>
</RelativeLayout> <com.github.lzyzsd.jsbridge.BridgeWebView
android:id="@+id/product_webviiew"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
</com.github.lzyzsd.jsbridge.BridgeWebView> </LinearLayout>
</ScrollView>
<TextView
android:id="@+id/tvBuyItNow"
android:layout_width="match_parent"
android:layout_height="@dimen/y84"
android:layout_centerVertical="true"
android:layout_gravity="bottom"
android:background="@color/btn_redlight"
android:clickable="true"
android:focusable="false"
android:gravity="center"
android:text="立即购买"
android:textColor="@color/white"
android:textSize="14sp"/></FrameLayout>
解决方案 »
- android系统默认浏览器中点击视频链接,打开播放器播放,如何实现?
- android如何利用ffmpeg解码mpeg4
- 尝试写地图类应用出错,MapActivity.<init> 时出错
- 对话框问题,求牛人帮忙
- 读sdcard上的txt文档,怎样分页?
- 监听返回键以后menu菜单没作用了。是怎么回事?
- 新手求教android裁剪
- 有什么方法能让安卓手机自动下载或者自动接收服务端发送来的文件,不需要点击操作,全是自动的
- 本人小白 请教如何修改 线刷包的 APK
- android:如果通过输入1,0 来控制checkbox选或者不选
- 关于安卓数据保存的问题
- android ---大佬帮忙解决一下关于数据存储的问题
@Override
public boolean onInterceptTouchEvent(MotionEvent ev) {
final float x = ev.getX();
final float y = ev.getY(); final int action = ev.getAction();
switch (action) {
case MotionEvent.ACTION_DOWN:
mDownPosX = x;
mDownPosY = y; break;
case MotionEvent.ACTION_MOVE:
final float deltaY = Math.abs(y - mDownPosY);
// 这里是够拦截的判断依据是左右滑动,读者可根据自己的逻辑进行是否拦截
if (deltaY > 5) {
return false;
}
} return super.onInterceptTouchEvent(ev);
}