Solving touch issue

the controlP5 library works fine on pc but on android smartphones there is touch issue the sliders conflicted with each other because using touch not mouse for instance if you drag slider bar and left it then touch else where on lcd the slider still activated and change its position

i made my first project for android but i was using pc when i transferred to android on my tablet i was shocked did not expected the slider issue
after month of searching i find how to make it done

i have found other forked library i use it at first its was same as the original controlP5 library but i run example by chance on my tablet i have noticed that there is no issue with sliders or buttons while activated the slider if you touch any where of lcd slider still stable and not conflicted it was just one example behave so and all others examples just like the controlP5 library the sliders and buttons suffering same issue

i study the example and fined what prevent the slider from moving while you touch any part of tablet lcd

here is the library


Skatolo a ControlP5 for for MultiTouch, Augmented Reality and JRubyArt

its controlP5 library cloned

and here is the example

import tech.lity.rea.skatolo.*;
import tech.lity.rea.skatolo.gui.controllers.*;

Skatolo skatolo;
int myColor = color(0,0,0);

int sliderValue = 100;
int sliderTicks1 = 100;
int sliderTicks2 = 30;
Slider abc;

void setup() {
  skatolo = new Skatolo(this);
  // add a horizontal sliders, the value of this slider will be linked
  // to variable 'sliderValue' 
  // create another slider with tick marks, now without
  // default value, the initial value will be set according to
  // the value of variable sliderTicks2 then.
  // add a vertical slider
  // reposition the Label for controller 'slider'
  skatolo.getController("slider").getValueLabel().align(skatolo.LEFT, skatolo.BOTTOM_OUTSIDE).setPaddingX(0);
  skatolo.getController("slider").getCaptionLabel().align(skatolo.RIGHT, skatolo.BOTTOM_OUTSIDE).setPaddingX(0);

     .setRange(255,0) // values can range from big to small as well
  // use Slider.FIX or Slider.FLEXIBLE to change the slider handle
  // by default it is Slider.FIX


void draw() {


  println("Mouse : "+   skatolo.getMouseX() + " " + skatolo.getMouseY() );
  println("Mouse2 : "+   mouseX + " " + mouseY );

void slider(float theColor) {
  myColor = color(theColor);
  println("a slider event. setting background to "+theColor);

if you add this line from the code to any other example or other code of you own the touch issue will gone from tablet or phone or any lcd touch device this line in the example

println("Mouse : "+   skatolo.getMouseX() + " " + skatolo.getMouseY() );
  println("Mouse2 : "+   mouseX + " " + mouseY );

adding this to any sketch using this library solves touch issue

for any question just ask

have fun

Thanks for your help but, I have downloaded the lib from Github en extracted the zip file to the Libraries folder in my Sketch folder where my other libs are located. in order to get the lib recognized by processing the extracted files should have the following structure: ```

your sketch folders

which is not the case with the Skatolo lib there even is no .jar file. Am I doing something wrong? ```

Try just dragging the jar file onto your sketch.

Great but there is no .jar file

Try this instead

Paul that is where the trouble started.

Uhm… not sure what thats supposed to mean? Have yoilu already tried the link?


just unzipp it in your processing libraries folder and call it inside you sketch

use it as any ordinary library

@mmuylle try this link

Thanks a lot. This was a great help. Apparently the skatolo lib does not have Label controller but I could use Textarea instead. There is an LabelExtended example but that use deprecated settings.

Thanks for your help. The button problem is solved now. Regards

1 Like

@mmuylle is it work for you ?

@mmuylle for slider or button only you can use something like this

forum button class question

I unziped this file into the Documents/Processing/libraries folder, but processing 4 does not recognize it… Any ideas? Thanks


I am sorry I tested it with processing 3 at that time and works fine with slider and button and didn’t test other options

I am using processing 3 until now

I am on processing 4. Let me see if I have processing 3 installed.

Also, reading the forums I found out that if we drag the .jar file into the IDE, it at least finds the library.


Once I installed the library direct on my Android tablet using APDE 5.1 working same as processing android mode