Closed benbaxter closed 4 years ago
Part of me wonders if we need to go through ViewModels to report this since it's specific to the UI/platform and doesn't really impact any business logic. Would it be enough to just rely on
doOnLayout
in our activities?
Good point! I removed the view model middle layer. Originally I thought multiple views would report when they had finished drawing but since doOnLayout
also handles when the subviews have completed layout, the complexity was greatly reduced.
Invoking
Activity#reportFullyDrawn()
once the data has been loaded and the screen has been rendered to the user.The entry points into the app are the OnboardingActivity, MainActivity, and SessionDetailsActvitiy. Each of these report when they have been fully drawn independently to the framework. The Android framework prints a log statement as follows:
This is used for measuring startup time and is a helpful signal when diagnosing startup performance issues. Check out the vitals documentation for more about the usage of
reportFullyDrawn()
.