Setting Gestures Color to Transparent
Asked Answered
I

2

6

I am trying to make my application not to show any gestures wether they are recognised or not. As it stands at the moment I am able to set the recognised color to transparent. This works fine. However if I set unrecognisedgesture color to transparent it still shows as green. I have tried changing this to other colors (i.e. blue) and this works. It seems to be specifically for the Transparent color on unrecognised gesture. Anybody have any ideas?

>       GestureOverlayView
> gestureOverlayView = new
> GestureOverlayView(this);         View
> inflate =
> getLayoutInflater().inflate(R.layout.item,
> null);
>       gestureOverlayView.addView(inflate);
>       gestureOverlayView.setGestureColor(Color.TRANSPARENT);
>       gestureOverlayView.setUncertainGestureColor(Color.TRANSPARENT);
>       gestureOverlayView.addOnGesturePerformedListener(this);
>       gestureLib =
> GestureLibraries.fromRawResource(this,
> R.raw.gestures);      
>         if (!gestureLib.load()) {
>             finish();
>         }         setContentView(gestureOverlayView);
Insufferable answered 29/4, 2011 at 13:17 Comment(0)
I
13

I figured this out in the end tho it took me a while. The above is correct but I need to set the below in the XML layout for the gestures to be transparent

  android:uncertainGestureColor="#00000000"
  android:gestureColor="#00000000">
Insufferable answered 9/5, 2011 at 9:47 Comment(0)
L
2

In the GestureOverlayView methods there is one which activates/disativates the visibility of the gesture strokes.

gestureOverlayView.setGestureVisible(false);
Luthern answered 16/4, 2013 at 15:4 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.