Created
February 10, 2017 13:36
-
-
Save murano500k/4fbbf12d21ed120319e03d29c7289862 to your computer and use it in GitHub Desktop.
Convert array of parcelables from intent
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private PlayableItem[] toPlayableItems(Parcelable[] parcelables){ | |
PlayableItem[] objects = new PlayableItem[parcelables.length]; | |
System.arraycopy(parcelables, 0, objects, 0, parcelables.length); | |
return objects; | |
} | |
// usage | |
//playableItems = toPlayableItems( intent.getParcelableArrayExtra(ITEMS_LIST_EXTRA)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment