excilys/androidannotations — Issue #3: Annotations for fragments
Author: pyricau
Created: 2012-01-06 10:03:37+00:00
State: open
Labels: Enhancement

@pyricau, Apr 13, 2011

It would be nice to see if we can generate subclass for fragments, so support annotations such as @ViewById, @Click and others in fragments. The fragments would be annotated @EFragment.

We need to see if that's feasible, and how it would work. The generated code will have to work with 3.0 and pre 3.0 (ie support jar). To do so, we'll have to check the annotated fragment package, and see if it's "support" or android 3.0 package.

Fragments are created based on layout.xml files, so those layout will have to be updated to include the generated fragment instead of the original one. Which mean we may also add some checks (compile errors) to see if an original fragment is recorded instead of the generated one.

@fjjonesjr, Dec 22, 2011

Personally I think this priority should be high. This is a great framework, but of little use to modern implementations until fragment support is available. ICS exacerbates this greatly.

@pyricau, Dec 26, 2011
You are right, and it is indeed of high priority. I want this to be part of the next release.