Android Tutorial | Navigation Framework with BackStack | CheezyCode (Hindi)

Поділитися
Вставка
  • Опубліковано 15 жов 2024
  • Android Tutorial For Beginners - Learn how to implement navigation framework in Android. Learn how to implement single activity and multiple fragments using navigation jetpack component. Learn what is NavHost, Fragment Container View, Navigation Graph in Android using this simple example. Learn what is backstack in Android with example. Learn step by step - how to create a fully functional android app with simple example in Hindi.
    Topics covered -
    1. Navigation Framework Introduction
    2. What is NavHost, NavGraph? Navigation Component Tutorial
    3. Learn how to define actions in navigation
    4. Navigation Controller using findNavController and navigate method.
    5. Learn BackStack in Android with example.
    Notes App Playlist -
    • Android Notes App with...
    Notes App Express API Playlist -
    • Express JS Tutorial Fo...
    Complete Dependency Injection Playlist Link -
    • Dagger 2 - Dependency ...
    Complete Android Architecture Components Playlist -
    • Android Architecture C...
    Beginner series in Android Playlist (Hindi) -
    • Android Tutorials Step...
    Kotlin Beginners Tutorial Series -
    • Kotlin Beginner Tutori...
    For more info - visit the below link
    www.cheezycode.com
    Source Code -
    github.com/Che...
    We are social. Follow us at -
    Facebook - / cheezycode
    Twitter - / cheezycode
    Instagram - / cheezycode

КОМЕНТАРІ • 96

  • @sanyamgoyal4878
    @sanyamgoyal4878 2 роки тому +1

    Simple, Short yet most powerful resources, probably the best channel for Android Resources🔥🔥🔥🔥

  • @shivagiri7406
    @shivagiri7406 2 роки тому +5

    Excellent video. Excellent Animations for explanation. Clean and neat. This is how you do a tutorial. Thank you Cheezy Code.

  • @ashokvlogs2024
    @ashokvlogs2024 2 роки тому +1

    Hiii sir very very..........100. Thanks so much....apka explain krne ka tarika bahut achchha h...

  • @bhushan2k
    @bhushan2k 8 місяців тому

    great explanation. any video of yours which I can refer to learn how to pass data in between?

  • @madhurivaghasana2820
    @madhurivaghasana2820 Рік тому

    thanks to share this video it helped me to solved my navhost error

  • @Shubhamkumar-ee8mi
    @Shubhamkumar-ee8mi 2 роки тому +1

    Thank You so much sir, for explaining like this, now we are waiting for next video on how to manage backstack to go previous fragment on button click

  • @apunichjohncena4533
    @apunichjohncena4533 2 роки тому +1

    Sir, while having more than one Activity and using the MVVM pattern, where should I handle the startActivity() method? in Activity class or ViewModel class? is it good to pass context to ViewModel? Or can I use the navigation component for Activities also?

  • @RavindraThoriya
    @RavindraThoriya 2 роки тому +1

    Simple and sweet👌 Keep it up👍🏻
    Can't wait for the next video, deep dive in the navigation framework

  • @cizor8616
    @cizor8616 2 роки тому +1

    Thanks a lot!
    I want to know the best way to handle a lot of navigations in MVVM pattern. Should we do on Fragment itself or we can somehow do it from viewmodel (Data binding)?

    • @CheezyCode
      @CheezyCode  2 роки тому +1

      Create a navigator class to handle navigation...

    • @cizor8616
      @cizor8616 2 роки тому

      @@CheezyCode Thanks a lot, I will do that

  • @raghu1077
    @raghu1077 2 роки тому +1

    Thank you for the timely upload.

  • @md.ashrafulalam3368
    @md.ashrafulalam3368 2 роки тому

    Thank you for excellent explanation ❤️, waiting for next video...

  • @ubaid25
    @ubaid25 2 роки тому

    Excellent well explained thank you so much

  • @sam-cq1cq
    @sam-cq1cq 2 роки тому

    Thank you
    Waiting for your next video

  • @ashokvlogs2024
    @ashokvlogs2024 2 роки тому +2

    Please sir .....junit test ,mockito and expreso per bhi video bnaiye............

    • @CheezyCode
      @CheezyCode  2 роки тому

      Yes bro...bas iske baad saare ye topics he h

  • @krishnakumar-kh5vo
    @krishnakumar-kh5vo 2 роки тому

    Got everything sir...but one doubt sir...when we go from one fragment to another fragment backstack is there.... but when we go from one activity to another activity, isn't there any backstack ???

    • @CheezyCode
      @CheezyCode  2 роки тому +1

      Yes..it is there for activity as well...since fragments ke baare mei baat kar rahe h toh fragment ke context mei btaya hai...it is by default feature from the beginning...

    • @krishnakumar-kh5vo
      @krishnakumar-kh5vo 2 роки тому +1

      @@CheezyCode got it, thanks sir...

  • @gagandaman77
    @gagandaman77 2 роки тому

    sir ek chiz btao , agar puri app mai only single activity use kre ham navigation graph use krke , or main screen mai after login or signup bottom nav ya drawer hoga to vo kha pe bnega jo activity hai vha pe ya new activity bnani pdegi ya fragment mai plz answer

    • @CheezyCode
      @CheezyCode  2 роки тому

      single activity se manage hojayega - 2 navigation graph bhi use kar skte hai - but to keep it simple try with 2 activities

  • @zeeshanalibtc
    @zeeshanalibtc 2 роки тому

    sir fragment fast open hotay hin ya activity?
    mtlb agr hm 10 say 15 pages ki app bna rahay hin to fragment use krin to button click krnay pay fast load ho ga ya activity fast open ho gi??
    2nd hm admob k banner ads lgatay hin to agr ads activity k start main hi load krwa dain to button click krnay pay activity boht slow open hoti ha. because pahlay ads load hota ha and bad main activity ka function. to isay fast krnay k leyah keya krin???????

    • @CheezyCode
      @CheezyCode  2 роки тому

      1. No difference. dono same he h.
      2. Load the ads asynchronously

  • @nabajyotigoswamiNalbari
    @nabajyotigoswamiNalbari Рік тому

    Navigation component recreates fragment after navigating from one to another fragment . Is it expected behaviour. I am seeing onCreateView if fragment called even on back stack . Is there any difference between using FragmentContainerView and fragments

    • @nabajyotigoswamiNalbari
      @nabajyotigoswamiNalbari Рік тому

      Instead of adding the new fragment it's replaced, so the fragment view is destroyed, onDestroyView() is called and onCreateView() is called when back is pressed to recreate the view. Not sure why it recreates fragment always rather than replacing as we did with FragmentTrasanction

  • @RadhaVaddireddy
    @RadhaVaddireddy Рік тому

    Looking for jetpack compose navigation, please create videos on jetpack compose

  • @rishikeshsingh9946
    @rishikeshsingh9946 2 роки тому +1

    awesome sir

  • @skjahirhossain5084
    @skjahirhossain5084 2 роки тому

    Sir i have two question.
    Mere 3 screen hai. Phale splash screen fir login aur akhir me home. Mai splash screen har bar dikhata hun. Par mai home screen se sabhi jaga jata hun. To mera starting destination kya hoga. Splash screen ya fir home screen

  • @ORitvikSardhyal
    @ORitvikSardhyal 2 роки тому

    Great 👍

  • @rishikeshsingh9946
    @rishikeshsingh9946 2 роки тому

    sir possible ho to youtube pr live ayeye...kuch random questions puchte hi

    • @CheezyCode
      @CheezyCode  2 роки тому +2

      yes planning both Live and Telegram Group

    • @rishikeshsingh9946
      @rishikeshsingh9946 2 роки тому

      @@CheezyCode okay sir thanku sir

    • @Anythiny
      @Anythiny 2 роки тому

      @@CheezyCode telgram group for doubt discussion is dire need ty sir

  • @arvindsingh34
    @arvindsingh34 2 роки тому

    Hi Sir,
    Thanks a log! for this amazing video.
    I have a query here regarding back stack in fragment. Suppose we start from loginFragment->mainFragment->noteFragment. If we navigate from noteFragment->loginFragment(might be by logout action) then how will work back stack in this case?. what mainFragament do exist in this case.

    • @CheezyCode
      @CheezyCode  2 роки тому +2

      1. Main fragment pe jaise he pahochege toh backstack khali kar dege. Kyoki main fragment se back button pe login screen nahi aani chaiye
      2. Now main se note pe jaate hai aur fir logout karte hai toh sab kuch pop kara denge... kyoki logout kiya hai...
      Ye cover karege - stay tuned for that.
      Waise just 2 aur properties hai - popUp and popUpToInclusive

    • @arvindsingh34
      @arvindsingh34 2 роки тому

      @@CheezyCode Thank you Sir ji

  • @TechnicalAkshay
    @TechnicalAkshay 6 місяців тому

    Sir why xml why not jetpack compose?

  • @anonymoususer6013
    @anonymoususer6013 2 роки тому

    Hii sir, agr hum 2 navigation graph use kre toh user 1st navgraph (userActionActivity and it have login & singupFragment) se 2nd navgraph(HomeActivity and it hav homeFragment and many more) pe jaa ke baad backbutton press kre toh wah 1st navgraph pr na aaye app homescreen pr hi close ho jaaye ye kaise hoge mujhe smjh nhi aa rha. maine app:popUpTo=""
    app:popUpToInclusive="" ko try kiya pr work nhi kr rha hai

  • @jadoein
    @jadoein 2 роки тому

    nicely explained👍

  • @safiullahmuhammad7002
    @safiullahmuhammad7002 2 роки тому

    Thanks Sir. 😊

  • @AkashJhaDDN
    @AkashJhaDDN 2 роки тому

    Kavi multiple file select kar ke any file aur selected file ko Recycleview me dikhane vala video v aap bana do

    • @CheezyCode
      @CheezyCode  2 роки тому

      Chalo karte hai try...but surely nahi pta kab tak 🤐

  • @chiragprajapati3989
    @chiragprajapati3989 2 роки тому

    Can we perform add fragment transactions in navigation? Because all transactions are replaced by default in navigation components.
    Thank you

    • @CheezyCode
      @CheezyCode  2 роки тому

      Any specific requirement? Dialogs can be used with the help of dialog destinations

    • @chiragprajapati3989
      @chiragprajapati3989 2 роки тому

      @@CheezyCode MainFragment has recyclerview having pagination now suppose I scrolled list so currently on 15th page if I click on item and go to DetailFragment and press back then MainFragment is reloaded due to replace and pagination start with page 1 so If we perform add operation then MainFragment will not be reloaded

    • @CheezyCode
      @CheezyCode  2 роки тому +1

      Got your problem...let me check

  • @sundern990
    @sundern990 2 роки тому

    Thank you 🙏🏻

  • @rishikeshsingh9946
    @rishikeshsingh9946 2 роки тому

    apke videos se dagger padh rha is time... thoda tuff lg rha start me ,,,kosis kr rha smgne ki

    • @CheezyCode
      @CheezyCode  2 роки тому +1

      hojayega...jahan samajh na aaye wahi ruk jao - socho aisa kyo bola hai ya kara hai...clear hojayega

    • @rishikeshsingh9946
      @rishikeshsingh9946 2 роки тому +1

      @@CheezyCode thankuuuuuuuuuuuuuuuuuuuuuuu sir

  • @sayyedaamerasharali7583
    @sayyedaamerasharali7583 2 роки тому

    Thanks a lot. I am having the issue with the gradle. I have the gradle file with new syntax i.e its not have " buildscript " instead it has " plugins " only. I have added the class path in the dependencies under buildscript. But while I am running the application it gives me the Error :
    Caused by: org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactResolveException: Could not resolve all files for configuration ':app:debugCompileClasspath'.
    I searched the solution and applied as well but I am still Stuck here.
    Please help me with this.
    Also will you please show how to use the new syntax of the gradle file.
    Thank a lot again for the best videos. 👍👍

    • @CheezyCode
      @CheezyCode  2 роки тому

      Hi Sayyed, Thanks for the update. I have not updated my android studio yet. Need to check this. Found one answer based on you error - stackoverflow.com/a/72588325 - Can you try this one? This is the recent answer

    • @sayyedaamerasharali7583
      @sayyedaamerasharali7583 2 роки тому

      @@CheezyCode I am extremely sorry its not the classpath its a spinkit dependency which causing the trouble. I am so sorry for this. 🙏
      Can you please tell which JDK version you are using and also when you update the studio please make the video on how to use new gradle syntax.
      Thank you for the reply and Sorry again for the trouble ....

    • @CheezyCode
      @CheezyCode  2 роки тому

      JDK 8

  • @skjahirhossain5084
    @skjahirhossain5084 2 роки тому

    Aur ek sawal hai.
    Agar mei home fragment se ek aur fragment me jana chata hun jinke andar 4 tab hai to us case me mei kaise navigate karunga

    • @CheezyCode
      @CheezyCode  2 роки тому +1

      Same he logic hoga...you can have nested fragments

    • @skjahirhossain5084
      @skjahirhossain5084 2 роки тому

      @@CheezyCode please make a video on nested fragment with tab layout alos. It is my request to you. I haven't find proper documentation of nested navigation with tab layout

  • @adnankhadim4077
    @adnankhadim4077 2 роки тому

    React native course b bnay gy ap?

    • @CheezyCode
      @CheezyCode  2 роки тому

      shayad nahi

    • @adnankhadim4077
      @adnankhadim4077 2 роки тому

      Ok but you are doing great in android I learned alot from your video thanks

    • @adnankhadim4077
      @adnankhadim4077 2 роки тому

      @@CheezyCode and do start list of compose

    • @CheezyCode
      @CheezyCode  2 роки тому +1

      yes bro...kuch pending topics hai android ke jo plan kare h - fir Compose he karenge

    • @rishikeshsingh9946
      @rishikeshsingh9946 2 роки тому

      @@CheezyCode superb......

  • @ChocoByte
    @ChocoByte 2 роки тому

    arguements in navigation ui video?

  • @tabishkhan2012
    @tabishkhan2012 2 роки тому

    While importing project showing this error unable to gradle
    "This version of the Android Support plugin for IntelliJ IDEA (or Android Studio) cannot open this project, please retry with version 2020.3.1 or newer."
    My Android Studio version 4.1.3
    I changed plugin version from project structure but same error shown again

    • @CheezyCode
      @CheezyCode  2 роки тому

      Update android studio and restart

    • @tabishkhan2012
      @tabishkhan2012 2 роки тому

      @@CheezyCode okay sir I ll let you knw about it thanks 👍

    • @tabishkhan2012
      @tabishkhan2012 2 роки тому

      @@CheezyCode Now working thanks :)

  • @quantumgaming7
    @quantumgaming7 2 роки тому

    please use viewbinding instead and you can pass layout file to Fragment constructer will save your onCreateView method

    • @CheezyCode
      @CheezyCode  2 роки тому

      yes...mentioned in the video - will be covering it in next video...

  • @anujkashyap1283
    @anujkashyap1283 2 роки тому

    Agar 3rd fragment se first fragment par jana hai aur previous fragment ko clear kaise krenge please guide me

  • @arundattkaushik7386
    @arundattkaushik7386 Рік тому

    ❤❤

  • @technicalgrowth1335
    @technicalgrowth1335 2 роки тому

    When i go from A is main fragment and jb B fragment to c me jata hu to crash ho jaa rhi h what to do

    • @CheezyCode
      @CheezyCode  2 роки тому +1

      Check the logcat what is the error

  • @luckykatariya2900
    @luckykatariya2900 2 роки тому

    👍

  • @ABHISHEKGUPTA-cu7ey
    @ABHISHEKGUPTA-cu7ey 2 роки тому

    Utha ke basta , naap ke rasta..sab koi chala aaya IT me, IT IT IT .....IT me :)

    • @CheezyCode
      @CheezyCode  2 роки тому

      haha...yes...mummy bole papa bole har koi hai ab IT mei

  • @itxblacky2
    @itxblacky2 7 місяців тому

    Just One minute think for that students who learn all these things by Paid 😂😂