# Solving touch issue

**URL:** <https://discourse.processing.org/t/solving-touch-issue/28152>\
**Category:** Gallery\
**Created:** [March 1, 2021, 4:41am UTC](https://discourse.processing.org/t/solving-touch-issue/28152 "2021-03-01T04:41:37Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![jafal](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jafal/32/19112_2.png) [@jafal](https://discourse.processing.org/u/jafal)\
**Post date:** [March 1, 2021, 4:41am UTC](https://discourse.processing.org/t/solving-touch-issue/28152/1 "2021-03-01T04:41:37Z")

</div>

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

![](https://github.githubassets.com/favicons/favicon.svg)[github.com](https://github.com/Rea-lity-Tech/Skatolo)

![](https://avatars.githubusercontent.com/u/24319019?s=400&v=4)

### [Rea-lity-Tech/Skatolo](https://github.com/Rea-lity-Tech/Skatolo)

Skatolo a ControlP5 for for MultiTouch, Augmented Reality and JRubyArt

its controlP5 library cloned

and here is the example

```auto
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() {
  size(700,400);
  noStroke();
  skatolo = new Skatolo(this);
  
  // add a horizontal sliders, the value of this slider will be linked
  // to variable 'sliderValue' 
  skatolo.addSlider("sliderValue")
     .setPosition(100,50)
     .setRange(0,255)
     ;
  
  // create another slider with tick marks, now without
  // default value, the initial value will be set according to
  // the value of variable sliderTicks2 then.
  skatolo.addSlider("sliderTicks1")
     .setPosition(100,140)
     .setSize(20,100)
     .setRange(0,255)
     .setNumberOfTickMarks(5)
     ;
     
     
  // add a vertical slider
  skatolo.addSlider("slider")
     .setPosition(100,305)
     .setSize(200,20)
     .setRange(0,200)
     .setValue(128)
     ;
  
  // 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);
  

  skatolo.addSlider("sliderTicks2")
     .setPosition(100,370)
     .setWidth(400)
     .setRange(255,0) // values can range from big to small as well
     .setValue(128)
     .setNumberOfTickMarks(7)
     .setSliderMode(Slider.FLEXIBLE)
     ;
  // use Slider.FIX or Slider.FLEXIBLE to change the slider handle
  // by default it is Slider.FIX
  

}

void draw() {
  background(sliderTicks1);

  fill(sliderValue);
  rect(0,0,width,100);
  
  fill(myColor);
  rect(0,280,width,70);
  
  fill(sliderTicks2);
  rect(0,350,width,50);

  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

```auto
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

---

<div class="post-metadata">

**Author:** ![mmuylle](https://avatars.discourse-cdn.com/v4/letter/m/ea5d25/32.png) [@mmuylle](https://discourse.processing.org/u/mmuylle)\
**Post date:** [June 20, 2021, 4:10pm UTC](https://discourse.processing.org/t/solving-touch-issue/28152/2 "2021-06-20T16:10:57Z")

</div>

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: ```

```auto
your sketch folders
                 libraries
                       theNewLibrary
                             examples
                             library
                                   theNewLibrary.jar
                             reference
                             src

```

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

---

<div class="post-metadata">

**Author:** ![paulgoux](https://avatars.discourse-cdn.com/v4/letter/p/b9bd4f/32.png) [@paulgoux](https://discourse.processing.org/u/paulgoux)\
**Post date:** [June 20, 2021, 4:16pm UTC](https://discourse.processing.org/t/solving-touch-issue/28152/3 "2021-06-20T16:16:22Z")

</div>

Try just dragging the jar file onto your sketch.

---

<div class="post-metadata">

**Author:** ![mmuylle](https://avatars.discourse-cdn.com/v4/letter/m/ea5d25/32.png) [@mmuylle](https://discourse.processing.org/u/mmuylle)\
**Post date:** [June 20, 2021, 4:23pm UTC](https://discourse.processing.org/t/solving-touch-issue/28152/4 "2021-06-20T16:23:03Z")

</div>

Great but there is no .jar file  
 ![Clip001](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/c/c75698b61a4077a60bd383ce8c20d7268185c73c.png)

---

<div class="post-metadata">

**Author:** ![paulgoux](https://avatars.discourse-cdn.com/v4/letter/p/b9bd4f/32.png) [@paulgoux](https://discourse.processing.org/u/paulgoux)\
**Post date:** [June 20, 2021, 4:46pm UTC](https://discourse.processing.org/t/solving-touch-issue/28152/5 "2021-06-20T16:46:08Z")

</div>

Try this instead

[http://www.sojamo.de/libraries/controlP5/](http://www.sojamo.de/libraries/controlP5/)

---

<div class="post-metadata">

**Author:** ![mmuylle](https://avatars.discourse-cdn.com/v4/letter/m/ea5d25/32.png) [@mmuylle](https://discourse.processing.org/u/mmuylle)\
**Post date:** [June 20, 2021, 5:13pm UTC](https://discourse.processing.org/t/solving-touch-issue/28152/6 "2021-06-20T17:13:09Z")

</div>

Paul that is where the trouble started.

---

<div class="post-metadata">

**Author:** ![paulgoux](https://avatars.discourse-cdn.com/v4/letter/p/b9bd4f/32.png) [@paulgoux](https://discourse.processing.org/u/paulgoux)\
**Post date:** [June 20, 2021, 5:31pm UTC](https://discourse.processing.org/t/solving-touch-issue/28152/7 "2021-06-20T17:31:37Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jafal](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jafal/32/19112_2.png) [@jafal](https://discourse.processing.org/u/jafal)\
**Post date:** [June 20, 2021, 5:42pm UTC](https://discourse.processing.org/t/solving-touch-issue/28152/8 "2021-06-20T17:42:09Z")

</div>

@mmuylle

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

 ![Untitled 187](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/e/e5e5691403e4b2f0607893e17d0ceaa3fb8d8c79.jpeg)

---

<div class="post-metadata">

**Author:** ![jafal](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jafal/32/19112_2.png) [@jafal](https://discourse.processing.org/u/jafal)\
**Post date:** [June 20, 2021, 5:52pm UTC](https://discourse.processing.org/t/solving-touch-issue/28152/9 "2021-06-20T17:52:04Z")

</div>

use it as any ordinary library

 ![Untitled 189](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/5/5850bd4f9d6c6df147ab9a0b6cb80a9750fc1781.jpeg)

---

<div class="post-metadata">

**Author:** ![jafal](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jafal/32/19112_2.png) [@jafal](https://discourse.processing.org/u/jafal)\
**Post date:** [June 20, 2021, 5:55pm UTC](https://discourse.processing.org/t/solving-touch-issue/28152/10 "2021-06-20T17:55:37Z")

</div>

![Untitled 190](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/0/02bf64df9bd358055118bae1a01e4c6a7a7a769b.jpeg)

---

<div class="post-metadata">

**Author:** ![jafal](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jafal/32/19112_2.png) [@jafal](https://discourse.processing.org/u/jafal)\
**Post date:** [June 20, 2021, 6:07pm UTC](https://discourse.processing.org/t/solving-touch-issue/28152/11 "2021-06-20T18:07:38Z")

</div>

@mmuylle try this link

> **[skatolo.rar](https://drive.google.com/file/d/16D4baTIwi6nlcwYySgMR8PmHMbUJTr8w/view?usp=sharing)**
>
> Google Drive file.

---

<div class="post-metadata">

**Author:** ![mmuylle](https://avatars.discourse-cdn.com/v4/letter/m/ea5d25/32.png) [@mmuylle](https://discourse.processing.org/u/mmuylle)\
**Post date:** [June 21, 2021, 6:01pm UTC](https://discourse.processing.org/t/solving-touch-issue/28152/12 "2021-06-21T18:01:17Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![mmuylle](https://avatars.discourse-cdn.com/v4/letter/m/ea5d25/32.png) [@mmuylle](https://discourse.processing.org/u/mmuylle)\
**Post date:** [June 21, 2021, 6:03pm UTC](https://discourse.processing.org/t/solving-touch-issue/28152/13 "2021-06-21T18:03:04Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jafal](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jafal/32/19112_2.png) [@jafal](https://discourse.processing.org/u/jafal)\
**Post date:** [June 21, 2021, 6:04pm UTC](https://discourse.processing.org/t/solving-touch-issue/28152/14 "2021-06-21T18:04:28Z")

</div>

@mmuylle is it work for you ?

---

<div class="post-metadata">

**Author:** ![jafal](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jafal/32/19112_2.png) [@jafal](https://discourse.processing.org/u/jafal)\
**Post date:** [June 21, 2021, 6:08pm UTC](https://discourse.processing.org/t/solving-touch-issue/28152/15 "2021-06-21T18:08:00Z")

</div>

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

## forum button class question

[http://kll.engineering-news.org/kllfusion01/print.php?type=A&item\_id=154#here1](http://kll.engineering-news.org/kllfusion01/print.php?type=A&item_id=154#here1)

---

<div class="post-metadata">

**Author:** ![jhsa](https://avatars.discourse-cdn.com/v4/letter/j/e47c2d/32.png) [@jhsa](https://discourse.processing.org/u/jhsa)\
**Post date:** [August 5, 2022, 6:15pm UTC](https://discourse.processing.org/t/solving-touch-issue/28152/17 "2022-08-05T18:15:45Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jafal](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jafal/32/19112_2.png) [@jafal](https://discourse.processing.org/u/jafal)\
**Post date:** [August 5, 2022, 9:50pm UTC](https://discourse.processing.org/t/solving-touch-issue/28152/18 "2022-08-05T21:50:15Z")

</div>

> [@jhsa](#):
>
> I unziped this file into the Documents/Processing/libraries folder, but processing 4 does not recognize it…

Hi

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

---

<div class="post-metadata">

**Author:** ![jhsa](https://avatars.discourse-cdn.com/v4/letter/j/e47c2d/32.png) [@jhsa](https://discourse.processing.org/u/jhsa)\
**Post date:** [August 5, 2022, 10:12pm UTC](https://discourse.processing.org/t/solving-touch-issue/28152/19 "2022-08-05T22:12:34Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jhsa](https://avatars.discourse-cdn.com/v4/letter/j/e47c2d/32.png) [@jhsa](https://discourse.processing.org/u/jhsa)\
**Post date:** [August 5, 2022, 10:14pm UTC](https://discourse.processing.org/t/solving-touch-issue/28152/20 "2022-08-05T22:14:32Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jafal](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jafal/32/19112_2.png) [@jafal](https://discourse.processing.org/u/jafal)\
**Post date:** [August 5, 2022, 10:20pm UTC](https://discourse.processing.org/t/solving-touch-issue/28152/21 "2022-08-05T22:20:20Z")

</div>

> [@jhsa](#):
>
> I am on processing 4. Let me see if I have processing 3 installed.

Hi

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

[Next page](https://discourse.processing.org/t/solving-touch-issue/28152.md?page=2)
