Note that there are some explanatory texts on larger screens.

plurals
  1. POincrease images sizes loads in carousel view android
    primarykey
    data
    text
    <p>I created app to display images from internet in carousel view. I loaded images into carousel view using imageview. just like following way.</p> <pre><code>public View getView(int position, View convertView, ViewGroup parent) { View vi=convertView; if(convertView==null) vi = inflater.inflate(R.layout.showsmain, null); ImageView image=(ImageView)vi.findViewById(R.id.imageView1); // RelativeLayout rlayout=(RelativeLayout)vi.findViewById(R.id.rlayouts); image.setImageResource(R.drawable.black); orgWidth = image.getDrawable().getIntrinsicWidth(); orgHeight = image.getDrawable().getIntrinsicHeight(); imageLoader.DisplayImage(data[position], image); imageLoader.getDimension(widthScreen, heightScreen); RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams( widthScreen, heightScreen/3); params.width=widthScreen; image.setLayoutParams(params); image.setScaleType(ImageView.ScaleType.FIT_XY); //rlayout.addView(image); return vi; } </code></pre> <p>and my carousel layout xml file is,</p> <pre><code>&lt;com.touchmenotapps.carousel.simple.HorizontalCarouselLayout android:id="@+id/carousel_layout_event" android:layout_width="600dp" android:layout_height="500dp" android:layout_above="@+id/relativeLayout1" android:layout_alignTop="@+id/carousel_layout" &gt; &lt;/com.touchmenotapps.carousel.simple.HorizontalCarouselLayout&gt; </code></pre> <p>then image show as following way in carousel,</p> <p>![enter image description here][1]</p> <p>Here i want to increase the image width &amp; height. It means one images must load fill with in the screen</p> <pre><code> public View getView(int position, View convertView, ViewGroup parent) { View vi=convertView; if(convertView==null) vi = inflater.inflate(R.layout.showimage, null); ImageView image=(ImageView)vi.findViewById(R.id.imageView1); //LinearLayout rlayout=(LinearLayout)vi.findViewById(R.id.layout); image.setImageResource(R.drawable.black); orgWidth = image.getDrawable().getIntrinsicWidth(); orgHeight = image.getDrawable().getIntrinsicHeight(); imageLoader.DisplayImage(data[position], image); imageLoader.getDimension(widthScreen, heightScreen); RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams( widthScreen,heightScreen/3); params.width=widthScreen/2; image.setLayoutParams(params); image.setScaleType(ImageView.ScaleType.FIT_XY); //rlayout.addView(image); return vi; } </code></pre> <p>this way I add the imageview into carousel view.</p> <p>how to do that. I asked question similer this one. But i didn't get answer. pls help me someone. pls.....</p> <p>my imageview xml layout file..</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:id="@+id/rlayouts"&gt; &lt;ImageView android:id="@+id/imageView1" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_alignParentBottom="true" android:layout_alignParentLeft="true" android:layout_alignParentRight="true" android:scaleType="fitXY" android:layout_alignParentTop="true" /&gt; &lt;/RelativeLayout&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    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.
    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