The ScrollView
in the layout has three Imageviews
which has drawable images set as its background.The dimensions of ImageViews
are 150dp. I have set the height of the ScrollView to wrap_content
and scrollbars
attribute to horizontal
.But it does not scroll.Please help me with the problem.
Code:
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/offerscroll"
android:scrollbars="horizontal"
android:layout_below="@+id/offr_prsnl_chs_pht"
>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<ImageView
android:layout_width="@dimen/prsnl_img_dimen"
android:layout_height="@dimen/prsnl_img_dimen"
android:id="@+id/offr_img1"
android:background="@drawable/ambulance"
android:layout_marginLeft="10dp"
android:layout_marginTop="15dp"/>
<ImageView
android:layout_width="@dimen/prsnl_img_dimen"
android:layout_height="@dimen/prsnl_img_dimen"
android:id="@+id/offr_img2"
android:background="@drawable/ambulance"
android:layout_marginLeft="5dp"
android:layout_marginTop="15dp"/>
<ImageView
android:layout_width="@dimen/prsnl_img_dimen"
android:layout_height="@dimen/prsnl_img_dimen"
android:id="@+id/offr_img3"
android:background="@drawable/ambulance"
android:layout_marginLeft="5dp"
android:layout_marginTop="15dp"/>
</LinearLayout>
</ScrollView>