When my application loads a white screen is shown quickly. I changed some things so it is shorter now but I don't seem to be able to make it completely disappear.
I see almost all most apps have this sometimes (longer if phone has been turned off and so short it is not noticed if app has been started once alredy and then is started again). After the app has been run once it does not happen (is the app somehow still in memory maybe?).
So there is no way to get around that?
I do my initializing on a background thread so I am not blocking the UI.
I use one activity and many fragments.
I have tried not using a bitmap as background but instead just a color background but still it is slow so it is not the decoding.
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView( R.layout.loading_layout );
final FragmentManager fm = getSupportFragmentManager();
Fragment fragment = fm.findFragmentById(R.id.fragment_content);
if (fragment == null)
{
FragmentTransaction ft = fm.beginTransaction();
ft.add(R.id.fragment_content, new LoadingFragment());
ft.commit();
}
}