1

In Nokia S40 the search field for the contacts is looked like this

enter image description here

This TextField is really interactive, if I put some text the magnifier will change into x Button. I've tried to create the TextField in LWUIT and override the paint methods to put the magnifier image but it can't use as a button.

Are there any component I can use to recreate something like this (Especially with LWUIT)? Or maybe are there any ready-to-be-used component from Nokia to create something like this?

Best Regards

Mun0n
  • 4,438
  • 4
  • 28
  • 46
giripp
  • 285
  • 1
  • 4
  • 13

2 Answers2

0

You can do something similar to that, but it won't look like the native SearchField, but it will work fine.

What you can do is this. Create a container with a boxLayoutX and put inside it a TextField and a Button. When you capture that the TextField has text inside, change the Image attached to the Button to a X and here it is. You only need to implement the functionallity of the Button.

Mun0n
  • 4,438
  • 4
  • 28
  • 46
  • actually this is not the something what I looking for, but yeah, the only thing to do it is this way (I think so). Thanks! – giripp Nov 28 '12 at 04:53
0

TextField has a setHintIcon method allowing you to do just that.

Shai Almog
  • 51,749
  • 5
  • 35
  • 65