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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T23:11:37+00:00 2026-05-22T23:11:37+00:00

In my app there is a list view with following controls (imageview, textviews, image

  • 0

In my app there is a list view with following controls (imageview, textviews, image buttons) nested:

enter image description here

all they are displayed except the “Buy” image button

enter image description here

How to show the “Buy” image button in the list view?
I also could not write an action for play and detail image buttons in the list view. Please help me.

my xml is as follows:

<?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"
   android:layout_height="fill_parent"  android:background="#ffffff">
     <ListView android:id="@+id/list" android:layout_width="1px"
    android:layout_height="1px" android:layout_weight="1">
     </ListView>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="horizontal" android:layout_width="fill_parent"
    android:layout_height="fill_parent" android:background="#ffffff">   

        <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
            android:orientation="horizontal" android:layout_width="wrap_content"
            android:layout_height="wrap_content">   
               <ImageView android:id="@+id/img" android:layout_width="60dp"
                  android:layout_height="60dp" />
        </LinearLayout> 

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

            <TextView android:layout_width="wrap_content" android:text="fffff"                
                android:id="@+id/title" android:singleLine="false"   android:layout_marginRight="20dp"  android:layout_marginLeft="20dp"
                android:layout_height="wrap_content" android:textStyle="bold" />

            <TextView  android:layout_width="wrap_content"  android:text="dskbdskkdsvsvsvvvfff"
                       android:layout_height="wrap_content"  android:layout_marginRight="20dp" android:layout_marginLeft="20dp"
                       android:id="@+id/title2"/>            
            <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
               android:orientation="horizontal" android:layout_marginLeft="50dp"
               android:layout_width="fill_parent" android:layout_height="fill_parent">
            <ImageButton android:background="@drawable/play_btn"
                android:layout_width="wrap_content" android:layout_height="wrap_content"
                android:id="@+id/imageButton1">
            </ImageButton>
            <ImageButton android:background="@drawable/details_btn"
                android:layout_width="wrap_content" android:layout_height="wrap_content"
                android:layout_marginLeft="25dp" android:id="@+id/imageButton2">
            </ImageButton>
        </LinearLayout>            
        </LinearLayout> 
        <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
                 android:orientation="horizontal" android:layout_width="wrap_content" 
                 android:layout_height="wrap_content" android:gravity="left">
                   <ImageButton android:background="@drawable/buy_btn"
                      android:layout_width="wrap_content" android:layout_height="wrap_content"
                      android:id="@+id/imageButton3">
                   </ImageButton>
           </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-05-22T23:11:37+00:00Added an answer on May 22, 2026 at 11:11 pm

    Try out with this and see. I have modified your xml. Drawables please change. I have used the default icon.png as of now. Then as per your any further requirement change the file. RelativeLayout is the easiest way for us to place widgets. So try using that.

    <?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="100dp"
        android:background="#ffffff">
    
        <ImageView android:id="@+id/img" android:layout_width="60dp"
            android:background="@drawable/icon" android:layout_height="fill_parent"
            android:layout_centerVertical="true" />
    
        <LinearLayout android:orientation="vertical"
            android:layout_toRightOf="@+id/img" android:layout_width="200dp"
            android:layout_height="wrap_content" android:id="@+id/textLL"
            android:layout_marginLeft="10dp">
    
            <TextView android:layout_width="wrap_content" android:text="fffff"
                android:id="@+id/title" android:layout_height="wrap_content"
                android:textStyle="bold" />
    
            <TextView android:layout_width="wrap_content"
                android:text="dskbdskkdsvsvsvvvfff dfsdfg sdrfsdgfsdf dfsdfdsf dsgfsdfgg"
                android:layout_height="wrap_content" android:id="@+id/title2" />
    
            <LinearLayout android:orientation="horizontal"
                android:layout_gravity="center_horizontal" android:layout_width="wrap_content"
                android:layout_height="wrap_content">
    
                <ImageButton android:background="@drawable/icon"
                    android:layout_width="wrap_content" android:layout_height="wrap_content"
                    android:id="@+id/imageButton2" android:layout_weight="0.5" />
    
                <ImageButton android:background="@drawable/icon"
                    android:layout_width="wrap_content" android:layout_height="wrap_content"
                    android:id="@+id/imageButton3" android:layout_weight="0.5" />
    
            </LinearLayout>
    
        </LinearLayout>
    
        <ImageButton android:background="@drawable/icon"
            android:layout_width="wrap_content" android:layout_height="fill_parent"
            android:id="@+id/imageButton1" android:layout_toRightOf="@+id/textLL" />
    
    </RelativeLayout>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a good Django app out there that can take a list of
In my app there is requirement that..I have 6 buttons in a nib, when
When hosting WPF user controls within a WinForms MDI app there is a drawing
I got a tricky problem here: in my app, there's a list (using a
in my app i am using a list view. The data which i want
Am following the tutorial here on creating a simple todo list app: http://www.mydroid.apnafundaz.com/2010/07/todolist-application-in-android-step-by-step-guide-with-screen-shots/ Have
There is one win forms application with some list view items. I'd like to
In my cocoa app there is a NSTableView(10.7 lion view based tableview) only contains
In my app I'm using base adapter to display continents on list view.I want
I'm coding an app that works much like Apple's Weather.app: There's a UIPageControl at

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.