<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:fbutton="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:id="@+id/progressBarLL"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:background="@color/app_background_color"
android:gravity="center"
android:visibility="visible">
<ProgressBar
android:id="@+id/progressBar"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
<ScrollView
android:id="@+id/scrollableContent"
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:layout_alignParentTop="true"
android:scrollbars="none">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="4dp">
<LinearLayout
android:id="@+id/navigationControlLinearLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="5dp"
android:weightSum="4">
<ImageView
android:id="@+id/previousPageImageView"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:src="@drawable/previous_page_darken" />
<TextView
android:id="@+id/dealsPageNumberStatus"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:gravity="center"
android:text="1/50"
android:textSize="@dimen/text_size_medium" />
<ImageView
android:id="@+id/nextPageImageView"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:src="@drawable/next_page_darken" />
</LinearLayout>
<LinearLayout
android:id="@+id/dealsFragmentLinearLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginBottom="@dimen/margin_large"
android:layout_marginLeft="@dimen/margin_normal"
android:layout_marginRight="@dimen/margin_normal"
android:layout_marginTop="4dp"
android:background="@drawable/background_with_shadow"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="6"
android:orientation="horizontal"
android:paddingTop="0dp">
<ImageView
android:id="@+id/dealsFragmentImage"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_weight="2"
android:background="@android:color/transparent"
android:minHeight="@dimen/min_image_height"
android:padding="5dp"
android:src="@drawable/test_logo" />
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="4.00"
android:orientation="vertical"
android:padding="@dimen/padding_normal">
<TextView
android:id="@+id/dealsFragmentTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:maxLines="2"
android:text="This text is intentionally made larger to go beyound 2 lines"
android:textSize="@dimen/text_size_medium"
android:padding="@dimen/padding_normal" />
<TextView
android:id="@+id/dealsTimeSubmitted"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_gravity="center"
android:layout_weight="1"
android:ellipsize="end"
android:maxLines="2"
android:text="about an hour ago "
android:textColor="@color/light_grey"
android:textSize="@dimen/text_size_small"
android:padding="@dimen/padding_normal" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="2"
android:orientation="horizontal"
android:padding="@dimen/padding_normal">
<TextView
android:id="@+id/dealsCurrentPrice"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="left|center"
android:padding="4dp"
android:text="Rs. 135"
android:textColor="@color/deals_blue"
android:textSize="@dimen/text_size_large"
android:textStyle="bold" />
<TextView
android:id="@+id/dealsOffPercent"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="left|center"
android:padding="4dp"
android:text="(90% off)"
android:textColor="@color/deals_blue"
android:textSize="@dimen/text_size_medium" />
<TextView
android:id="@+id/dealsOriginalPrice"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="left|center"
android:padding="4dp"
android:text="1235698"
android:singleLine="true"
android:textColor="@color/light_grey"
android:textSize="@dimen/text_size_small" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="2"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="left|center"
android:paddingLeft="4dp"
android:text="@string/submitted_by"
android:textColor="@color/light_text"
android:textSize="@dimen/text_size_small" />
<TextView
android:id="@+id/dealsFragmentSubmittedBy"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="left|center"
android:text=" aniket007"
android:textColor="@color/deals_blue"
android:textSize="@dimen/text_size_small" />
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="left|center"
android:text=" in "
android:textColor="@color/light_text"
android:textSize="@dimen/text_size_small" />
<TextView
android:id="@+id/dealsCategory"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:ellipsize="end"
android:gravity="left|center"
android:maxLines="1"
android:paddingRight="4dp"
android:text="Mobiles and Mobile Accessories"
android:textColor="@color/deals_blue"
android:textSize="@dimen/text_size_small" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginTop="10dp"
android:background="@color/item_separator"
android:layout_marginLeft="@dimen/margin_normal"
android:layout_marginRight="@dimen/margin_normal" />
<WebView
android:id="@+id/dealDetail"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="10dp"
android:contentDescription="@string/top_deals"
android:textSize="@dimen/text_size_medium" />
<include
layout="@layout/list_item_deal_footer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
/>
</LinearLayout>
<!--<LinearLayout
android:id="@+id/dealsFragmentCommentLinearLayout"
android:layout_width="match_parent"
android:layout_height="30dp"
android:background="@color/deals_footer"
android:orientation="horizontal">
<View
android:layout_width="1dip"
android:layout_height="fill_parent"
android:background="@color/flat_grey" />
<ImageView
android:id="@+id/dealsFragmentLikeImage"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginRight="5dp"
android:layout_weight="1"
android:src="@drawable/comment_icon" />
<View
android:layout_width="1dip"
android:layout_height="fill_parent"
android:background="@color/flat_grey" />
<ImageView
android:id="@+id/dealsFragmentDislikeImage"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginRight="5dp"
android:layout_weight="1"
android:src="@drawable/comment_icon" />
<View
android:layout_width="1dip"
android:layout_height="fill_parent"
android:background="@color/flat_grey" />
<ImageView
android:id="@+id/dealsFragmentShareImage"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:src="@drawable/popularity_icon" />
<View
android:layout_width="1dip"
android:layout_height="fill_parent"
android:background="@color/flat_grey" />
</LinearLayout>
<info.hoang8f.widget.FButton
android:id="@+id/viewCommentsButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="10dp"
android:minHeight="@dimen/fb_button_min_height"
android:text="@string/viewComments"
android:textColor="@android:color/white"
android:textSize="@dimen/text_size_medium"
fbutton:buttonColor="@color/fbutton_default_color"
fbutton:cornerRadius="5dp"
fbutton:shadowColor="@color/fbutton_default_shadow_color"
fbutton:shadowEnabled="true"
fbutton:shadowHeight="2dp" />-->
<info.hoang8f.widget.FButton
android:id="@+id/buyNowButtonPlaceHolder"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:minHeight="@dimen/fb_button_min_height"
android:text="@string/buy_now"
android:textColor="@android:color/white"
android:textSize="@dimen/text_size_medium"
android:visibility="invisible"
fbutton:buttonColor="@color/fbutton_default_color"
fbutton:cornerRadius="5dp"
fbutton:shadowColor="@color/fbutton_default_shadow_color"
fbutton:shadowEnabled="true"
fbutton:shadowHeight="2dp" />
</LinearLayout>
</ScrollView>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:background="#ccffffff">
<info.hoang8f.widget.FButton
android:id="@+id/buyNowButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_margin="10dp"
android:minHeight="@dimen/fb_button_min_height"
android:minWidth="@dimen/buy_now_button_width"
android:text="@string/buy_now"
android:textColor="@android:color/white"
android:textSize="@dimen/text_size_medium"
fbutton:buttonColor="@color/fbutton_default_color"
fbutton:cornerRadius="5dp"
fbutton:shadowColor="@color/fbutton_default_shadow_color"
fbutton:shadowEnabled="true"
fbutton:shadowHeight="2dp" />
</RelativeLayout>
</RelativeLayout>
我在ScrollView中使用WebView,它在高于16的Android版本上运行正常。但在较低版本页面上滚动webview时不会滚动。页面确实从页面右侧滚动。点击左侧时链接也不打开,但从右侧打开。
找到了很少的解决方案,比如android:hardwareAccelerated =“true”,但没有用。