Android Question phone number from edit text

hookshy

Well-Known Member
Licensed User
Longtime User
I can not read phone number "07233994949" from edit text because it returns everything without the leading "0" , the resulted string is "7233994949"
 

hookshy

Well-Known Member
Licensed User
Longtime User
B4X:
'typeface default ...wrap on
  edit_reply.SetLayout(5dip,5dip,pnl_reply.Width-55dip,40dip)
        Dim cd As ColorDrawable
        cd.Initialize2(Colors.White,10dip,2dip,Main.temar)
        edit_reply.Background=cd
        edit_reply.Padding=Array As Int(50dip,3dip,10dip,3dip)
        edit_reply.TextSize=Main.htext
        edit_reply.InputType=edit_reply.INPUT_TYPE_TEXT

B4X:
dim data as map
data.initialise
        If edit_reply.Text.StartsWith("0") Then
            Dim s As Object
            s = edit_reply.Text
            data.Put("content",s) 'does not work as well
        Else
            data.Put("content",edit_reply.Text) 'the same result 0 is trimed
        end if
do not understand
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…