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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T19:30:03+00:00 2026-06-15T19:30:03+00:00

When i made two sliding Drawer Onw Drawer is functional but other is not

  • 0

When i made two sliding Drawer Onw Drawer is functional but other is not
What i have done is

<?xml version="1.0" encoding="utf-8"?>

    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:background="#FCFCFC" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal"
    android:layout_marginBottom="5px">
    <LinearLayout android:id="@+id/LinearLayout01"
    android:layout_width="fill_parent" android:layout_height="wrap_content"
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="horizontal" android:layout_gravity="left" >
        <SlidingDrawer     android:layout_gravity="left"
        android:orientation="horizontal" android:layout_width="wrap_content"   android:id="@+id/SlidingDrawer" android:handle="@+id/slideHandleButton" android:content="@+id/contentLayout" android:padding="10dip" android:layout_height="60dip">
            <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/slideHandleButton" android:background="@drawable/projectmain"></Button>
                <LinearLayout android:layout_width="wrap_content" android:id="@+id/contentLayout" android:orientation="horizontal" android:gravity="center" android:padding="10dip" android:background="@drawable/selector" android:layout_height="wrap_content">
                    <TextView android:background="@drawable/selector" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="#FFFFFF" android:textStyle="bold" android:textSize="16sp" android:text="Unlock" android:gravity="center" />
                </LinearLayout>
        </SlidingDrawer>
    </LinearLayout>
    </LinearLayout>

    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:background="#FCFCFC"
    android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal"
    android:layout_marginBottom="5px">
    <LinearLayout android:id="@+id/LinearLayout01"
    android:layout_width="fill_parent" android:layout_height="wrap_content"
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="horizontal" android:layout_gravity="left" >
        <SlidingDrawer     android:layout_gravity="left"
        android:orientation="horizontal" android:layout_width="wrap_content"   android:id="@+id/SlidingDrawer1" android:handle="@+id/slideHandleButton1" android:content="@+id/contentLayout" android:padding="10dip" android:layout_height="60dip">
            <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/slideHandleButton1" android:background="@drawable/propertymain"></Button>
                <LinearLayout android:layout_width="wrap_content" android:id="@+id/contentLayout" android:orientation="horizontal" android:gravity="center" android:padding="10dip" android:background="@drawable/selector" android:layout_height="wrap_content">
                    <TextView android:background="@drawable/selector" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="#FFFFFF" android:textStyle="bold" android:textSize="16sp" android:text="Unlock" android:gravity="center" />
                </LinearLayout>
        </SlidingDrawer>
    </LinearLayout>

What i have done on Java in is

I have opened both the drawer
like

setContentView(R.layout.main);

            slideHandleButton = (Button) findViewById(R.id.slideHandleButton);
             slidingDrawer = (SlidingDrawer) findViewById(R.id.SlidingDrawer);
                slideHandleButton1 = (Button) findViewById(R.id.slideHandleButton);
                 slidingDrawer1 = (SlidingDrawer) findViewById(R.id.SlidingDrawer);


                   slidingDrawer.setOnDrawerOpenListener(new OnDrawerOpenListener() {

                    @Override
                    public void onDrawerOpened() {
                        Intent intent=new Intent(CurrentActivity.this,New Activity.class);
                        startActivity(intent);
                    }
                    });

                    slidingDrawer.setOnDrawerCloseListener(new OnDrawerCloseListener() {

                    @Override
                    public void onDrawerClosed() {
                    }
                    });



                    slidingDrawer1.setOnDrawerOpenListener(new OnDrawerOpenListener() {

                        @Override
                        public void onDrawerOpened() {
                            Intent intent=new Intent(CurrentActivity.this,NewActivity.class);
                            startActivity(intent);
                        }
                        });

                    slidingDrawer1.setOnDrawerCloseListener(new OnDrawerCloseListener() {

                        @Override
                        public void onDrawerClosed() {
                        }
                        });

But Sliding Drawer 2nd is not working Please Help
Thanks in advance !!

  • 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-15T19:30:04+00:00Added an answer on June 15, 2026 at 7:30 pm

    Change this

    slidingDrawer1 = (SlidingDrawer) findViewById(R.id.SlidingDrawer);
    

    to

     slidingDrawer1 = (SlidingDrawer) findViewById(R.id.SlidingDrawer1);
    

    Looks like you have provided the same id to both the elements.

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

Sidebar

Related Questions

I have made two versions of my application, a large version, and a mini/lite
I have made two templates(change passwd, change passwd done). And, I tried to changepassword.
I have made two targets in my project. One for a Staging version and
I made two classes in which one is main and other one is a
I have made two thread running together with Netbeans and i want to add
When I made two soft links in a directory pointing to each other eg.
I currently have a Rails 3.0.10 app and I made two models with simple
I have made two kernel modules for client and server which are transmitting the
I am implementing AVAudioPlayer and fast-rewind,fast-forward functionality. I have made two button with gesture,
I am using SOLR 3.5.0..!! I have made two Indexes : Cars and Vendors

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.