When writing code, do not want the whole project is full of yellow exclamation points, then, open the project, people feel that the whole project is not clear.
so write this post, will usually encounter the warning of all the summary together.
1:handler
This Handler class should is static or leaks might occur:incominghandler @SuppressLint ("Handlerleak") Private Handler ha Ndler = new Handler () {@Overridepublic void Handlemessage (Message msg) {};};
Workaround:
Private Handler Handler = new Handler (new Handler.callback () {@Overridepublic Boolean handlemessage (Message msg) {return F Alse;}});
2:simpledateformat
To get local formatting with getdateinstance (), getdatetimeinstance (),//or//Gettimeinstance (), or use new Simpledatef Ormat (String template,locale Locale) with for example locale.us for ASCII dates. @SuppressLint ("SimpleDateFormat") SimpleDateFormat SimpleDateFormat = new SimpleDateFormat ("Yyyy-mm-ddhh:mm:ss");
Workaround:
SimpleDateFormat Newsimpledateformat = new SimpleDateFormat ("yyyy mm month dd hh", Locale.getdefault ());
Android yellow warning hint of obsessive-compulsive disorder