I have a List that I want to convert into a String[] so that I can pass it as an extra with an intent.
List<String> votedBy = parseObject.getList("votedBy");
The intent logic:
Intent intent = new Intent(CommentActivity.this, UsersListActivity.class);
intent.putExtra(BundleConstants.KEY_LIST_TYPE, getString(R.string.voters));
intent.putExtra(BundleConstants.KEY_VOTERS_LIST, votedBy);
startActivity(intent);
My first thought was to convert the contents of the List to a String[], but that list is retrieved from a database and its size is not known apriori. One suggestion I had was to cast the votedBy List as Parcelable. I can't run the code at the moment so I'm not sure if that will work. What should I do here?