Skip to content

Conversation

@walfud
Copy link

@walfud walfud commented Aug 16, 2015

It's a pity that we treat all parameter as String type. So I introduce type into key declaration, such as

map("users/:defaultIsStringValue/i:intValue/l:longValue/f:floatValue/d:doubleValue/s:stringValue", UserActivity.class)

In this situation, we can get typed parameter from intent. For example, use

.getExtras().getInt("intValue")

to get an Integer value.

I keep the full compatibility to your original interface, and pass all original testing cases. Besides, I supply my testing cases to verify the typed parameter, and the mixed typed and none typed parameter.

walfud added 2 commits August 16, 2015 10:45
Introduce type into key declaration, such as `map("users/:defaultIsStringValue/i:intValue/l:longValue/f:floatValue/d:doubleValue/s:stringValue", UserActivity.class)`. To get typed parameter from intent, for example, use `.getExtras().getInt("intValue")` to get an `Integer` value.
@walfud
Copy link
Author

walfud commented Aug 18, 2015

This time, I did three things:
1, Modifty the 'README.md', introduce supporting of typed parameter.
2, Add @deprecated to some method. The global context is very bad design, and the worse, when used with startActivity, for more detail, see: http://possiblemobile.com/2013/06/context/
3. Replace TAB with 4 spaces.

At last, thanks for you good code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant