Android Question Input Types for ViewsEx and Event Problem

epsharp

Member
Licensed User
Longtime User
I am trying to set multiple Input Types (All caps, 8192 and No suggestions, 524288). I have searched everywhere and can find no example of how to apply two (or more) input types to a field.

Along with the above, I added to the manifest:
SetActivityAttribute(main, android:windowSoftInputMode, adjustResize|stateHidden)
thinking this would stop suggestions everywhere (super desirable) but that didn't work either.

Using the ViewsEx Events, the code:

B4X:
Sub Dialog_FocusChanged(HasFocus As Boolean)
    Dim who As FloatLabeledEditText
    who = Sender
    Log(who & crlf & who.Tag)

(FloatLabeledEditText): Left=22, Top=11, Width=311, Height=111, Tag=t1
t1

B4X:
Sub Dialog_EnterPressed
    Dim who As FloatLabeledEditText
    who = Sender
    Log(who)

java.lang.ClassCastException: android.widget.EditText cannot be cast to com.wrapp.floatlabelededittext.FloatLabeledEditText

Changing the FloatLabelText to EditText stops the crash, but produces:

(EditText): Layout not available, Text=Aaron

Lastly, is there any why to "loop" through a whole dialog view to access all elements?

Any assistance would be greatly appreciated.

Regards

Ed Sharp
 

epsharp

Member
Licensed User
Longtime User
Update to the above.

The TextChanged Event behaves like the EnterPressed, but also shows an error (but does not crash).

(EditText): Layout not available
Unexpected event (missing RaiseSynchronousEvents): t1_textchanged
Check the unfiltered logs for the full stack trace.


This happens when I load information into the Dialog text fields (as in read from SQL, display and update)

Thanks in advance for any help.
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
SetActivityAttribute(main, android:windowSoftInputMode, adjustResize|stateHidden)
thinking this would stop suggestions everywhere (super desirable) but that didn't work either.
This line has nothing to do with suggestions.

What is the single question in this thread?

Start a new thread for any other question.
 
Upvote 0

epsharp

Member
Licensed User
Longtime User
My apologies.

The single question is how to set multiple Input Types (All caps, 8192 and No suggestions, 524288). I have
B4X:
    t2.EditText.InputType = Bit.Or(0x00002000, t2.EditText.InputType)
and would like to add 0x00080000.

Thank you in advance for your assistance
 
Upvote 0
Top