Single activity: Why, when, and how (Android Dev Summit '18)

preview_player
Показать описание
With the Navigation Architecture Component, developers have the tools to move towards a single activity structure for their app, but they don't know:

— why they should move to that model
— when it is appropriate
— how exactly to take advantage of that structure and migrate to it

Presented by: Ian Lake

#AndroidDevSummit event: Android Dev Summit 2018; re_ty: Publish; product: Android - Jetpack; fullname: Ian Lake;
Рекомендации по теме
Комментарии
Автор

I was really happy to share a lot of the best practices around activities, Fragments, Navigation, and most importantly *making your code testable*. Thanks for watching!

IanLake
Автор

One of the best videos so far of the Android Dev Summit '18. And probably the best speaker so far too. Clear, concise, to the point and relaxed. Very easy to follow and really well explained. Thanks Ian!!

Stilgarnaibfremen
Автор

Ian's videos are always my favourite 'cause he's always passinote and enthusiastic. Keep up the good work, you're amazing. And thanks for the video.

Rumikimoku
Автор

Have been using single activity pattern for a while (4 years or so). Banner ads can perform uninterrupted and register more impressions when a single activity pattern is employed.

famketheron
Автор

I'm pretty sure I'm fed up with Android. Been with it since 2009, but I think it's getting to a point where a lot of what I've spent years mastering are getting reworked, and I don't want to go through the struggles of mastering all this new stuff again. Not to mention all the new "gotcha's" that are going to come along with all these new APIs (remember when fragments came along?). Plus, while I'm busy as hell at work, on what do I spend the 30-45 minutes in the day to learn, Kotlin or Flutter?

You've been good and bad to me, Google. Maybe it's time we spend some time apart.

DeLL
Автор

Great talk! Can we find some sample app to get an idea of how all the pieces fit together? Sometimes I got lost with the code examples so having a little app to experiment with would greatly help me.

brainplot
Автор

how can we handle multiple backstack with Navigation component? can we handle multiple navigation graph with this ?

harshpatel-btwr
Автор

Its good practice to use two navigation(in two deferents activities ) in same app ?
example : one navigation for (register, login) and second navigation for (navigation drawer) ?

fidanbacaj
Автор

...
36:09 Dynamic Feature Modules
37:45 Thank you! (summary)

IlyaPaskhover
Автор

Ian's the best. His Udacity courses were great too :-). Now I'm off to bug my manager to make the app single activity haha.

PeterKeefe
Автор

What about destroying invisible activities and recreating them when user navigates back to it in order to save memory and resources? Did we stopped to care about that and expect phone manufactures to put more RAM in phones than we used to have in our computers?

radosawjuszczyk
Автор

Very nice, but what's happens when you have a app where some screens have a navbar or drawer and some screens do not? Can you really do the same with one activity

BoxingHacker
Автор

thanks for effort.
As a feedback:
As usual, it turned another Google presentation focused nothing. Atleast, as a developer I was expected to hear in depth about navigation.

FaisalMohammedtly
Автор

Not knowing that you don't know of what there is to know is easy once you know it!

maverikgames
Автор

How does this work with when you have app that supports phones and tablet. For example a master detail view on tablet?. In tablet we don't add or replace the fragment as master and detail fragment are side by side. Different navigation graph for phones and tablets??

raghuthetraveler
Автор

25:37: "Use cases for multiple activities"

UnreachabIeCode
Автор

Good practice in 2016, then become Bad practice in 2018 ... all things with google is strange ..

SofienRahmouni
Автор

How can we participate in google submit?

ranganrangan
Автор

For a real world app that has many screens to follow the Single Activity approach, I can think of two possible scenarios.
First, a single ViewModel is used and shared by all destinations. This single ViewModel is going to be bloated and not scalable. For this reason, I think the first approach is not suitable for real world development.
Second, multiple ViewModels are used. (Not necessary one ViewModel per destination but would be close.) Given the lifecycle of a ViewModel is tied to the lifecycle of the (single) Activity, how is a "cold" (instantiated by no longer needed) ViewModel going to be released?

haobinli
Автор

How to restrict fragment recreation in this architecture?

ranganrangan
welcome to shbcf.ru