2. Hello!
I Am Gabriele Vecchia
I am here because I love to give
presentations! No, really, I hope to give you
some useful tips to introduce you to
Android development.
You can find me at:
gabriele.vecchia91@gmail.com
4. WHERE WE START
We want to start the development of
an Android application for
◦ Our Startup
◦ University Projects
◦ Various jobs
◦ Personal Interest
5. WHAT WE WANT
Simplicity
We would have
the tools to start
to realize what
we have in mind,
but with the
lowest effort.
Adaptability
«“More” is best»!
More are the
device classes
that we support,
more user will
can use the
application.
Interfaces are
important for
the usability...
Modularity
Not only in the
“Code side” but
also in the User
Interface. We
can modularize
the activity in a
portion of UI.
Multiple
“activities” in the
same page.
7. KEY ASPECTS OF FRAGMENTS
If, on one side, we have that the
Activity are navigation controllers
on the other side the Fragments
are content controllers.
In “fragment-based” architecture,
the activities are for navigation
and the fragments are for views
and logic.
8. Pro
Fragments are
standalone
components that
can contain views,
events and logic.
Extends Activities
so they have all
them methods, but
we can execute a
fragment in a
portion of UI !
“BE OR NOT TO BE”
Cons
As a “Side-effect”,
they need a little
more attention
when implemented.
A specially attention
goes in their life-
cycles.
They are not well
suited if we need to
communicate
between them.
10. Fragments helps a lot with
optimizing for various screens,
they are easily managed by their
parent activity, can be reused,
combined and positioned at will.
WHY FRAGMENTS HERE?
17. ALTERNATIVE TO...?
No exist real alternative to Fragments.
Its possible to emulate, more or less,
them views and events behavior with:
●
Create ad-hoc Activities
●
WebApp loaded in the Application
●
Unity3D
But are really inefficient options!
18. FINAL CONSIDERATIONS
Launching a
separate
activity for each
app screen is
terribly
inefficient, since
the system will
try to keep
them in
memory as long
as it can.
Use Fragments
wherever is
possible!
Fragments can be
added to Activities
a runtime.
More study is
needed when the
developing starts,
but knowing how
to use them give
many advantages.
19. SOME USEFUL LINKS
For the template that I used visit:
https://developer.android.com/guide/components/fragments
SlideCarnival
For more details about Fragments
visit the link for the documentation: