Wednesday, 15 February 2012

pixate - PixateFreestyle Android - App Crash -



pixate - PixateFreestyle Android - App Crash -

i have imported pixate freestyle android , able design buttons.

i experiencing app crash problem 1 time utilize next code

pixatefreestyle.init(this);

it works first time, , if access activity after using above code throws next runtime exception :

caused by: android.util.androidruntimeexception: requestfeature() must called before adding content @ com.android.internal.policy.impl.phonewindow.requestfeature(phonewindow.java:249)

if remove code pixatefreestyle.init(this); app working fine , normal.

kindly guide me if missing anything

i having same issue , found moving phone call requestwindowfeature() before phone call super.oncreate() fixed it. check calls contain requestfeature in activity crashing, , create calls before super.oncreate().

example:

change this:

@override public void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); requestwindowfeature(window.feature_action_bar); }

to this:

@override public void oncreate(bundle savedinstancestate) { requestwindowfeature(window.feature_action_bar); super.oncreate(savedinstancestate); }

pixate

No comments:

Post a Comment