Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6663091
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T02:27:41+00:00 2026-05-26T02:27:41+00:00

I am going crazy here. I swear I’ve had this work a thousand times

  • 0

I am going crazy here. I swear I’ve had this work a thousand times before and it’s like nothing is behaving correctly now. I have to be doing something stupid. A few days ago I was having issues with the background on a list view item not filling the parent to stretch across the height of the list view item. I finally gave up and just hardcoded a height for both to fix that. Now I’m just trying to set a background of an entire activity and have it fill it’s parent so that the image covers the entire screen. This activity is within a tab. Here is the code for the tab controller and the activity I’m having issues with.

Tab Layout:

<?xml version="1.0" encoding="utf-8"?>
<TabHost 
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/tabhost"
android:layout_width="fill_parent"
android:layout_height="fill_parent">

<LinearLayout
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:padding="5dp">

    <TabWidget
        android:id="@android:id/tabs"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"/>

        <FrameLayout
            android:id="@android:id/tabcontent"            
            android:layout_width="fill_parent"            
            android:layout_height="fill_parent">

        </FrameLayout>
</LinearLayout>
</TabHost>

Troublesome Activity:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/background">

<RelativeLayout
    android:id="@+id/localHeader"
    android:layout_width="fill_parent"
    android:layout_height="50dip"
    android:background="@drawable/header2">

    <Button
        android:id="@+id/changeCityButton"
        android:layout_width="80dip"
        android:layout_height="30dip"
        android:layout_marginRight="10dip"
        android:layout_alignParentRight="true"
        android:layout_centerVertical="true"
        android:onClick="buttonChangeOnClickListener"
        android:text="Change"
        android:textColor="#FFFFFF"
        android:background="@drawable/local_deal_redeem_button" />

    <TextView
        android:id="@+id/cityName"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginLeft="10dip"
        android:layout_centerVertical="true"
        android:layout_alignParentLeft="true"
        android:layout_toLeftOf="@id/changeCityButton"
        android:textSize="20dip"
        android:textColor="#FFFFFF"
        android:textStyle="bold"
        android:shadowColor="#FF000000"
        android:shadowDx="1"
        android:shadowDy="1"
        android:shadowRadius="1"/>

</RelativeLayout>

<ListView
    android:id="@android:id/list"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:layout_below="@id/localHeader"
    android:fastScrollEnabled="true"
    android:cacheColorHint="#00000000"
    android:divider="@null"
    android:dividerHeight="0px"/>

</RelativeLayout>

This issue appears to only be happening on the new Bionic. the “@drawable/background” will only stretch as high as the listview is long. And if there are no items in the listview it will not show anything. I’ve even tried ripping it out of the layout and making it just an imageview and that didn’t work either. It’s like there is a wrap_content tag somewhere that I’m missing. Normally I would just say this is something screwey with the Bionic but seeing as how I had those issues with the ListView background I’m thinking I’ve got something messed up somewhere. Please help!!

Also in my manifest:

<supports-screens android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:resizeable="true" android:anyDensity="true"></supports-screens>

But I’ve tried removing that and no matter what values I put in that line it doesn’t do anything in my app.

EDIT: I’ve just realized that if I put the image into a “fill_parent” scrollview the background will stretch accordingly. However since the screen contains a ListView, I cannot go this route. Something is wacky here.

EDIT 2: I just ripped out the listview and it worked perfectly. It is somehow related to the listview.

EDIT 3: I just solved the issue by setting ListView height to “wrap_content”. I have no idea why “fill_parent” was causing this behavior on this device, but it is fixed so all is well now. I can’t self-answer for another 6 hours so if someone wants to put this as an answer I will select it as correct. Thanks everyone!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T02:27:41+00:00Added an answer on May 26, 2026 at 2:27 am

    I resolved it by setting ListView height to wrap_content. I have no idea why fill_parent was causing this behavior on this phone, but it is now correctly functioning so all is well. Thanks everyone!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

OK, I'm going crazy here! Why won't this work!! I'm trying to add a
I am going a tad crazy here. I keep getting this error: ImportError: No
I'm going crazy function module_form_alter(&$form, $form_state, $form_id) { // Nothing here $var = 'bla-bla';
Possible Duplicate: Going crazy here, can't figure out why rename(), copy() functions don't work.
Why does this give me parse error? going crazy over here.. I have this
I'm seriously going crazy with this. Here is what is in my Global.asax routes.MapRoute(BlogDetails,
I think i'm going crazy, as this seems like an incredibly easy issue to
I am going crazy now. Googled this, thought some kind of IDE bug. Maybe
It's late at night here and I'm going crazy trying to solve a linker
I'm going crazy trying to echo an <img> tag. I want to add this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.