jpvniekerk Active Member Licensed User Longtime User Apr 3, 2017 #1 I needed a TextEdit to behave as follows: Multiline Wrap text Capitalize each sentence Show "enter" button to allow new line in the TextEdit After struggling a lot with this combination, I finally got it working. My biggest problem was that it always wanted to force the "Done" button, which I don't want - I need the "Enter" button. This did the trick: Code: Copy Sub Activity_Resume txtEditBox.InputType = Bit.Or(txtEditBox.INPUT_TYPE_TEXT, 147457) End Sub It took a lot of playing around to get to the right code (147457). Is there a reference somewhere that gives the codes for all the different options? Johannes
I needed a TextEdit to behave as follows: Multiline Wrap text Capitalize each sentence Show "enter" button to allow new line in the TextEdit After struggling a lot with this combination, I finally got it working. My biggest problem was that it always wanted to force the "Done" button, which I don't want - I need the "Enter" button. This did the trick: Code: Copy Sub Activity_Resume txtEditBox.InputType = Bit.Or(txtEditBox.INPUT_TYPE_TEXT, 147457) End Sub It took a lot of playing around to get to the right code (147457). Is there a reference somewhere that gives the codes for all the different options? Johannes
Erel B4X founder Staff member Licensed User Longtime User Apr 3, 2017 #2 Moved to the questions forum. Upvote 0
JordiCP Expert Licensed User Longtime User Apr 3, 2017 #3 If we convert 147457d to hex we get 0x00024001 --> the meaning for each bit/flag set in this value is (According to https://developer.android.com/reference/android/text/InputType.html ) 0x00020000 = TYPE_TEXT_FLAG_MULTI_LINE 0x00004000 = TYPE_TEXT_FLAG_CAP_SENTENCES 0x00000001 = INPUT_TYPE_TEXT Upvote 0
If we convert 147457d to hex we get 0x00024001 --> the meaning for each bit/flag set in this value is (According to https://developer.android.com/reference/android/text/InputType.html ) 0x00020000 = TYPE_TEXT_FLAG_MULTI_LINE 0x00004000 = TYPE_TEXT_FLAG_CAP_SENTENCES 0x00000001 = INPUT_TYPE_TEXT
jpvniekerk Active Member Licensed User Longtime User Apr 3, 2017 #4 @JordiCP Thanks!!! That reference will come in handy in the future! Upvote 0