Home / Videos / Einzelaktivität: Warum, wann und wie (Android Dev Summit & # 39; 18)

Einzelaktivität: Warum, wann und wie (Android Dev Summit & # 39; 18)

Mit der Komponente "Navigationsarchitektur" haben Entwickler die Werkzeuge, um auf eine einzige Aktivitätsstruktur für ihre App zuzugreifen, aber sie wissen nicht:

Warum sollten sie zu diesem Modell wechseln
– wenn es angebracht ist
– wie genau man diese Struktur nutzt und dorthin migriert

Komponente Navigationsarchitektur →
Fragmente testen →

Präsentiert von: Ian Lake

Android Dev Summit '18 Wiedergabeliste für alle Sitzungen →
Abonniere den Android Channel! →


About AndroidWeltEditor

Check Also

Bild hinzufügen Android Studio-Anwendung | Anfänger

In diesem Video wird erklärt, wie Sie den Bilddateicode in ein XML Android Studio-Anwendungsprojekt einfügen.


  1. 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!

  2. This is WAY more confusing than Multiple Activity Development. Still interested in learning more though.

  3. 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.

  4. 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?

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

  6. 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

  7. Dynamic features must be able to add their graphs at build time rather than been hardcoded in base module. If feature is added to the build, the nav graph of that feature gets added to base nav graph. If feature goes away, the feature's nav graph goes away too.

  8. 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) ?

  9. 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.

  10. 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?

  11. If you want people to adopt your proposed practices such as only using documentLaunchMode rather than launchMode then perhaps you could write a consistent set of reference and guidance web pages. The current set are almost impossible to comprehend. Best of all is https://developer.android.com/guide/components/activities/tasks-and-back-stack which features a video presented by you and which completely fails to mention documentLaunchMode. And that page was last updated on 28th August 2018!

  12. Kotlin was the biggest mistake, believe me hybrid mobile application development is way better than kotlin

  13. 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.

  14. 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.

  15. 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.

  16. flutter or kotlin which is the future……………..

  17. 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??

  18. 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.

  19. hey Ian. quick question about loaders. Old loaders are deprecated, but the new one
    android.support.v4.app.LoaderManager.getInstance(this).initLoader(MY_DETAIL_LOADER_ID, bundle, this);
    is making new request on rotation change. The deprecated version is making request only once.

    So the question is how to make new loader (android.support.v4) make http request only once as deprecated one?

  20. Picture in picture mode is so broken

  21. 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!!

Leave a Reply

Your email address will not be published. Required fields are marked *