Search code examples
androidcolorsgestures

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);

Solution

  • 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">