android - Using Static Application Context -


i having issue handler returning during screen rotation, meaning activity had not been created yet , causing error.

i solved via post: static way 'context' on android?

which sets application level static context use. wanted know how safe use , if there instances shouldn't use this, don't entirely understand it.

thanks,

kevin.

no, horrible way solve it. means you're using application context instead of activity context, wrong , can cause memory leaks. correct way either check condition before ding can cause error, or catch exception caused , eat it.

really best way solve turn off activity recreation on rotation , has been stupid idiotic idea google.


Comments

Popular posts from this blog

java - HTTP Status 500 - An exception occurred processing JSP page /second.jsp at line 15 -

php - Using str_replace to translate a MySQL Table in html -

asp.net mvc - Cannot display error message on Editor or EditorFor -