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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T03:18:43+00:00 2026-06-08T03:18:43+00:00

I have a Button which is the handle for a SlidingDrawer. I have another

  • 0

I have a Button which is the handle for a SlidingDrawer. I have another button I want to be accessible on the same row as the SlidingDrawer button handle as well. This does not seem possible with a LinearLayout or a RelativeLayout, but I can get it working via a FrameLayout.

My issue is this: the handle button will only display itself in the center of the screen. I want each button to be on opposite sides of the screen (the button handle to be on the right, and the other button to be on the left). How can I move this FrameLayout-wrapped Button to the right of the screen? Everything is wrapped in a RelativeLayout, but I have not been able to achieve this button move yet.

Relevant Android XML layout code (once again, all wrapped in a RelativeLayout):

<Button android:id="@+id/EditListActivityButton"
android:text="@string/mappage_edititems"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toLeftOf="@+id/addItemSlidingDrawerHandle"
android:layout_above="@+id/item">
</Button>

<SlidingDrawer android:id="@+id/addItemSlidingDrawer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:handle="@+id/addItemSlidingDrawerHandle"
android:content="@+id/addItemSlidingDrawerContent"
android:layout_above="@+id/item"
android:layout_alignParentRight="true">

    <FrameLayout android:id="@id/addItemSlidingDrawerHandle"
    android:layout_width="wrap_content"
    android:layout_height="fill_parent"
    android:layout_toRightOf="@+id/goToEditListButton">

        <Button android:id="@+id/addItemSlidingDrawerHandleButton"
        android:text="@string/mappage_additem"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content">
        </Button>
    </FrameLayout>

    <LinearLayout android:id="@id/addItemSlidingDrawerContent"
    android:layout_height="fill_parent"
    android:layout_width="fill_parent"
    android:orientation="vertical"
    android:background="#96C120">

    <!-- sliding drawer content goes here -->

    </LinearLayout>

</SlidingDrawer>
  • 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-08T03:18:47+00:00Added an answer on June 8, 2026 at 3:18 am

    This may be late, but mi8 help some others since Me too needed it badly once

    I didnt use any layout around my handle button

    I just added

    android:padding='<3/4 th of ur display size>’

    in your slidingDrawer xml

    Example(just paste in a xml and run):

    <?xml version="1.0" encoding="utf-8"?>
    <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="fill_parent"
     android:layout_height="fill_parent">
    
     <ImageView 
      android:layout_width="fill_parent"
      android:layout_height="fill_parent" 
      android:src="@drawable/ic_launcher"/>
    
     <SlidingDrawer
      android:id="@+id/drawer"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:orientation="horizontal"
      android:handle="@+id/handle"
      android:content="@+id/content">
      <ImageView 
       android:id="@id/handle"
       android:layout_width="wrap_content"
       android:layout_height="fill_parent"
       android:paddingBottom="250dp"
       android:src="@drawable/ic_launcher"/>
      <LinearLayout
       android:id="@id/content"
       android:layout_width="fill_parent"
       android:layout_height="fill_parent"
       android:orientation="vertical"
       android:padding="10dp"
       android:background="#55000000">
       <Button
        android:layout_width="fill_parent"
        android:layout_height="wrap_content" 
        android:text=" - Button - "/>
       <Button
        android:layout_width="fill_parent"
        android:layout_height="wrap_content" 
        android:text=" - Button - "/>
       <Button
        android:layout_width="fill_parent"
        android:layout_height="wrap_content" 
        android:text=" - Button - "/>
       <Button
        android:layout_width="fill_parent"
        android:layout_height="wrap_content" 
        android:text=" - Button - "/>
       <Button
        android:layout_width="fill_parent"
        android:layout_height="wrap_content" 
        android:text=" - Button - "/>
       <Button
        android:layout_width="fill_parent"
        android:layout_height="wrap_content" 
        android:text=" - Button - "/>
      </LinearLayout>
     </SlidingDrawer>
    </FrameLayout>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this button which is not working correctly for hold button for a
I have a button which on Click loads another activity, but before it loads
I have a button which when toggled displays/hides a div ('.reportOptions'), this works perfectly
I have a vb.net application which does some processing. This processing can take a
I have in my window a button called btnExit which I handle its event.
I have listView in which I inflate a row contain textview and button now
I have a button on a form which I want to be disabled as
In a win32 application, I want to have a button with an icon which
I have a SlidingDrawer element which contains a RelativeLayout element which contains some Button
I have a pricetable plugin which opens the button links in the same window.

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.