d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > First Android Project
Add Reply New Topic New Poll
Member
Posts: 1,968
Joined: Jul 5 2007
Gold: 0.00
Dec 5 2013 11:44pm
Hey everyone!

So this is my first real attempt at developing an Android application that I started working on a few week ago in my free time and I would love to get your feedback. For now, it's just a very minimalist Pokemon checklist made for Pokemon X/Y. Anyways, I'm looking for UI advice in particular but anything else such as bugs and suggestions are welcome as well.

If you want to look into the code, it's all available on github. I would love some programming critiques as well, apologies if the code's a bit of a mess right now :x
https://github.com/codennis/PokedeXY


Available for Android 4.0+ users.

Install:
https://play.google.com/store/apps/details?id=com.codennis.pokedexy&hl=en

Thanks for your time! :D
Cheers!
Member
Posts: 32,925
Joined: Jul 23 2006
Gold: 3,804.50
Dec 6 2013 12:20am
Code
private int getColor(String safari) {
if (safari.equals("Bug"))
return Color.parseColor("#A6B91A");
else if (safari.equals("Dark"))
return Color.parseColor("#705746");


Don't do that. use the color xml in your resources.

<color name="bug">#A6B91A</color>

then in java code, it's R.color.bug

http://developer.android.com/guide/topics/resources/more-resources.html#Color

This post was edited by carteblanche on Dec 6 2013 12:22am
Member
Posts: 1,968
Joined: Jul 5 2007
Gold: 0.00
Dec 6 2013 12:43am
Quote (carteblanche @ Dec 6 2013 01:20am)
Code
private int getColor(String safari) {
                if (safari.equals("Bug"))
                        return Color.parseColor("#A6B91A");
                else if (safari.equals("Dark"))
                        return Color.parseColor("#705746");


Don't do that. use the color xml in your resources.

<color name="bug">#A6B91A</color>

then in java code, it's R.color.bug

http://developer.android.com/guide/topics/resources/more-resources.html#Color


Ooh alright, that definitely makes it look much cleaner and more reusable. Thanks!
Go Back To Programming & Development Topic List
Add Reply New Topic New Poll