Testing the new UI

Before we proceed to testing the UI, let's add some delay to asyncFetchArticles() so that we can actually see the ProgressBar for some time before we display the data:

private fun asyncFetchArticles(feed: Feed,
dispatcher: CoroutineDispatcher) = async(dispatcher) {
delay(1000)
val builder = factory.newDocumentBuilder()
...
}

Now, when running the application, you will find that the news is actually being displayed along with the scrollbars on the side, indicating the current scrolling position. But if you scroll enough you will see some issues with some content:

At the time of writing, Instant Run doesn't work exceptionally well with applications that use coroutines. Please consider disabling it if you run into issues or exceptions.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.135.198.174