Fragment Navigation delay - Android

52 views Asked by At

In my app I have custom bottom navigation bar with 4 menu item (Home, wash, crown, menu). Default screen was Home. When I click wash, crown, menu the respective fragment/screen loaded quick. But when I click Home from any of these (wash, crown, menu) screen, it takes around a second to switch to that screen. I have a recycler view, a image slider view, both with around 5-6 data. And a Linear layout with some elements. Even I have animation in bottom bar navigation button, when I click home animations wasn't smooth. but for other menu items it was smooth. What is the reason for this Delay.

Sometime Every time logcat print this, when I switch to home.

"2023-12-12 18:19:02.171 28866-28866 ViewTarget com.csam.demodev
Glide treats LayoutParams.WRAP_CONTENT as a request for an image the size of this device's screen dimensions. If you want to load the original image and are ok with the corresponding memory cost and OOMs (depending on the input size), use override(Target.SIZE_ORIGINAL). Otherwise, use LayoutParams.MATCH_PARENT, set layout_width and layout_height to fixed dimension, or use .override() with fixed dimensions.

Here is The code for this Fragment

0

There are 0 answers