# \[KetaiList\] API 7.0 error?

**URL:** <https://discourse.processing.org/t/ketailist-api-7-0-error/10623>\
**Category:** Processing for Android\
**Created:** [April 25, 2019, 7:26am UTC](https://discourse.processing.org/t/ketailist-api-7-0-error/10623 "2019-04-25T07:26:08Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![GWAK](https://avatars.discourse-cdn.com/v4/letter/g/13edae/32.png) [@GWAK](https://discourse.processing.org/u/GWAK)\
**Post date:** [April 25, 2019, 7:26am UTC](https://discourse.processing.org/t/ketailist-api-7-0-error/10623/1 "2019-04-25T07:26:08Z")

</div>

![TTT](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/b/b97c89650f2a5f5e97c643dc35b7ac974ab98cdb.jpeg)

- Library used: Ketai UI\> KetaiList
- Is there a way to work with API 7.0?  
Fonts are not visible in 7.0 environment. I click on it but I can not see it.

Please help me. I need your help.

---

<div class="post-metadata">

**Author:** ![akenaton](https://avatars.discourse-cdn.com/v4/letter/a/a88e4f/32.png) [@akenaton](https://discourse.processing.org/u/akenaton)\
**Post date:** [April 25, 2019, 8:16am UTC](https://discourse.processing.org/t/ketailist-api-7-0-error/10623/2 "2019-04-25T08:16:44Z")

</div>

@GWAK ===

- Not sure to understand your picture : the list seems visible with 24, invisible with 23

- Is this issue happening on phones with the same density? Which one?

- what happens if you write some text (not a list) with the same font && fontSize?

---

<div class="post-metadata">

**Author:** ![GWAK](https://avatars.discourse-cdn.com/v4/letter/g/13edae/32.png) [@GWAK](https://discourse.processing.org/u/GWAK)\
**Post date:** [April 25, 2019, 8:35am UTC](https://discourse.processing.org/t/ketailist-api-7-0-error/10623/3 "2019-04-25T08:35:08Z")

</div>

![sdf](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/8/858d4d42e15745cd2be738fc367dac038121ab1a.png)

1. The picture file has been modified.

2. Same source code on the same phone.

3. I did not use fonts separately, and I used the text size function.  
textFont - X  
textSize - O

---

<div class="post-metadata">

**Author:** ![akenaton](https://avatars.discourse-cdn.com/v4/letter/a/a88e4f/32.png) [@akenaton](https://discourse.processing.org/u/akenaton)\
**Post date:** [April 25, 2019, 8:40am UTC](https://discourse.processing.org/t/ketailist-api-7-0-error/10623/4 "2019-04-25T08:40:31Z")

</div>

@GWAK ===

- ok, now i understand your picture…

- if it is the same phone what OS is it using?

- I repeat my last question : what happens with a “normal” text (same font, same fontSize) changing the target SDK as with KetaiList?

---

<div class="post-metadata">

**Author:** ![GWAK](https://avatars.discourse-cdn.com/v4/letter/g/13edae/32.png) [@GWAK](https://discourse.processing.org/u/GWAK)\
**Post date:** [April 25, 2019, 3:54pm UTC](https://discourse.processing.org/t/ketailist-api-7-0-error/10623/5 "2019-04-25T15:54:50Z")

</div>

My smartphone version is 8.0 The Galaxy A8.

I have not changed the source code. However, I changed only the SDK version. But I can not see what is written in Ketialist.

What’s the reason?

Would you like to try it out?

```auto

KetaiList selectionlist;
KetaiVibrate vibe;
ArrayList<String> colorlist = new ArrayList<String>();
color backgroundcolor = color(0, 0, 0);

void setup()
{
  
  fullScreen();
  orientation(LANDSCAPE);
  textSize(28);
  textAlign(CENTER);
  vibe = new KetaiVibrate(this);
  colorlist.add("Black");
  colorlist.add("Red");
  colorlist.add("Green");
  colorlist.add("Blue");
  colorlist.add("Gray");
  for (int i = 0; i < 20; i++)
    colorlist.add("Stub Entry " + i);
    
   
  //register for key events(keyPressed currently Broken)
  //registerMethod("keyEvent", this);  
}

void draw()
{
  background(backgroundcolor);

  drawUI();
  text("click screen to change background color", width/2, height/2);
}

void mousePressed()
{
  if (mouseY < 100)
  {
    if (mouseX < width/3)
      KetaiKeyboard.toggle(this);
    else if (mouseX > width/3 && mouseX < width-(width/3))
      KetaiAlertDialog.popup(this, "Pop Up!", "this is a popup message box");
    else
      vibe.vibrate(1000);
  }
  else
    selectionlist = new KetaiList(this, colorlist);
}

void onKetaiListSelection(KetaiList klist)
{
  String selection = klist.getSelection();
  if (selection == "Black")
    backgroundcolor = color(0, 0, 0);
  else if (selection == "Red")
    backgroundcolor = color(255, 0, 0);
  else if (selection == "Green")
    backgroundcolor = color(0, 255, 0);
  else if (selection == "Blue")
    backgroundcolor = color(0, 0, 255);
  else if (selection == "Gray")
    backgroundcolor = color(128, 128, 128);
}

void drawUI()
{
  pushStyle();
  textAlign(LEFT);
  fill(0);
  stroke(255);
  rect(0, 0, width/3, 100);
  rect(width/3, 0, width/3, 100);

  rect((width/3)*2, 0, width/3, 100);

  fill(255);
  text("Keyboard", 5, 60); 
  text("PopUp", width/3 + 5, 60); 
  text("Vibrate", width/3*2 + 5, 60); 
  popStyle();
}

//use event framework temporarily
public void keyPressed() {

    if (key == ' ')
      KetaiAlertDialog.popup(this, "SPACE pressed", "You pressed the <SPACE> key!");
    else
      println(key);
}

```

---

<div class="post-metadata">

**Author:** ![akenaton](https://avatars.discourse-cdn.com/v4/letter/a/a88e4f/32.png) [@akenaton](https://discourse.processing.org/u/akenaton)\
**Post date:** [April 25, 2019, 5:41pm UTC](https://discourse.processing.org/t/ketailist-api-7-0-error/10623/6 "2019-04-25T17:41:17Z")

</div>

@GWAK ===

- this code has to work and the problem is not here
- Target Sdk normally changes nothing: it only means that you have tested your app with this API
- ketai list is a simple wrapper for a listView + an adapter from an ArrayList
- answer to my third question putting some text in your draw and comment the list

---

<div class="post-metadata">

**Author:** ![GWAK](https://avatars.discourse-cdn.com/v4/letter/g/13edae/32.png) [@GWAK](https://discourse.processing.org/u/GWAK)\
**Post date:** [May 5, 2019, 3:57pm UTC](https://discourse.processing.org/t/ketailist-api-7-0-error/10623/7 "2019-05-05T15:57:19Z")

</div>

[![](https://img.youtube.com/vi/lLTfY6Vldrw/maxresdefault.jpg "why not? not view text") ](https://www.youtube.com/watch?v=lLTfY6Vldrw)

@akenaton

Dear akenaton.

Please refer to the video(youtube).  
I tested it as the example source for the Ketai library.

Why? Do you see this result?  
Are you all right?  
What’s the problem?

please check.

---

<div class="post-metadata">

**Author:** ![akenaton](https://avatars.discourse-cdn.com/v4/letter/a/a88e4f/32.png) [@akenaton](https://discourse.processing.org/u/akenaton)\
**Post date:** [May 5, 2019, 5:54pm UTC](https://discourse.processing.org/t/ketailist-api-7-0-error/10623/8 "2019-05-05T17:54:44Z")

</div>

@GWAK_emphasized text_ ===  
No need from your video  
i already told you:  
if you try to write some text (not the list, comment it!) what happens???  
another question could be : what is your build tools version in the SDK?  
and another one: when you take another code example, not from ketai, and do the same (change the target build SDK from 6 to 7) what happens?

---

<div class="post-metadata">

**Author:** ![GWAK](https://avatars.discourse-cdn.com/v4/letter/g/13edae/32.png) [@GWAK](https://discourse.processing.org/u/GWAK)\
**Post date:** [May 6, 2019, 4:47am UTC](https://discourse.processing.org/t/ketailist-api-7-0-error/10623/9 "2019-05-06T04:47:32Z")

</div>

@akenaton

Dear akenaton,

I have solved it, but I do not know if this is the right way.

> uses-sdk android: minSdkVersion = “15” android: targetSdkVersion = “23”

If you add this(code), it works fine.

---

<div class="post-metadata">

**Author:** ![GWAK](https://avatars.discourse-cdn.com/v4/letter/g/13edae/32.png) [@GWAK](https://discourse.processing.org/u/GWAK)\
**Post date:** [May 7, 2019, 3:48am UTC](https://discourse.processing.org/t/ketailist-api-7-0-error/10623/10 "2019-05-07T03:48:59Z")

</div>

@akenaton

Dear akenaton,

Thanks to you, I was able to finish.

[![]( " - YouTube") ](https://www.youtube.com/watch?v=4fRD4DI0Jko)

It is the video that the controller and the application that I created are linked with each other.  
I hope you have fun.  
Thank you.
