Ejemplo n.º 1
0
    protected override RecordNoteBoxInput InstantiateInput()
    {
        //LayoutInflater inflater = (LayoutInflater)_context.ApplicationContext.GetSystemService(Context.LayoutInflaterService);
        View v = _inflater.Inflate(Resource.Layout.PagedFragmentRecordRecordNoteBoxInput, null);

        _pagedFragmentFieldInput = ((ViewGroup)v).FindViewById <PagedFragmentRecordNoteBoxInput>(Resource.Id.fi_record_note_box_input);
        ((ViewGroup)v).RemoveAllViews();
        _pagedFragmentFieldInput.OuterClass = this;
        return((RecordNoteBoxInput)_pagedFragmentFieldInput);
    }
    protected override RecordNoteBoxInput InstantiateInput()
    {
        // Since I was getting inflation exception when the layout file
        // PagedFragmentRecordRecordNoteBoxInput.axml had only a single, not wrapped in any ViewGroup, I had to
        // wrap it up in a linear layout (whatever). Since this view will be added somewhere else, it needs to
        // be removed from the wrapper (hence the call to RemoveAllViews - comment it out to see what happens).
        //LayoutInflater inflater = (LayoutInflater)_context.ApplicationContext.GetSystemService(Context.LayoutInflaterService);
        View v = _inflater.Inflate(Resource.Layout.PagedFragmentRecordRecordNoteBoxInput, null);

        _pagedFragmentFieldInput = ((ViewGroup)v).FindViewById <PagedFragmentRecordNoteBoxInput>(Resource.Id.fi_record_note_box_input);
        ((ViewGroup)v).RemoveAllViews();
        _pagedFragmentFieldInput.OuterClass = this;
        return((RecordNoteBoxInput)_pagedFragmentFieldInput);
    }