public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { var view = inflater.Inflate(Resource.Layout.fragment_home, container, false); var toolbar = view.FindViewById <Toolbar>(Resource.Id.toolbar_home); toolbar.Title = "Index"; HasOptionsMenu = true; FragmentActivity activity = this.Activity; activity.SetActionBar(toolbar); return(view); }
public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // Use this to return your custom view for this Fragment var view = inflater.Inflate(Resource.Layout.fragment_chat, container, false); var toolbar = view.FindViewById <Toolbar>(Resource.Id.toolbar_chat); toolbar.Title = "Chats"; HasOptionsMenu = true; FragmentActivity activity = this.Activity; activity.SetActionBar(toolbar); chats = view.FindViewById <ListView>(Resource.Id.list_recentChats); adapter_friendChats = new Adapter_FriendChat(this.Activity); chats.Adapter = adapter_friendChats; return(view); }