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

  • Home
  • SEARCH
  • 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 4607896
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T00:46:01+00:00 2026-05-22T00:46:01+00:00

I recently introduced multi-stroke gestures into my application. This is a preference so I

  • 0

I recently introduced multi-stroke gestures into my application. This is a preference so I set the StrokeType dynamically in Activity.OnCreate. What I have discovered is that if you set the StrokeType dynamically, it changes the behaviour of the GestureOverlayView in the following way.

The normal behaviour is that you draw a gesture and it stays on the screen after it is drawn. When you change the stroke type dynamically however, any gesture drawn on the screen disappears immediately after the OnGestureEnded event has fired. I reloaded the sample GesturesBuilder application and confirmed it has the same problem if you add the second line shown here:

    GestureOverlayView overlay = (GestureOverlayView) findViewById(R.id.gestures_overlay);
    overlay.setGestureStrokeType(GestureOverlayView.GESTURE_STROKE_TYPE_SINGLE);
    overlay.addOnGestureListener(new GesturesProcessor());
}

Is this a bug in the Android gestures library and does anyone know a workaround?

Note that this is on an HTC Magic so it could also be a handset issue.

  • 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-22T00:46:01+00:00Added an answer on May 22, 2026 at 12:46 am

    You could set the stroke type statically in the XML file of the Gesture Overlay.

    <android.gesture.GestureOverlayView
    android:id="@+id/gestures_alpha"
    android:layout_width="fill_parent" 
    android:layout_height="0dip"
    android:layout_weight="1.0" 
    android:gestureStrokeType="multiple"
    android:fadeOffset="1000"
    />
    

    The gesture disappears quickly because the fadeOffset is set to a low number. If you set it yourself, like above, it will take that amount of time before the gesture dissapears. After this amount of time, the OnGestureEvent or OnGesturePerformedListener is called depending on which one you are using.

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

Sidebar

Related Questions

I have been recently introduced to the concept of BDD and am using SpecFlow
I recently purchased an XBox 360 and was first introduced to the term Media
I recently purchased the book Seven Languages in Seven Weeks and have been reading
I've recently taken an existing ASP.NET 3.5 web forms application that was upgraded to
Windows 7 introduced a Recent Places special folder in Explorer which shows you the
I recently upgraded my old iPhone app and the new state restore iOS 3/4
I know that with PHP 4.1 they introduced the concept of super globals, which
I recently came across a kind of dispatch pattern based on the concepts of
Why don't languages integrate Dependency Injection in their core (at the lowest level :

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.