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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T19:15:25+00:00 2026-06-07T19:15:25+00:00

I have the following XML code for my cells (search_cell.xml) : <LinearLayout xmlns:android=http://schemas.android.com/apk/res/android android:layout_width=fill_parent

  • 0

I have the following XML code for my cells (search_cell.xml) :

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="50dp"
    android:orientation="vertical"
    android:paddingLeft="15dp"
    android:paddingTop="3dp"
    android:background="@color/white"
    >

   <TextView android:id="@+id/libelle"
             android:layout_width="fill_parent"
             android:layout_height="fill_parent"
             android:textSize="16dp"
             android:textStyle="bold"
             />

    <TextView android:id="@+id/valeur"
             android:layout_width="fill_parent"
             android:layout_height="fill_parent"
             android:textSize="10dp"
             android:textStyle="normal"
             />

</LinearLayout>

In my activity xml file :

<ListView
    android:id="@+id/listRecherche"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginTop="150dp" >
</ListView>

And in Java :

list = (ListView) findViewById(R.id.listRecherche);

    ArrayList<HashMap<String, String>> listItem = new ArrayList<HashMap<String, String>>();
    HashMap<String, String> map = new HashMap<String, String>();

    map.put("libelle", "Microsoft");
    map.put("valeur", "1975");
    listItem.add(map);

    map = new HashMap<String, String>();
    map.put("libelle", "Apple");
    map.put("valeur", "1976");
    listItem.add(map);

    map = new HashMap<String, String>();
    map.put("libelle", "Dell");
    map.put("valeur", "1984");
    listItem.add(map);

    SimpleAdapter mSchedule = new SimpleAdapter (this.getBaseContext(), listItem, R.layout.recherche_cell,
            new String[] {"libelle", "valeur"}, new int[] {R.id.libelle, R.id.valeur});

    list.setAdapter(mSchedule);

And here is what I get. Why can’t I see the year fields ?

enter image description here

Thanks a lot for your help.

  • 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-07T19:15:28+00:00Added an answer on June 7, 2026 at 7:15 pm

    try this new search_cell.xml

        <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="fill_parent"
        android:layout_height="50dp"
        android:orientation="vertical"
        android:paddingLeft="15dp"
        android:paddingTop="3dp"
        android:background="@color/white"
        >
    
       <TextView android:id="@+id/libelle"
                 android:layout_width="fill_parent"
                 android:layout_height="wrap_content"
                 android:textSize="16dp"
                 android:textStyle="bold"
                 />
    
        <TextView android:id="@+id/valeur"
                 android:layout_width="fill_parent"
                 android:layout_height="wrap_content"
                 android:textSize="10dp"
                 android:textStyle="normal"
                 />
    
    </LinearLayout>
    

    you used fill_parent for the first textview height parameter. so this fills the entire parent. so, i changed the eight parameter to ‘wrap_content’

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

Sidebar

Related Questions

I have the following xml object representing a ImageButton <?xml version=1.0 encoding=utf-8?> <ImageButton xmlns:android=http://schemas.android.com/apk/res/android
I have the following .xsd code: <?xml version=1.0 encoding=UTF-8?> <xs:schema xmlns:xs=http://www.w3.org/2001/XMLSchema id=MyDataSet> <xs:element name=Row>
I have the following code: $page=3; $i=1; while($i<=$pages) { $urls .= '.http://twitter.com/favorites.xml?page= . $i
I'm very new to Android and I have the following layout xml code: <?xml
Learning xml, Can anyone help me? I have following XML code: **<book lang=en>name of
I have the following XML code. You will notice the tag Description is repeated,
I have following code for loading image from url in xml parsing endElement method
I have following code: //preparing DAO objects FileSystemXmlApplicationContext context = new FileSystemXmlApplicationContext(test-context.xml); surveyDao =
friends, i have created custom title bar using following titlebar.xml file with code <?xml
I have the following code in a drawable bitmap xml file. And the background

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.