New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compile helper #14
Comments
Sure you can, take a look at AndroidBundleDSL class |
the link is broken |
Sorry but I was from mobile, you can find it by path
|
@danielgomezrico I fixed the link, do you understand how to use these methods? |
Thanks 👍 ! but I don't, can you some me a little example? |
@danielgomezrico take a look: def map = [someKey: 'someValue', someKey2: 'someValue2'];
Bundle bundle = map.asBundle();
Bundle bundle1 = anyObject.fromMap([someKey: 'someValue', someKey2: 'someValue2']);
Bundle bundle2 = new Bundle();
bundle2.putFromMap([someKey: 'someValue', someKey2: 'someValue2']); but it will work only for groovy classes. For Java you should explicitly use it like this: Map bundleMap = new HashMap();
Bundle bundle1 = new Bundle();
AndroidBundleDSL.putFromMap(bundle1, bundleMap); and so on |
I need to add the cast to Parselable everytime that I will use it... is there any way to avoid this?
example:
intent.putExtra(DrawerActivity.BUNDLE_ORDER, (Parselable) actualOrder);
The text was updated successfully, but these errors were encountered: