public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // Use this to return your custom view for this Fragment // return inflater.Inflate(Resource.Layout.YourFragment, container, false); View view = inflater.Inflate(Resource.Layout.fragment_pro_type, null); progressBar = view.FindViewById<ProgressBar>(Resource.Id.progressBar); hint_img = view.FindViewById<ImageView>(Resource.Id.hint_img); listView = view.FindViewById<GridView>(Resource.Id.listView); typename = Arguments.GetString("typename"); view.FindViewById<TextView>(Resource.Id.toptype).Text = typename; GetTypeList(); adapter = new MyAdapter(Activity, list); listView.Adapter = adapter; listView.ItemClick += ListView_ItemClick; return view; }
public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // Use this to return your custom view for this Fragment // return inflater.Inflate(Resource.Layout.YourFragment, container, false); View view = inflater.Inflate(Resource.Layout.fragment_pro_type, null); progressBar = view.FindViewById <ProgressBar>(Resource.Id.progressBar); hint_img = view.FindViewById <ImageView>(Resource.Id.hint_img); listView = view.FindViewById <GridView>(Resource.Id.listView); typename = Arguments.GetString("typename"); view.FindViewById <TextView>(Resource.Id.toptype).Text = typename; GetTypeList(); adapter = new MyAdapter(Activity, list); listView.Adapter = adapter; listView.ItemClick += ListView_ItemClick; return(view); }