routable-android icon indicating copy to clipboard operation
routable-android copied to clipboard

Extend typed parameter in Uri.

Open walfud opened this issue 9 years ago • 1 comments

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 avatar Aug 16 '15 02:08 walfud

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.

walfud avatar Aug 18 '15 07:08 walfud