/** * Creates a new MessageFragment * @param messageId The message's id to display * @return messageFragment new MessageFragment */ public static MessageFragment NewInstance(string messageId) { MessageFragment message = new MessageFragment(); Bundle arguments = new Bundle(); arguments.PutString(MESSAGE_ID_KEY, messageId); message.Arguments = arguments; return(message); }
public Fragment GetItem(int position) { if (messages == null || position >= messages.Count) { return(null); } String messageId = messages [position].MessageId; MessageFragment fragment = MessageFragment.NewInstance(messageId); return(fragment); }