I started to profile my apps startup, and looks like side drawer com.google.android.material.navigation.NavigationView
takes quite a lot of time to inflate.
As the NavigationView is hidden when the app is started, I think it should be ok to delay it's inflation.
I tried to check ViewStub
or AsyncLayoutInflator
approach, but sill did not find nay usable way to make this work.
Is somebody successfully initializing NavigationView
asynchronously?
Update:
I use vector drawable icon in NavigationView menu items. Looks like those are the bottle neck here. Vector paths are not anything complex, maybe I try to simplify them or go with the png's...