gdg-x / frisbee

[DEPRECATED] Android application for GDG members and organizers
https://play.google.com/store/apps/details?id=org.gdg.frisbee.android
Apache License 2.0
265 stars 169 forks source link

Define constants to use for putting and retrieving arguments #189

Closed ViliusKraujutis closed 9 years ago

ViliusKraujutis commented 9 years ago

In my company's A-Team, we always define constants for putting and retrieving values from getArguments().

I've noticed it's not practiced here: https://github.com/gdg-x/frisbee/pull/188#discussion_r24403811

I'd like to fix this. What do you think guys if (e.g. in this file) instead of:

arguments.putString("category", cat);
getArguments().getString("category")

would be:

private static final String ARGS_KEY_CATEGORY = "category"
arguments.putString(ARGS_KEY_CATEGORY, cat);
getArguments().getString(ARGS_KEY_CATEGORY)
HenriqueRocha commented 9 years ago

:+1:

friedger commented 9 years ago

Assigned to @ViliusKraujutis :-)

ViliusKraujutis commented 9 years ago

:+1: Thanks. Considering this as approval for this change. :)

friedger commented 9 years ago

Yes, keep the Pull Requests coming. This is a community effort.