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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T18:48:17+00:00 2026-05-25T18:48:17+00:00

I have the following XML layout: <LinearLayout android:id=@+id/map_locations_list android:layout_width=300dp android:layout_height=fill_parent android:layout_marginLeft=8dp android:layout_marginTop=8dp android:layout_marginBottom=8dp android:background=@color/black_shadow

  • 0

I have the following XML layout:

    <LinearLayout 
        android:id="@+id/map_locations_list"
        android:layout_width="300dp"
        android:layout_height="fill_parent"
        android:layout_marginLeft="8dp"
        android:layout_marginTop="8dp"
        android:layout_marginBottom="8dp"
        android:background="@color/black_shadow"
        android:layout_gravity="left">

            <LinearLayout
                android:layout_width="fill_parent"
                android:layout_height="fill_parent"
                android:orientation="vertical">
                <TextView
                    android:id="@+id/location_results_info"
                    android:layout_width="fill_parent"
                    android:layout_height="56dp"
                    android:background="@android:color/white"
                    android:text="Stuff goes here"
                    android:padding="10dp"
                />
                <ListView
                    android:id="@+id/locations_view"
                    android:layout_width="fill_parent"
                    android:layout_height="fill_parent"
                    android:layout_weight="1.0"
                />
                <TextView
                    android:layout_width="fill_parent"
                    android:layout_height="fill_parent"
                    android:text="this is a test" />
            </LinearLayout>
    </LinearLayout>

<fragment class="fragmentClass" 
    android:id="@+id/fragmentId" 
    android:layout_width="match_parent"
    android:layout_height="match_parent"/>      

And the following Java code to load the ListView:

String lv_arr[]={"Android","iPhone","BlackBerry","AndroidPeople"};  
ListView locationsLV = (ListView)findViewById(R.id.locations_view);
locationsLV.setAdapter(new ArrayAdapter<String>(this,android.R.layout.simple_list_item_1 , lv_arr));

The ListView does not get loaded with any values, but it also does not throw an exception. I’m not sure what I’m doing wrong. I used this example as a basis for my code: http://www.androidpeople.com/android-listview-example

  • 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-25T18:48:18+00:00Added an answer on May 25, 2026 at 6:48 pm

    Check this XML and try first and then add other components its may be overllapping of components………….

       <?xml version="1.0" encoding="utf-8"?>
        <LinearLayout android:id="@+id/locations_view"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        xmlns:android="http://schemas.android.com/apk/res/android">
        <ListView android:id="@+id/ListView01"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content" />
        </LinearLayout>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is maddening. I have the following XML layout: <FrameLayout android:layout_width=fill_parent android:layout_height=wrap_content android:background=@drawable/shadow android:focusable=true
hi i have the following xml layout <Button android:id=@+id/signupButton android:layout_gravity=left android:layout_width=100sp android:layout_height=wrap_content android:layout_marginLeft =
I have the following ImageView and TextView: Here is the XML: <LinearLayout android:layout_height=wrap_content android:layout_width=match_parent
I have the following XML layout for a ListActivity. <?xml version=1.0 encoding=utf-8?> <LinearLayout xmlns:android=http://schemas.android.com/apk/res/android
I have the following layout in place <?xml version=1.0 encoding=utf-8?> <LinearLayout xmlns:android=http://schemas.android.com/apk/res/android android:orientation=vertical android:layout_width=fill_parent
I have a listactivity with the following layout-xml <?xml version=1.0 encoding=utf-8?> <LinearLayout xmlns:android=http://schemas.android.com/apk/res/android android:layout_width=fill_parent
I have the following layout: <?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> <GridView android:id=@+id/grid
I have a very simple Android activity layout like this: <?xml version=1.0 encoding=utf-8?> <LinearLayout
I have the following XML layout in my android application, using ScrollView: <?xml version=1.0
I have following in xml I wanna put the second linear layout at the

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.