Created by: smarek
Just to get your feedback, I'd like to fix as much of current code as possible with this style.
What I did
- Removed unused imports
- Removed unused class-global variables
- Removed dual
view.findViewByIdcall with same view id to search for - Handled unchecked type of
getSelectedItem()return - Handled issue, where
getSelectedItem()was called indoInBackground, violating this method should be called only from UI thread - Removed unecessary
returncall - Removed unused
countvariable - Avoided NPE on
result.close(); - Formatted both comments and code
Is there any reason, why I shouldn't do this like this, or possible, at all?