08-27-2010 03:36 AM - edited 08-27-2010 03:37 AM
hello,
I am new in blckberry developer. i am desing loing password screen. i want password edit field with default character " * " . please help me. what is code for that when we enter password edit field it will show only *.
thanks
ajay
08-27-2010 03:40 AM
PasswordEditField pwd = new PasswordEditField ();
try the above code
08-27-2010 03:46 AM
hi,
swati is correct..
may be you can also improvize and override
class Password extends PasswordEditField
{
Password(long style)
{
super("", "", 10, style);
}
protected void layout(int width, int height)
{
width = SizeSpec.PasswordWidth;
height = SizeSpec.PasswordHeight;
super.layout(width, height);
super.setExtent(width, height);
}
public void paint(Graphics graphics)
{
super.paint(graphics);
int labelWidth = getFont().getAdvance(getLabel());
graphics.drawRect( labelWidth, 0, getWidth() - labelWidth,getHeight());
}
}