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. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Java Development

Reply
New Contributor
narcissus299
Posts: 2
Registered: ‎06-30-2012
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. :smileyhappy:

 

Please use plain text.
Trusted Contributor
avi_yach
Posts: 184
Registered: ‎11-26-2010

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

 

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

 

A Y.

 

Please use plain text.
Developer
simon_hain
Posts: 13,754
Registered: ‎07-29-2008
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
Please use plain text.
New Contributor
narcissus299
Posts: 2
Registered: ‎06-30-2012
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)
Please use plain text.