Skip to content
This repository was archived by the owner on Feb 26, 2023. It is now read-only.
This repository was archived by the owner on Feb 26, 2023. It is now read-only.

Layout with ListFragment #741

@Lochnair

Description

@Lochnair

This is the code AA generates for my fragment. Now if you extend Fragment that's fine, but when you extend ListFragment it's not, because the ListFragment implementation of onCreateView doesn't return null, like the Fragment implementation does.

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    contentView_ = super.onCreateView(inflater, container, savedInstanceState);
    if (contentView_ == null) {
        contentView_ = inflater.inflate(layout.simple_list, container, false);
    }
    return contentView_;
}

Currently I'm using this to make it work, though one could say it destroys the whole point of doing the layout the AA way.

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    return null;
}

If this was a design decision, why not add an optional boolean field to the annotation where you can tell AA to ignore super implementations.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions