How do you actually create an object of a class that implements Parcelable? There are lots of examples online that shows exactly what the class should look like, but I can't seem to find something on how to create the object.
If I have a class that implements Parcelable, and the contructor looks like this:
public class ResultForTeam implements Parcelable
{
String playerA, playerB, teamA, teamB, scores;
int playerA_games, playerB_games;
public ResultForTeam(Parcel in)
{
this.playerA = in.readString();
this.playerB = in.readString();
this.teamA = in.readString();
this.teamB = in.readString();
this.scores = in.readString();
this.playerA_games = in.readInt();
this.playerB_games = in.readInt();
}
how do I then make an object of this class somewhere else in my code? It used to be like this before I implemented Parcelable.
ResultForTeam newResult = new ResultForTeam(playerA, playerB, teamA, teamB, scores, playerA_games, playerB_games);