Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting Gestures Color to Transparent

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);
like image 947
jiduvah Avatar asked Apr 29 '11 13:04

jiduvah


2 Answers

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">
like image 124
jiduvah Avatar answered Nov 13 '22 15:11

jiduvah


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

gestureOverlayView.setGestureVisible(false);
like image 25
Carlos Morera Avatar answered Nov 13 '22 14:11

Carlos Morera