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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T12:31:36+00:00 2026-05-20T12:31:36+00:00

I created a RelativeLayout containing an ImageView and a SlidingDrawer. I set an onClickListener

  • 0

I created a RelativeLayout containing an ImageView and a SlidingDrawer. I set an onClickListener on the ImageView and another one on the content part of the SlidingDrawer. When the SlidingDrawer is open and I click on its content part, the onClick event of the ImageView is triggered.

Why? Isn’t the SlidingDrawer above the ImageView?

Thanks

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

    <ImageView
        android:id="@+id/whip"
        android:layout_width="fill_parent" 
        android:layout_height="fill_parent" />  

    <SlidingDrawer
         android:id="@+id/drawer"
         android:layout_width="wrap_content"
         android:layout_height="53dp"
         android:layout_alignParentBottom="true"
         android:orientation="horizontal"

         android:handle="@+id/facebook_icon"
         android:content="@+id/facebook_contacts">

         <ImageView
             android:id="@+id/facebook_icon"
             android:layout_width="55dp"
             android:layout_height="53dp"         
             android:src="@drawable/facebook_handler_off" />

         <ImageView android:id="@+id/facebook_contacts"
                android:layout_width="265dp"
                android:layout_height="53dp"                
                android:src="@drawable/facebook_content" /> 

    </SlidingDrawer>

</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-05-20T12:31:37+00:00Added an answer on May 20, 2026 at 12:31 pm

    Try to intercept the mouse evensts with the implementation of
    boolean onInterceptTouchEvent(MotionEvent event)

    Giving to the doc, this method “intercept all touch screen motion events”.

    You return true if you want to treat the specific MotionEvent (giving in parameters) with the SlidingDrawer.

    Look the onTouchEvent(MotionEvent event) too 🙂

    http://developer.android.com/reference/android/widget/SlidingDrawer.html#onInterceptTouchEvent(android.view.MotionEvent)

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

Sidebar

Related Questions

I have extended a RelativeLayout with all its constructor.And I have created a layout
Created an OpenGraph action and object. Trying to submit my action. When I click
I created a project in flex builder with application server type set to none.
I created a web control, and it needs some data from its parent page.
I created a field of buttons in my XML file: <RelativeLayout...> <Button android:id=@+id/button_1 ...
I have created one gridview and use custom adapter for that. I added two
Take the following code: ImageView imageView = new ImageView(activity); imageView.setLayoutParams(new RelativeLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT)); Running this
I created a class that extends RelativeLayout. I also created a xml layout file.
I have created my own button which inherits android's RelativeLayout. My question is how
Hi I have created a relative layout. and align the imageview to the right

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.