title: TextFields not updating/repainting correctly on codenameone
body: <p>I have a problem with <code>TextFields</code> not updating correctly when they gain focus using the virtual keyboard in Codenameone apps on Android devices.</p>
  
  <p>I gave the <code>TextField</code> a value (value '0') and added multiples underneath each other. I then pressed on a <code>TextField</code>, where it gains focus, and I type something in. Once the value is entered, I press 'Next' on the virtual keyboard, and the value in the next <code>TextField</code> (the '0') gets bolded (there's 2 '0' values on top of one another). When I then press back, to clear the '0', one of them disappear, and when I try type, the text if written over the '0' value.</p>
  
  <p>This seems to happen when the next <code>TextField</code> is off-screen, and it seems to not update correctly. When I erase one '0', and lose focus on the TextFields, the other '0' also disappears, implying its not refreshing correctly.
  The same happens with text hints.</p>
  
  <p>The test app I used:</p>
  
  <p><strong>CODE SAMPLE</strong></p>
  
  <pre><code>public void start() {
      if(current != null){
          current.show();
          return;
      }
      Form hi = new Form("Hi World");
      hi.addComponent(new Label("Hi World"));
      hi.addComponent(getEntry());
      hi.addComponent(getEntry());
      hi.addComponent(getEntry());
      hi.addComponent(getEntry());
      hi.addComponent(getEntry());
      hi.addComponent(getEntry());
      hi.addComponent(getEntry());
      hi.addComponent(getEntry());
      hi.addComponent(getEntry());
      hi.addComponent(getEntry());
      hi.addComponent(getEntry());
      hi.addComponent(getEntry());
      hi.addComponent(getEntry());
      hi.addComponent(getEntry());
      hi.addComponent(getEntry());
      hi.addComponent(getEntry());
      hi.addComponent(getEntry());
      hi.addComponent(getEntry());
      hi.addComponent(getEntry());
      hi.addComponent(getEntry());
      hi.addComponent(getEntry());
      hi.addComponent(getEntry());
      hi.show();
  }
  
  public Container getEntry() {
      Container c = new Container();
      c.setLayout(new BorderLayout());
      Label lbl = new Label("Testing..");
  
      TextField tf = new TextField();
      tf.setConstraint(TextField.DECIMAL);
      tf.setText("0");
      c.add(BorderLayout.NORTH, lbl);
      c.add(BorderLayout.CENTER, tf);
      return c;
  
  }
  </code></pre>
  
  <p><strong>SCREENSHOTS</strong></p>
  
  <p>In the first image, you can see the text being bolded, which is actually 2 '0' values on top of one another.</p>
  
  <p><a href="https://i.stack.imgur.com/9y1PK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9y1PK.png" alt="the text being bolded"></a></p>
  
  <p>The second image is what it looks like after you pressed the back button on the virtual keyboard to erase the '0'.</p>
  
  <p><a href="https://i.stack.imgur.com/Q928s.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Q928s.png" alt="enter image description here"></a></p>
  
  <p>The third image shows what happens if you continue to try type something in,</p>
  
  <p><a href="https://i.stack.imgur.com/jdZQw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jdZQw.png" alt="enter image description here"></a></p>
  
  <p>and lastly, the fourth image shows how the TextField looks like after it loses focus (pressed on another TextField).</p>
  
  <p><a href="https://i.stack.imgur.com/dUPLB.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/dUPLB.png" alt="enter image description here"></a></p>
  
  <p><strong>FURTHER DETAILS</strong></p>
  
  <p>This was replicated on Android devices, using versions 4.2.2, and 4.4.2.
  This is far easier to reproduce on smaller screens; I believe this is due ot the nature of the bug where the <code>TextField</code> is off-screen.</p>