Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Highlighted
New Contributor
Posts: 2
Registered: ‎06-30-2012
My Device: Curve 8520,developer
My Carrier: Airtel
Accepted Solution

Secret typing (text while being typed will not appear in the EditField)

I am a rookie developer so I would be glad if you can also provide a code example for my problem.

So I am making an app which has say EditField EditField and while typing, when the user holds say the LEFT SHIFT,the characters being typed are stored in String Secret ( without those characters appearing on the screen ) while the text on the screen is replaced with characters (as the user types to store the secret text in Secret ) which is pre-defined by the programmer.

Thank you for the assistance. Smiley Happy

 

Trusted Contributor
Posts: 184
Registered: ‎11-26-2010
My Device: Not Specified

Re: Secret typing (text while being typed will not appear in the EditField)

[ Edited ]

I think you are searching for the effort of Password Field, when user types something it will be replaced with '*' asterix symbol.

 

For your requirement you can use net.rim.device.api.ui.component.PasswordEditField() instead of EditField to store the secret Smiley Wink

 

Mark the solution as marked if it helped you! Click accept as solution! It will help others!

 

A Y.

 

Developer
Posts: 17,019
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Secret typing (text while being typed will not appear in the EditField)

welcome to the support forums.

if passwordeditfield does not fit your requirements you could overwrite keyChar and implement a custom handling.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
New Contributor
Posts: 2
Registered: ‎06-30-2012
My Device: Curve 8520,developer
My Carrier: Airtel

Re: Secret typing (text while being typed will not appear in the EditField)

What I intended was the keychar method as I wanted the text to be stored off screen instead of appearing as **** on the screen itself. Thanks for the help. (y)