B4A Library [Lib] Masked EditText

Roberto Cardenas

Member
Licensed User
Longtime User
I don't know what is sf.Pad. It seems the problem comes from this function.
Hello,thanks for your quick response.
Sf.pad is a string function to put fill with "0" the string. But neither work if I assign it the value as is txtamount.Text = 220.50

Thanks.
Robert
 

Informatix

Expert
Licensed User
Longtime User
Hello,thanks for your quick response.
Sf.pad is a string function to put fill with "0" the string. But neither work if I assign it the value as is txtamount.Text = 220.50

Thanks.
Robert
Yes, it's normal. You have to use the NumberFormat function to convert your number into a string. In your case, you have to do:
txtamount.PlaceHolder = "0"
txtamount.Text = NumberFormat(your number, 6, 2)

PS: avoid using "," if your application is international because it's extremely confusing for european people which use "," as a decimal mark. Space is now the international character used to group digits by three.
 

Roberto Cardenas

Member
Licensed User
Longtime User

Thanks a lot, that make it work

Also thanks for the tip about the internationalization, I'll use the space instead the ",".

Best Regards,
Robert
 

GaNdAlF89

Active Member
Licensed User
Longtime User
B4X:
src\flm\b4a\metdemo\main.java:213: error: cannot access DesignerCustomView
mostCurrent._v5.Initialize(mostCurrent.activityBA,"ET1");
               ^
  class file for anywheresoftware.b4a.keywords.Common$DesignerCustomView not found
1 error
I get this error during compiling your example. What is the problem?
 

ArminKH

Well-Known Member
thank u this great lib
but i there any way to change the background color of error popup?
because when my theme(on manifest) is Holo.Light then error popup 's background color is black and thats not seem good
i use your lib on custom dialog
please see attached screenshot
thanks again
 

Attachments

  • Screenshot_2015-04-04-02-48-08.png
    9.2 KB · Views: 304

ArminKH

Well-Known Member
@Informatix
Thats not possible by using nine patch?
Ok i dont know, thats just a suggestion
Before i think the error popup is custom view or a panel
Thank u
 

Geritt Schlag

Member
Licensed User
Longtime User
Thanks for the good library!

I have a problem with IPs.
Formatstring "###.###.###.###" allowed no input as "162.198.1.100".
And "162.198.001.100" is not correct in the network.

Who can help?
 

Arf

Well-Known Member
Licensed User
Longtime User
Hi, using this library fixed my 'no suggestions' problem on the Galaxy phone, thanks.

One question - is there any way I can get the text to justify to the middle of the box rather than the left?
Here is what I have at the moment:

B4X:
NameEntry.InputType = NameEntry.INPUT_TYPE_TEXT
NameEntry.SingleLine = True
NameEntry.WithSuggestions = False
 

Informatix

Expert
Licensed User
Longtime User
Use Gravity.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…