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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T07:24:13+00:00 2026-06-02T07:24:13+00:00

I have a large custom ImageView with regions defined as hotspots. When a user

  • 0

I have a large custom ImageView with regions defined as hotspots. When a user touches a hotspot on the image, I want to present them with a list of options appropriate for the selected hotspot. To maximize the space available for the image, I’m presenting the options in a SlidingDrawer.

As soon as I touch a hotspot, the area that would be covered by the sliding drawer stops producing OnTouchEvent callbacks even though the SlidingDrawer is still closed. Once I have manually opened and closed the sliding drawer, I can get a single callback. The area at the top of the image on either side of the sliding drawer handle (that would never be covered by the SlidingDrawer), however, continues to produce callbacks.

I have tried the following without success:

  • programmatically closing the drawer in the OnTouchEvent callback
  • Setting a custom IOnTouchListener on the custom ImageView Parent and on the
    SlidingDrawer Parent
  • Setting RequestDisallowInterceptTouchEvent(true) on the
    ImageView and the SlidingDrawer
  • Overriding OnTouchEvent in the Activity

If I programmatically set the ViewState of the SlidingDrawer to “gone”, then all the hotspots produce OnTouchEvent callbacks while the SlidingDrawer is closed.

Here’s the Layout description:

<company.views.CustomDetailView     
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:xsns="http://schemas.android.com/apk/res/com.xactware.xactscopedroid" 
    android:id="@+id/ref_search_detail_view"
    style="@style/BaseFullLayout.Vertical">

<company.views.CustomImageView
    android:id="@+id/full_image"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_gravity="center_horizontal"  />

<SlidingDrawer
    android:id="@+id/drawer"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:handle="@+id/handle"
    android:content="@+id/content"
    android:focusableInTouchMode="false">   

    <TextView
        android:id="@id/handle"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:textSize="@dimen/font_xlarge"
        android:textColor="@color/dark_gray"
        android:textStyle="bold"
        android:layout_marginTop="10dp"
        android:layout_marginBottom="10dp"
        android:layout_marginLeft="10dp"
        android:background="@drawable/shape_data_background"
        android:focusableInTouchMode="false"    />
    <ListView
        android:id="@id/content"
        style="@style/ScopeList.ListView" />
</SlidingDrawer>

Here’s the code I use to set up the image, the list of options, and the OnHotSpotSelected callback.

private void LoadImage(ParentTopic pTopic)
        {
            if (_imageView == null)
            {
                _imageView = FindViewById<RefSearchImageView>(Resource.Id.full_image);
            }

        string imgPath = pTopic.FullImage;
        if (imgPath != null)
        {
            var stream = Context.Assets.Open(System.IO.Path.Combine("en-USrefSearch", pTopic.FullImage));
            Bitmap bmp = BitmapFactory.DecodeStream(stream);
            _imageView.SetImageBitmap(bmp);
            _imageView.PTopic = pTopic;
            _imageView.OnHotSpotSelected = new HotSpotSelectedDelegate(OnHotSpotSelected);
        }


    }

    private void LoadList()
    {

        if (_parentHeaderLabel == null)
        {
            _parentHeaderLabel = FindViewById<TextView>(Resource.Id.handle);
        }

        if (Resources.Configuration.Orientation == Android.Content.Res.Orientation.Landscape)
        {
            _slidingDrawer = FindViewById<SlidingDrawer>(Resource.Id.drawer);
            //_slidingDrawer.Visibility = ViewStates.Gone;
        }
        _parentHeaderLabel.Text = null;

        if (_listView == null)
        {
            _listView = FindViewById<ListView>(Resource.Id.content);
        }
        if (_currentHeaderList != null)
        {
            _currentHeaderList.Clear();
        }

        LayoutInflater inflater = (LayoutInflater)Context.GetSystemService(Context.LayoutInflaterService);
        View emptyView = inflater.Inflate(Resource.Layout.RefSearchDetailEmptyList, _listView, false);
        _listView.EmptyView = emptyView;

        var ia = Context as ItemsActivity;
        _listView.OnItemClickListener = new OnRSHeaderClickListener(ia, _currentHeaderList);
    }

    public void OnHotSpotSelected(string code)
    {
        ItemsActivity ia = Context as ItemsActivity;
        RSParentHeader parentHeader = ia.Data.GetRSParentHeader(code);
        _parentHeaderLabel.Text = parentHeader.Desc;

        _currentHeaderList = ia.Data.GetRSHeaders(parentHeader.ID);
        _listView.Adapter = new RSHeaderListAdapter(Context, Resource.Layout.RSHeaderListItem, Resource.Id.rsheader_desc, _currentHeaderList);
        _imageView.Invalidate();
        _imageView.RequestFocus();

    }
  • 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-02T07:24:16+00:00Added an answer on June 2, 2026 at 7:24 am

    I’m still not sure why, but the ListView that was the content of my SlidingDrawer continued to consume TouchEvents even when the drawer was closed. I created a custom ListView and overrode OnTouchEvent() to tell it not to do that.

    public override bool OnTouchEvent (MotionEvent e){
        bool consumed = base.OnTouchEvent (e);
        SlidingDrawer drawer = (SlidingDrawer)this.Parent;
        if (!drawer.IsOpened)
        {
            return false;
        }
        return consumed;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a large image and I want to make certain sections of the
I have a large database, and I want to dump the data after custom
I have a large non-map image that I want to allow people to view
I have custom coded several enterprise applications for mid to large organizations to use
I have a custom UDP protocol with multiple senders/receivers designed to send large files
I have large set of flow charts and workflow diagrams. I want to draw
In my application I have large area (≈5000x5000pts) and I must allow user to
I have a label label1 in the middle left of a large custom panel
We have a large legacy application where we want to start using MVC for
I have a large string containing a custom HTML tag (xxx). The tag also

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.