android - Implement horizontal scroll view like Slide Image Galery? -


i want implement image galery load url , put horizontal scroll view . want set image view match_parent doesn't work .. how view ??enter image description here

and xml , view .

<horizontalscrollview             android:layout_width="match_parent"             android:layout_height="300dp"             android:layout_alignparenttop="true"             android:layout_centerhorizontal="true"             android:layout_margin="12dp"             android:id="@+id/slideshow">              <linearlayout                 android:layout_width="wrap_content"                 android:layout_height="wrap_content"                 android:orientation="horizontal">                  <com.android.volley.toolbox.networkimageview                     android:layout_height="match_parent"                     android:layout_width="match_parent"                     android:id="@+id/slide1"                     android:scaletype="fitxy"                     android:src="@drawable/ic_launcher"/>                  <com.android.volley.toolbox.networkimageview                     android:layout_height="match_parent"                     android:layout_width="match_parent"                     android:id="@+id/slide2"                     android:scaletype="centerinside"                     android:src="@drawable/ic_launcher"/>                  <com.android.volley.toolbox.networkimageview                     android:layout_height="match_parent"                     android:layout_width="match_parent"                     android:id="@+id/slide3"                     android:scaletype="centercrop"                     android:src="@drawable/ic_launcher"/>             </linearlayout>         </horizontalscrollview> 

enter image description here

use relativelayout instead of linearlayout , align elements using rightof


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -