canalrun Well-Known Member Licensed User Longtime User Apr 19, 2018 #1 Hello, I've searched this form, but my question is different from what most people ask and answers that are provided. I have a Multi-Line EditText that is sized to match almost the full size of the phones display. I am displaying the output of Speech Recognition. When new speech is recognized, the text is added to the end of the EditText and is scrolled into view by setting the selection start location – kind of like a video display terminal. This gives me a scrolling display of recognized speech. I have found that after an hour or two new speech stops being displayed in the EditText. If I clear the EditText, new speech is displayed as expected. I don't know if it's because: The text buffer of the EditText Is full. The EditText has reached the maximum number of characters it can display. The EditText has reached the maximum number of lines it can display. Does anyone know what the limits are for the total number of characters an edit text can hold, display, or number of lines it can display? Are these maximum values device or Android version dependent? Thanks, Barry.
Hello, I've searched this form, but my question is different from what most people ask and answers that are provided. I have a Multi-Line EditText that is sized to match almost the full size of the phones display. I am displaying the output of Speech Recognition. When new speech is recognized, the text is added to the end of the EditText and is scrolled into view by setting the selection start location – kind of like a video display terminal. This gives me a scrolling display of recognized speech. I have found that after an hour or two new speech stops being displayed in the EditText. If I clear the EditText, new speech is displayed as expected. I don't know if it's because: The text buffer of the EditText Is full. The EditText has reached the maximum number of characters it can display. The EditText has reached the maximum number of lines it can display. Does anyone know what the limits are for the total number of characters an edit text can hold, display, or number of lines it can display? Are these maximum values device or Android version dependent? Thanks, Barry.
Erel B4X founder Staff member Licensed User Longtime User Apr 19, 2018 #2 There are limits on some devices. It makes sense to control the string length: Code: If EditText1.Text.Length > 10000 Then EditText.Text = EditText.Text.Substring2(5000, EditText.Text.Length) Upvote 0
There are limits on some devices. It makes sense to control the string length: Code: If EditText1.Text.Length > 10000 Then EditText.Text = EditText.Text.Substring2(5000, EditText.Text.Length)
canalrun Well-Known Member Licensed User Longtime User Apr 19, 2018 #3 Erel said: There are limits on some devices. It makes sense to control the string length: Code: If EditText1.Text.Length > 10000 Then EditText.Text = EditText.Text.Substring2(5000, EditText.Text.Length) Click to expand... I have attached a really quick and dirty test app to test the maximum text length of an EditText. I get a maximum length of 10,500 characters on one phone, over 40,000 on a different phone. I use Erel's suggestion to limit the text length. This test app is also a good starting place if you need to develop a test app for testing some other feature of an EditText. Barry. Attachments edTxtTst.zip edTxtTst.zip 8 KB · Views: 478 Upvote 0
Erel said: There are limits on some devices. It makes sense to control the string length: Code: If EditText1.Text.Length > 10000 Then EditText.Text = EditText.Text.Substring2(5000, EditText.Text.Length) Click to expand... I have attached a really quick and dirty test app to test the maximum text length of an EditText. I get a maximum length of 10,500 characters on one phone, over 40,000 on a different phone. I use Erel's suggestion to limit the text length. This test app is also a good starting place if you need to develop a test app for testing some other feature of an EditText. Barry.