I am fetching a text file from storage and displaying its contents using Document View's setText()method. However, I noticed that setText() fails to display text sometimes. I tested it several times but once in a while, it just doesn't display anything. I don't get any errors/warnings and I verified that text is always fetched from text file and is not null or empty just before setText() is called.
I am fetching a text file from storage and displaying its contents using Document View's
setText()
method. However, I noticed thatsetText()
fails to display text sometimes. I tested it several times but once in a while, it just doesn't display anything. I don't get any errors/warnings and I verified that text is always fetched from text file and is not null or empty just beforesetText()
is called.My DocumentView looks like this :