public override Android.Support.V4.App.Fragment GetItem(int position) { string title = null; string description = null; switch (position) { case ID_DEFAULT: title = context.GetString(Resource.String.sample_title_default); description = context.GetString(Resource.String.sample_subtitle_default); break; case ID_STYLED: title = context.GetString(Resource.String.sample_title_attrs); description = context.GetString(Resource.String.sample_subtitle_attrs); break; case ID_CUSTOM_LAYOUT: title = context.GetString(Resource.String.sample_title_layout); description = context.GetString(Resource.String.sample_subtitle_layout); break; case ID_CUSTOM_VIEW_HOLDER: title = context.GetString(Resource.String.sample_title_holder); description = context.GetString(Resource.String.sample_subtitle_holder); break; case ID_CUSTOM_CONTENT: title = context.GetString(Resource.String.sample_title_custom_content); description = context.GetString(Resource.String.sample_subtitle_custom_content); break; } return(DemoCardFragment.NewInstance(position, title, description)); }
public static DemoCardFragment NewInstance(int id, string title, string description) { DemoCardFragment fragment = new DemoCardFragment(); Bundle args = new Bundle(); args.PutInt(ARG_ID, id); args.PutString(ARG_TITLE, title); args.PutString(ARG_DESCRIPTION, description); fragment.Arguments = args; return(fragment); }