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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T14:34:09+00:00 2026-05-13T14:34:09+00:00

I am currently working on my first android app. In a listview, I need

  • 0

I am currently working on my first android app. In a listview, I need to have the following organisation in each row:

  • On the left: one main icon on which takes the whole height of the row
  • On the middle: 2 texts, one below the other
  • On the right: 2 icons, one below the other

I end up with a row.xml file like this, but that does not work as I expect.
Do you know if something obvious is missing in this file ?
Thanks a lot,
Luc

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="?android:attr/listPreferredItemHeight"
android:padding="6dip">
<ImageView
    android:id="@+id/icon"
    android:layout_width="48px"
    android:layout_height="48px"
    android:layout_marginRight="0dip"
    android:src="@drawable/icon" />
<LinearLayout
    android:orientation="vertical"
    android:layout_width="0dip"
    android:layout_weight="1"
    android:layout_height="wrap_content">
    <TextView
        android:id="@+id/title"
        android:layout_width="wrap_content"
        android:layout_height="0dp"
        android:layout_weight="1"
        android:textAppearance="?android:attr/textAppearanceLarge"
        android:textSize="16dp"
        android:textStyle="bold"
        android:text="TITLE"
        android:paddingLeft="5dp"
    />
    <TextView
        android:id="@+id/description"
        android:layout_width="wrap_content"
        android:layout_height="0dp"
        android:layout_weight="1"
        android:textAppearance="?android:attr/textAppearanceSmall"
        android:textSize="14dp"
        android:text="DESCRIPTION"
        android:paddingLeft="5dp"
    />
</LinearLayout>
<LinearLayout
    android:orientation="vertical"
    android:layout_weight="1"
    android:layout_height="wrap_content"
    android:layout_width="wrap_content"
    android:layout_gravity="right">
    <ImageButton
    android:id="@+id/button_modify"
    android:layout_width="16px"
    android:layout_height="16px"
    android:src="@drawable/deleteicon"
    />
    <ImageButton
    android:id="@+id/button_delete"
    android:layout_width="16px"
    android:layout_height="16px"
    android:src="@drawable/modifyicon"
    />
</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-05-13T14:34:09+00:00Added an answer on May 13, 2026 at 2:34 pm

    In the right-hand-column LinearLayout, add

    android:layout_width="wrap_content"
    android:gravity="right"
    

    That should make the icons should fall to the right (because of the gravity setting.)

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

Sidebar

Related Questions

I am currently working on my first website. I have no idea where to
I have just started working on my first Android application and am going ok.
I am currently working on my first asp.net mvc application. I am trying to
I am working on an Android app that utilizes the Google Maps API MapView,
I have just begun working with the Android SDK and I am having problems
I’m currently working on a Android project and is very newbie to the Android
I am working on a fairly basic screen layout for my first Android application
I have just started my career as an android programmer, and am currently relying
I currently working on an issue tracker for my company to help them keep
I am currently working on a project and my goal is to locate text

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.