Xtendroid icon indicating copy to clipboard operation
Xtendroid copied to clipboard

@AndroidParcelable to check before adding blank constructor

Open tobykurien opened this issue 9 years ago • 2 comments

Currently it forcefully adds a blank constructor and doesn't allow you to add your own

tobykurien avatar Jan 26 '16 14:01 tobykurien

I tried fixing this today, but for some reason, the compiler does not acknowledge the empty ctors that were generated by the AndroidParcelable active annotation.

You may wanna have a go at it.

I don't know if it's a bug. We could throw an error if the user doesn't explicitly provide one.

Buggaboo avatar Jan 27 '16 17:01 Buggaboo

Not sure if we're missing each other - what I meant by this issue is that if I create a bean and add an empty constructor, then add the @AndroidParcelable annotation, I get a compile error because there are now 2 empty constructors. If @AndroidParcelable first checked that the empty c'tor exists, then it can bypass adding it's own, and hence no compile error :-)

tobykurien avatar Jan 28 '16 07:01 tobykurien