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

  • Home
  • SEARCH
  • 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 8284895
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T11:16:43+00:00 2026-06-08T11:16:43+00:00

Pretty simple problem but I just can’t seem to configure this correctly. I would

  • 0

Pretty simple problem but I just can’t seem to configure this correctly.

I would a ListVieww aligned right taking up 100dp of layout_width, whilst a MapControl takes up the remaining space. (I’d rather it take up remaining space to take advantage of the phone being put in a horizontal position.

Here’s what I have at the moment.

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical" >


             <LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:orientation="vertical"
        android:layout_gravity="left" >


                 <com.google.android.maps.MapView
                 android:id="@+id/gmap"
                 android:layout_width="fill_parent"
                 android:layout_height="fill_parent"
                 android:clickable="true"
                 android:layout_gravity="left"
                 />
                 </LinearLayout>

        <LinearLayout 
        android:id="@+id/maplst"
        android:layout_width="100dp"
        android:layout_gravity="right"
        android:layout_height="fill_parent"
        android:orientation="vertical" > 

        <ListView
        android:id="@+id/listView1"
        android:layout_width="118dp"
        style="@style/listViewStyle"
        android:layout_height="wrap_content" android:layout_gravity="right">
    </ListView>
    </LinearLayout>  


</LinearLayout>
  • 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-08T11:16:45+00:00Added an answer on June 8, 2026 at 11:16 am

    I think you don’t need all these layouts (optimization point). To take the remaining space, use layout_width="0dp" with a layout_weight="1".

    This should be want you want:

    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:orientation="horizontal" >
    
         <com.google.android.maps.MapView
                     android:id="@+id/gmap"
                     android:layout_width="0dp"
                     android:layout_weight="1"
                     android:layout_height="fill_parent"
                     android:clickable="true"
                     />
    
          <ListView
                 android:id="@+id/listView1"
                 android:layout_width="100dp"
                 style="@style/listViewStyle"
                 android:layout_height="wrap_content">
           </ListView>
    
    
    </LinearLayout>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a pretty simple problem, but right now can't seem to see the
My problem is pretty simple, but I just can't solve it by myself. Does
So I'm having this problem, it should be pretty simple, but I don't know
this should be really simple but I can just not figure it out at
I have a pretty simple general programming problem, yet I can't quite get the
simple problem, but perhaps no simple solution, at least I can't think of one
I've been stuck on this likely very simple problem, but haven't gotten anywhere with
I have a pretty simple problem. Basically I have an array called $list that
I'm having a problem with a pretty simple setup in NHibernate. (I'm using Fluent
The problem is that, shaders (pretty simple ones, as I'm learning OpenGL) fail to

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.