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 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'm working on my first android app and have an SQLite database set up
I'm a noob working on my first app that consists of the following: Main
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'm currently working on my fist app for android phones and I want to
I am currently working on Android I have a xml which is like this:
Currently I'm working on an app for Android phones. We want to detect features
I am working on my first Android application, and I have run into a
I am working on a android app and I have an EditText where user
I'm currently working on an Android app that automatically changes the phones state based

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.