• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

How to display all my info on a multi line text

I'm trying to display all my sensors in a multi line textbox, I used "Multiline Text" as it was required for a programming assignment. Currently if I display it with my setText I think it's just rewriting the editText every time it loops in the For loop,

upload_2022-4-15_14-28-12.png

but the Log displays it just fine.

upload_2022-4-15_14-27-39.png


Can anyone suggest a method of displaying all the sensors in my multi line text? Thanks in advance. Here's my code for references:
upload_2022-4-15_14-29-35.png

upload_2022-4-15_14-30-6.png
 

Attachments

  • upload_2022-4-15_14-28-1.png
    upload_2022-4-15_14-28-1.png
    8.6 KB · Views: 101
strTotal = "";

...

for(...)
{
strTotal = strTotal + "\r\n" + sensor.getName();
ets.setText(strTotal);
Log.d ...
}
 
Back
Top Bottom