Android Question EditText input types

GiovanniPolese

Well-Known Member
Licensed User
Longtime User
Hi All
I have two unwanted behaviors in simple EditText use, in my Galaxy Tab P3100. (android 4.04)
First I would like to disable the autocomplete in the edittext, with normal texts, not only for passwords. As a matter of fact this is fairly uncomfortable for usernames too, in my case. In another post it is explained how to disable it for password input type, and this works fine. It seems to me that same method (i.e. using Bit.Or(Field.InputType,0x00000080) ) applied to EDIT_TYPE_TEXT fields forces those fields to be password too.
Second, when using: Mail.InputType=Bit.OR(Mail.INPUT_TYPE_TEXT, 8192) for mail addresses, I get always the first character UpperCase.
Thanks in advance
 

GiovanniPolese

Well-Known Member
Licensed User
Longtime User
Yes, meanwhile I found solution in beginners guide. Only, for disabling the uppercase it is a Xor operation to apply, of course.
Thanks
 
Upvote 0

GiovanniPolese

Well-Known Member
Licensed User
Longtime User
Sorry, I did some confusion. If I set the bit for EMAIL_ADDRESS, the uppercase is always done. My problem is not to have the first character with UpperCase. So I applied a Xor with 0x0000020, but I guess that I simply obtained again a normal text field. In what consists the "specialization" of the EMAIL_ADDRESS?
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Upvote 0

GiovanniPolese

Well-Known Member
Licensed User
Longtime User
Hi Manfred
thanks for the reply. As a matter of fact I never minded about upper/lower case in email addresses. The question is pretty silly and doesn't deserve any attention, but your observation reinforces my naive observation:"why have a specialized input type mask, if it just makes the first char upper case?". There should be something else that I miss. Probably, but I didn't verify, in such a case some characters will not be accepted, I suppose. Anyway I will look at that library, that will be useful in any case. Have a nice day.
 
Upvote 0

AHilberink

Active Member
Licensed User
Longtime User
NO_SUGGESTIONS flag value is: 0x00080000

EMAIL_ADDRESS: 0x00000020

Hi,

I am using: eMail.InputType=Bit.Or(eMail.INPUT_TYPE_TEXT, 0x00000020)

As email type it's working fine. Now is my problem the field has suggestions of formal inputs. I don't want this. Is the NO_SUGGESTIONS useable as email?

Can someone tell me how to use these both together?

Best regards,
André
 
Upvote 0

AHilberink

Active Member
Licensed User
Longtime User
An easy solution is to use Masked EditText. No need to combine flags.

I just looked at your Masked EditText, but I cann't add the editfields by using the Designer. I have a very complex form and also scaling, so I need a normal editext.
I like your date field. This I can use :)

I hope there is also another option.

Thanks for your help.

Best regards,
André
 
Upvote 0

Informatix

Expert
Licensed User
Longtime User
I just looked at your Masked EditText, but I cann't add the editfields by using the Designer. I have a very complex form and also scaling, so I need a normal editext.
I like your date field. This I can use :)

I hope there is also another option.

Thanks for your help.

Best regards,
André
You can add the Masked EditText in your layouts with the designer as a custom view but you cannot set some of its properties this way; you have to set them by code.
 
Upvote 0

AHilberink

Active Member
Licensed User
Longtime User
Hi,

Can someone please help. I tried:
B4X:
eMail.InputType=Bit.Or(0x00080000, Bit.Or(eMail.INPUT_TYPE_TEXT,0x00000020))

but always a suggestion of old inputs.

Best regards,
André
 
Upvote 0

AHilberink

Active Member
Licensed User
Longtime User
Use the Masked Edit Text lib and set WithSuggestions to false.

Hi Informatix.

Using your Masked Edit Text lib has some limits for may usage.
1. There is no @ key on the keyboard
2. The mask is confusing for my formaly older users

I just solved my problem by Settings/Language/Suggestions OFF, but I hoped for an inside solution.

Is there no way to combine those 0x........ ??

Thanks for your suggestion :)
 
Upvote 0

Informatix

Expert
Licensed User
Longtime User
Hi Informatix.

Using your Masked Edit Text lib has some limits for may usage.
1. There is no @ key on the keyboard

What InputType do you set?

2. The mask is confusing for my formaly older users

??? I don't understand what you mean. If you don't want to use a mask, don't set one. By default, Masked EditText looks and behaves like an EditText (because it is just an EditText with added features).
 
Upvote 0

AHilberink

Active Member
Licensed User
Longtime User
What InputType do you set?



??? I don't understand what you mean. If you don't want to use a mask, don't set one. By default, Masked EditText looks and behaves like an EditText (because it is just an EditText with added features).

Hi Informatix,

1. The inputtype is a copy of your demo:
B4X:
    ET2.Initialize("ET2")
    ET2.Format = "Email: A???????????????@A???????????????"
    ET2.InputType = ET2.INPUT_TYPE_TEXT
    ET2.SingleLine = True
    ET2.Typeface = Typeface.MONOSPACE
    Activity.AddView(ET2, 0, 60dip, 100%x, 50dip)

My softkeyboard does't have a @ key, only the one above the 2 key. I need an inputtype email which has this key.

2. Sorry for my short notes and may be incorrect English. More explanation:
My users are of the age 60+. The mask of the example is "___________@_________" on my tab3. This is confusing for them. I need an empty EditText, with a keyboard with the @ key seperatly, without suggestions or thesaurus. This question is of the user themselves.

I hope you understand my problem and maybe there will be a solution.

Best regards,
André
 
Upvote 0

AHilberink

Active Member
Licensed User
Longtime User
Of course there's a solution. Use your own settings, not mine. :confused:

Hi Informatix,

Sorry if I insulted you. That was not my intention. I was just looking for a solution. You mentioned yours and I tried to explain why I think I cann't use it.

Best regards,
André
 
Upvote 0

Informatix

Expert
Licensed User
Longtime User
Hi Informatix,

Sorry if I insulted you. That was not my intention. I was just looking for a solution. You mentioned yours and I tried to explain why I think I cann't use it.

Best regards,
André
You have not insulted me. You just proved that you're very lazy. Is it so hard to test with your own settings to see if my library can suit your needs? You just ran the demo, understood nothing to what you saw, and drew wrong conclusions. It's not my problem, it's yours.
 
Upvote 0
Top