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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T17:23:16+00:00 2026-05-16T17:23:16+00:00

I’m currently having trouble with a SlidingDrawer. I want it to be closed when

  • 0

I’m currently having trouble with a SlidingDrawer. I want it to be closed when the application starts so it doesn’t get in the way. However, it is determined that it will be open, despite putting slide.close() in the onCreate() of my activity. It seems to be closed if i use slide.animateClose() instead, but this slows my application down loads.

How do I make it closed by default?

Cheers

    <SlidingDrawer 
    android:layout_width="fill_parent" 
    android:padding="4dp" 
    android:id="@+id/Mnu_Slide" 
    android:content="@+id/Mnu_SlideCont" 
    android:handle="@+id/Mnu_SlideBtn" 
    android:layout_gravity="bottom" 
    android:layout_height="112dp">
    <ImageView 
        android:id="@id/Mnu_SlideBtn" 
        android:src="@drawable/handle1" 
        android:layout_height="wrap_content" 
        android:layout_width="wrap_content" />
    <LinearLayout 
        android:id="@id/Mnu_SlideCont" 
        android:layout_height="wrap_content" 
        android:layout_width="fill_parent" 
        android:orientation="horizontal" 
        android:gravity="center_vertical|center_horizontal" android:background="@drawable/tray1xml">
            <ImageView 
                android:id="@+id/Mnu_Chem" 
                android:layout_width="wrap_content" 
                android:layout_height="wrap_content" 
                android:src="@drawable/icon" />
            <ImageView 
                android:id="@+id/Mnu_Physics" 
                android:layout_width="wrap_content" 
                android:layout_height="wrap_content" 
                android:src="@drawable/physicon" />
    </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-05-16T17:23:17+00:00Added an answer on May 16, 2026 at 5:23 pm

    I can’t see anything obviously wrong with that. It looks very similar to my own SlidingDrawer code (which I’ve included in this question) and that always starts closed, with no need to close it explicitly in the onCreate() method.

    I suspect it might have something to do with whatever this view is lodged inside: is it by any chance in a LinearLayout? Try changing it to a RelativeLayout instead. The docs for SlidingDrawer are a bit vague but they do say:

    SlidingDrawer should be used as an
    overlay inside layouts. This means
    SlidingDrawer should only be used
    inside of a FrameLayout or a
    RelativeLayout for instance.

    Hope that helps.

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want use html5's new tag to play a wav file (currently only supported
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm having trouble keeping the paragraph square between the quote marks. In firefox the
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I want to count how many characters a certain string has in PHP, but
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
I am doing a simple coin flipping experiment for class that involves flipping a

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.