• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps ventdroid: please help to improve the code

beqa

Lurker
hello all.

i am new in android development, and want to get some advices to improve the code.


please help me to do it.

look at this files and please give advices what can be done better.


thank you.
 

Attachments

I've superficially scanned through the code and have a couple of cosmetic comments:-

- Indentation not consistent. May be it's the editor I'm using, but looks a bit messy in places.
- No Javadoc comments.
- Some of your methods are too long for my liking. Consider refactoring for shorter methods.
- You have some magic numbers sprinkled through the code e.g.
Code:
seek.setMax(158);
Code:
seekBar.setProgress(158);
- No default option on switch statements
- This looks very dodgy, where's the opening bracket of the if statement? In fact, does that even compile?!

Code:
if (sounds.get(SOUND_VOICETXOFF) != 0)
                audioIcons.play(sounds.get(SOUND_VOICETXOFF), 1.0f, 1.0f, 0, 0, 1.0f);

There are tools to check code correctness. Have you used findBugs? It's a lint style code checker for Java.
 
Back
Top Bottom