3

As per the answer here How to make fragments load faster? I put all tasks in an async task and still there's a delay while loading fragment. The fragment is a calculator, with 30 buttons and two text views.

I have a sliding drawer and the delay occurs when I choose the item that opens the calculator fragment. The sliding drawer lags while returning to hidden position.

I use fragmentTransaction.replace(R.id.content_frame, calc_frag) in a fragment activity to load the fragment.

I removed all the code in the fragment except inflating the layout. Lag.

How I get rid of the delay/lag?

Community
  • 1
  • 1
Frozen Crayon
  • 5,172
  • 8
  • 36
  • 71

1 Answers1

0

Without code its hard to say, maybe you should look at ProgressBar and hold on showing the fragment until the contents have fully loaded?

Joe Birch
  • 371
  • 2
  • 7