java - Android Bundle is shares memory? -
I use setArgument () / getArgument () to pass data from one piece to another.
I stored the archives in the bundle called bundle. Input PurselBabelArealyst (), and I installed them - put data and received data - are equivalent to memory Generally, I think, Parslebl source and rebirth (through the Creator) example
If the memory bundle of shares, so many ways to support Datateps variety Bundle Why are- why not just give examples of objects or use generic on bundles?
Why there are several ways to support different types of dataTaps in the bundle - why not Use only generic on object examples or bundles?
If bundle
is only one way to have objects
class it would be awesome because it can be confusing to those diverse datatype systems programmers who are helping to make sure about the logic of the type that want to get it or take, to imagine the case where four programmers working on the project and object 1 programmer < Code> Bund le (eg Imagine this example bundle is only one way to put objects (polymorphism) in Class)
Bundle bundle = new Bundle (); Bundle Input object ("animal", new dog ());
And then one of the programmers wants to get this value and do this:
bundle bundle = meet (); Cat Variables = Bundle. Gate Object ("Animals"); // This would be an exception, since the logic that came back is not a Cat class.
This is the reason that the bundle
class has those methods to avoid such errors.
Now for next answer
>Or use generic on bundle?
Generic was created to avoid the use of casting, and I was created to help the programmer with the collection framework to avoid the problem like the description above.
Comments
Post a Comment