Note that there are some explanatory texts on larger screens.

plurals
  1. POViewPager not occupying full size(width) in Samsung Galaxy s4
    primarykey
    data
    text
    <p>I had used Universal Image Downloader for displaying the list of images through ViewPager using the below code.</p> <pre><code>ViewPager layout &lt;RelativeLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" &gt; &lt;android.support.v4.view.ViewPager xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/pager" android:layout_width="fill_parent" android:layout_height="wrap_content" /&gt; **&lt;LinearLayout android:id="@+id/dot_images_layout" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:layout_marginBottom="5dp" android:gravity="center" android:orientation="horizontal" /&gt;** &lt;/RelativeLayout&gt; I am displaying the list of images using a class which extends PagerAdapter. private class ImagePagerAdapter extends PagerAdapter { private String[] images; private LayoutInflater inflater; ImagePagerAdapter(String[] images) { this.images = images; inflater = getLayoutInflater(); } @Override public void destroyItem(ViewGroup container, int position, Object object) { ((ViewPager) container).removeView((View) object); } @Override public void finishUpdate(View container) { } @Override public int getCount() { return images.length; } @Override public Object instantiateItem(ViewGroup view, int position) { View imageLayout = inflater.inflate(R.layout.item_pager_image, view, false); ImageView imageView = (ImageView) imageLayout.findViewById(R.id.image); final ProgressBar spinner = (ProgressBar) imageLayout.findViewById(R.id.loading); imageLoader.displayImage(images[position], imageView, options, new SimpleImageLoadingListener() { @Override public void onLoadingStarted(String imageUri, View view) { spinner.setVisibility(View.VISIBLE); } @Override public void onLoadingFailed(String imageUri, View view, FailReason failReason) { spinner.setVisibility(View.GONE); } @Override public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) { spinner.setVisibility(View.GONE); } }); ((ViewPager) view).addView(imageLayout, 0); return imageLayout; } } **item_pager_image layout** &lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:padding="1dip" &gt; &lt;ImageView android:id="@+id/image" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_gravity="center" android:adjustViewBounds="true" android:contentDescription="@string/descr_image" /&gt; &lt;ProgressBar android:id="@+id/loading" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" android:visibility="gone" /&gt; &lt;/FrameLayout&gt; </code></pre> <p>This is working fine in all the devices except in Samsung Galaxy S4.Image is not occupying the total width of the device though i had mentioned android:layout_width="fill_parent" in the code. Can any one help me.</p> <p>Scree shot below</p> <p><img src="https://i.stack.imgur.com/Tly6Q.png" alt="enter image description here"></p> <p>Thanks in advance.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload