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

We have recently introduced version control in Subversion in our development cycle, and a
Recently Google introduced an SDK for application usage tracking on mobile devices ( Google
I have recently been introduced to EasyMock and have been asked to develop some
Recently a couple of WCF services have been introduced to our company's API. There
I'm sure someone can explain this. we have an application that has been in
We recently introduced PostSharp into our code base and the compile time of our
I have recently been introduced to the new Access 2007 feature which is multivalued
Recently I was introduced to this OCaml code which in Haskell can be written
I'm a longtime python developer and recently have been introduced to Prolog. I love
Recently I have been exploring using the fancy new dynamic keyword introduced in C#

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.