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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T23:44:51+00:00 2026-06-02T23:44:51+00:00

I am trying to add two buttons to my relativelayout that includes a listview

  • 0

I am trying to add two buttons to my relativelayout that includes a listview

i can only get one to show up.

I want them to be at the top of my listview kinda like tabs..

http://m4x.co/orig.jpg

http://m4x.co/new.jpg

the first image is what it looks like, the 2nd is something similar to what i want.

i would of posted here but “We’re sorry, but as a spam prevention mechanism, new users aren’t allowed to post images. Earn more than 10 reputation to post images.”

    <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content" 
android:layout_height="wrap_content"
android:orientation="vertical"
android:background="#FFFFFF"


>

<Button android:id="@+id/plus"
android:background="@drawable/selector"
android:layout_width="75dip"
android:layout_height="75dip"
android:layout_alignParentBottom="true"

/>
<Button android:id="@+id/main2"
     android:layout_height="20dp" 
     android:layout_width="40dp" 
     android:hint="Notes"
     android:background="#FFFFFF"
     android:layout_above="@+id/list"
     >

</Button>
<Button android:id="@+id/main3"

     android:layout_height="20dp" 
     android:layout_width="40dp" 
     android:hint="Titles"
     android:background="#FFFFFF"
          android:layout_above="@+id/list">

</Button>
<ListView 
    android:layout_marginTop="70dp" 
    android:id="@android:id/list" 
    android:layout_width="fill_parent"
    android:layout_height="wrap_content" 
      android:layout_above="@+id/plus"
      android:smoothScrollbar="true"
      android:background="#FFFFFF" android:cacheColorHint="#FFFFFF"
  android:fastScrollEnabled="true" android:clickable="true"
  android:layout_marginBottom="10dp" 
          android:divider="#000000"
    android:dividerHeight="1px"
>

</ListView>



<TextView android:id="@android:id/empty" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:text="@string/noQ" 


 />


    </RelativeLayout>
  • 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-02T23:44:53+00:00Added an answer on June 2, 2026 at 11:44 pm

    I think this is about what you are looking for:

    <?xml version="1.0" encoding="utf-8"?>
        <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:background="#000000"
            android:orientation="vertical" >
    
            <Button
                android:id="@+id/plus"
                android:background="@drawable/selector"
                android:layout_width="75dip"
                android:layout_height="75dip"
                android:layout_alignParentBottom="true" />
    
            <ListView
                android:id="@android:id/list"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_above="@+id/plus"
                android:layout_marginBottom="10dp"
                android:layout_marginTop="70dp"
                android:background="#FFFFFF"
                android:cacheColorHint="#FFFFFF"
                android:clickable="true"
                android:divider="#000000"
                android:dividerHeight="1px"
                android:fastScrollEnabled="true"
                android:smoothScrollbar="true" >
            </ListView>
    
            <Button
                android:id="@+id/main3"
                android:layout_width="40dp"
                android:layout_height="20dp"
                android:layout_alignParentTop="true"
                android:background="#FFFFFF"
                android:hint="Titles" />
    
            <Button
                android:id="@+id/main2"
                android:layout_width="40dp"
                android:layout_height="20dp"
                android:layout_alignParentTop="true"
                android:layout_marginLeft="16dp"
                android:layout_toRightOf="@+id/main3"
                android:background="#FFFFFF"
                android:hint="Notes" />
    
            <TextView
                android:id="@android:id/empty"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_below="@+id/main2"
                android:layout_centerHorizontal="true"
                android:layout_marginTop="20dp"
                android:text="@string/noQ" />
    
        </RelativeLayout>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to do this List<String> stringList = new ArrayList<String>(); stringList.add(one); stringList.add(two); stringList.add(three);
I have to add one text view and two radio buttons in the scroll
I am trying to add two right buttons to the navigation bar. I tried
I'm trying to add two buttons to each cell in a tableview, but when
I am basically trying to add two view controllers to one controller. I created
in my app i am trying to show two buttons and an a title
I'm trying to add two folders to my eclipse project's classpath, let's say Folder
I'm trying to add two inputs to a QTCaptureSession in the following: mainSession =
I am trying to add two larger binary numbers (i.e. number of bits are
I am trying to add two values in a byte array. This is my

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.