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 8064687
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T11:26:46+00:00 2026-06-05T11:26:46+00:00

I am having trouble getting a RelativeLayout to work within a ListView. If I

  • 0

I am having trouble getting a RelativeLayout to work within a ListView. If I change the layout to linear etc. I see it behave as I would expect but the RelativeLayout is scrunching everything up into overlapping space. Now my uneducated guess is that it is trying to cram everything into on row. I thought it would expand that row but perhaps not or that is not the problem.

Note my code has been abbreviated for space.

Anyway in my Parent XML:

<LinearLayout ..._width="fill_parent" ..._height="fill_parent" ...orientation="vertical" >
    <ListView ...layout_width="fill_parent" ...layout_height="fill_parent" />
</LinearLayout>

So my thought was that this would fill the device screen and in the GraphicalLayout view in Eclipse it appears that it does.

My "row" definition for the ListView is this:

<RelativeLayout width="fill_parent" height="fill_parent" >

    <ImageView
       android:layout_width="60dp"
        android:layout_height="30dp"
        android:layout_alignParentLeft="true"
        android:layout_marginTop="15dp"
        android:layout_marginLeft="5dp" />
      .....
</RelativeLayout>

As mentioned I thought this would fill all available space but it seems to only fill some sort of "default" row height?

What am I missing?

  • 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-06-05T11:26:47+00:00Added an answer on June 5, 2026 at 11:26 am

    I ended up overriding the getView of the ArrayAdapter and then setting the height and width to the dynamically determined screen size

    …snip….

    int[] iarry_ScrnDim = new int[2];
    
    DisplayMetrics metrics = new DisplayMetrics();
    metrics = ctx_Currnt.getResources().getDisplayMetrics();
    
    iarry_ScrnDim[0] = metrics.heightPixels;
    iarry_ScrnDim[1] = metrics.widthPixels;
    
    return iarry_ScrnDim;
    

    ….snip….

    if (vw_BigRow == null)
    {
        LayoutInflater inflater = (LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
        vw_BigRow = inflater.inflate(R.layout.liftdatalayout, null);
    }
    
    vw_BigRow.setMinimumHeight(mHeight);
    vw_BigRow.setMinimumWidth(mWidth);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having trouble getting the following three-column layout to work: A B C +-------+-------------------+------------+
I am having trouble getting this to work so any help would be appreciated!
I am having trouble getting routing to work on mono. The default route works
I'm having trouble getting my table to behave. The content keeps overflowing and my
I am having trouble getting a thread to work with OpenCV . The problem
Having trouble getting this to work. What's strange is that I have 10 bookmarks
I having trouble getting append() to work in safari for some reason, but it
I am having trouble getting the font I would like to use, Chalkboard, to
I'm having trouble getting Jquery .closest() to work. Here's my code, it's simple and
Im having trouble getting a function within a function working, do you think what

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.