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?