Closed GoogleCodeExporter closed 9 years ago
Thank you for your suggestion!
I think we might be able to do something about thing, for instance by creating
a subclass of the custom view, inflating the layout and injecting the views.
Do you have a working example, or maybe a sample from some code repository, so
that we may have a global view on what's needed ?
Original comment by py.ricau
on 17 Apr 2011 at 1:50
A class of an application of mine: http://pastebin.com/a3QHu77C
Original comment by mail.mic...@gmail.com
on 17 Apr 2011 at 1:59
Thanks!
I think we could create a @ELayout annotation for classes that extend
ViewGroup. This annotation could take a layout id parameter.
We could then enable usage of @ViewById as well as events (e.g. @Click, @Touch,
etc). I don't know if usage of @Extra, @StringRes, @Background / @UiThread, and
@Services is actually a good idea or not (mixing view code with this kind of
code might not be a "good practice").
Please let me know what you think about this.
Original comment by py.ricau
on 17 Apr 2011 at 3:00
Original comment by py.ricau
on 17 Apr 2011 at 3:01
Original comment by py.ricau
on 17 Apr 2011 at 3:01
Yes sounds good. And you are right more logic at this place is maybe not a good
practice. But pushing it to activity is also not nice as i think. HArd to make
a good choice. Android itself does not force someone to have a good modularized
code. It tends to have enormous Activity classes.
Original comment by mail.mic...@gmail.com
on 17 Apr 2011 at 3:05
I had totally forgotten about this issue. @jzapata started working on a similar
idea in issue 113, and he'll integrate your ideas as well.
Original comment by py.ricau
on 19 Oct 2011 at 9:43
Original comment by py.ricau
on 20 Oct 2011 at 7:35
Original issue reported on code.google.com by
mail.mic...@gmail.com
on 17 Apr 2011 at 11:23