Note that there are some explanatory texts on larger screens.

plurals
  1. POThumbnail does not fill_parent as expected
    primarykey
    data
    text
    <p>I'm attempting to get my thumbnail (userVideoThumbImageView) to extend to the edge of the screen but it does not seem to do so. I have the width set to fill_parent so I'm not sure why it isn't doing so:</p> <h2>Screenshot:</h2> <p><a href="http://www.flickr.com/photos/110503723@N07/11207214295" rel="nofollow">http://www.flickr.com/photos/110503723@N07/11207214295</a></p> <h2>list_item_user_video.xml:</h2> <pre><code> &lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:gravity="center_vertical" android:orientation="vertical" &gt; &lt;com.blundell.tut.ui.widget.UrlImageView android:id="@+id/userVideoThumbImageView" android:layout_width="fill_parent" android:layout_height="fill_parent" android:scaleType="fitCenter" android:contentDescription="YouTube video thumbnail" android:src="@drawable/ic_launcher" /&gt; &lt;TextView android:id="@+id/userVideoTitleTextView" android:layout_width="fill_parent" android:layout_height="wrap_content" android:textColor="@android:color/black" android:text="Video Title Not Found" /&gt; &lt;/LinearLayout&gt; </code></pre> <h2>activity_main.xml:</h2> <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:background="@android:color/white" android:orientation="vertical" &gt; &lt;com.blundell.tut.ui.widget.VideosListView android:id="@+id/videosListView" android:layout_width="fill_parent" android:layout_height="wrap_content" /&gt; &lt;RelativeLayout android:id="@+id/footer" android:layout_width="fill_parent" android:layout_height="70dip" android:layout_alignParentBottom="true" &gt; &lt;HorizontalScrollView android:id="@+id/groupScrollView" android:layout_width="fill_parent" android:layout_height="match_parent" &gt; &lt;/HorizontalScrollView&gt; &lt;ImageButton android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:src="@drawable/scroll_lt_arrow" /&gt; &lt;ImageButton android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" android:src="@drawable/scroll_rt_arrow" /&gt; &lt;android.support.v4.view.ViewPager android:id="@+id/view_pager" android:layout_width="match_parent" android:layout_height="match_parent" /&gt; &lt;/RelativeLayout&gt; &lt;/RelativeLayout&gt; </code></pre> <h2>JAVA:</h2> <pre><code>@Override public View getView(int position, View convertView, ViewGroup parent) { // If convertView wasn't null it means we have already set it to our list_item_user_video so no need to do it again if(convertView == null){ // This is the layout we are using for each row in our list // anything you declare in this layout can then be referenced below convertView = mInflater.inflate(R.layout.list_item_user_video, parent, false); resolved the issue! } // We are using a custom imageview so that we can load images using urls // For further explanation see: http://blog.blundell-apps.com/imageview-with-loading-spinner/ UrlImageView thumb = (UrlImageView) convertView.findViewById(R.id.userVideoThumbImageView); TextView title = (TextView) convertView.findViewById(R.id.userVideoTitleTextView); // Get a single video from our list final Video video = videos.get(position); // Set the image for the list item thumb.setImageDrawable(video.getThumbUrl()); // Set the title for the list item title.setText(video.getTitle()); return convertView; } </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.
 

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