ViewPager2 with Navigation Component - Onboarding Screens | Android Studio Tutorial

Поделиться
HTML-код
  • Опубликовано: 23 ноя 2024

Комментарии • 131

  • @infsamples460
    @infsamples460 3 года назад +3

    You are a life saver! Excellent tutorial. Thanks a lot.

  • @bjugdbjk
    @bjugdbjk 3 года назад +2

    Wow ..hell lot of crazy concepts covered in super simple way, Thanks a lot, and the best part is u did all the complex stuff using nav graph console not from the Kotlin code, That was really useful..Thanks again.

  • @l1keeN
    @l1keeN 7 месяцев назад

    Great tutorial! Small and simple but very functuional project. Exactly what i needed

  • @VenewebTV
    @VenewebTV 2 года назад +1

    As always your videos are very educational and useful, I learned a lot. Keep growing. I wish you success on your channel, of which I am one more subscriber. Greetings from Caracas, Venezuela

  • @RodrigoGTomaz
    @RodrigoGTomaz 4 года назад +2

    You've been helping me constantly with your very good video tutorials! Thank you very much!

  • @randy4443
    @randy4443 3 года назад

    theses videos are really helpful. I was working on a totally different project and was having with viewpager inside fragment

  • @anayurquina6293
    @anayurquina6293 4 года назад

    Thank you very much !!! I needed help ... I made my app with ViewPager and wanted to migrate to ViewPager2 but it didn't work. I didn't know why. You saved me!

  • @cvtamilkannan4670
    @cvtamilkannan4670 3 года назад

    We shall keep supporting you

  • @baklazhann
    @baklazhann Год назад

    you are the best, for honest!!! thanks for your videos, bro!!!

  • @ravindraghate2814
    @ravindraghate2814 3 года назад

    thanks stevdza-san you are amazing

  • @abdelazizkhalid4231
    @abdelazizkhalid4231 Год назад

    man i love your tutorials

  • @jeanlucrotolo3525
    @jeanlucrotolo3525 3 года назад +4

    You should have also included the onBackPressedDispatcher method to handle back press events while in the onboarding pages

  • @progtom7585
    @progtom7585 3 года назад

    the first youtube video ive had to slow down 🤣
    thanks heaps for the video

  • @weistkfly
    @weistkfly 4 года назад +1

    These videos makes me like android even more, thank you!

    • @ravindraghate2814
      @ravindraghate2814 3 года назад

      Hey i am facing problem about viewpager2 it's kotlin file didn't get id of its XML file
      View.viewPager.adapter = adapter
      Id is still present in XML file how to solve it

    • @its-shubham
      @its-shubham 2 года назад

      @@ravindraghate2814 hey did you found any solution yet?

  • @jd-chnl
    @jd-chnl 3 месяца назад

    Looks good👍 Thanks for sharing!
    One note: how can we avoid of creating of 3 equal fragments to comply with DRY concept? Is it possible to store data for slider in the array and make a slide prototype to just fill it with appropriate data on demand?

  • @cvtamilkannan4670
    @cvtamilkannan4670 3 года назад

    Thanks for all your videos brother
    Keep rocking

  • @harwinderbenipal5332
    @harwinderbenipal5332 Год назад +1

    Great presentation. I have some doubts if you dont mind. What if i want to add information collection fragments as onboarding screens for examlple asking to select country or language? Should i go the same way. and secodn thing is when we are redirected to home fragment how to play with bottom nav bar to switch between fragments like home, favorite and more

  • @ErtBaran
    @ErtBaran 3 года назад +1

    That was clear and complete. Thank you very very very much :)

  • @sertunc-k5o
    @sertunc-k5o 4 года назад +1

    you always share the things we need, thank you my friend, you are awesome

  • @Lowbob55
    @Lowbob55 3 года назад +24

    17 minute video - "Ah that's gonna be a quick one."
    2 hours later - "Wait, what...?" *video paused for the 300th time*
    so much information 😂 but helped me very well

  • @lu93
    @lu93 3 года назад +3

    HELP ME PLEASE: There is an error message:
    E/RecyclerView: No adapter attached; skipping layout
    How can i fix this error?
    I think this error regards to the code line from ViewPagerFragments:
    view.findViewById(R.id.viewPager).adapter = adapter

  • @mozhdehnouri4931
    @mozhdehnouri4931 4 года назад +1

    Very cool and easy to learn!! thank you

  • @ArjunVerma-lq4cf
    @ArjunVerma-lq4cf 4 года назад +1

    Hey really great video keep up the good work. If you want one suggestion what you can do is make things like these in one video and explain the things used like view pager 2 in detail in another video.

  • @AbdulRehman-py7yj
    @AbdulRehman-py7yj Год назад

    seeing this tutorial reminds me of how much I hate android development but have to do it bcs I have no other option.

  • @rafaeldias8671
    @rafaeldias8671 4 года назад +3

    Sensacional. Parabéns pelo excelente conteúdo. ♡

  • @VlVALDl
    @VlVALDl 2 года назад

    Greatest tutorial! Thanks a lot, dude!

  • @RealformStudioXR
    @RealformStudioXR 4 месяца назад

    I was doing today something similar but im still struggling cos i was working on compose and the thing is that once my variable that handles the final destination for the navhost , it loads first the onboarding screens and later the home... Any idea what could be going wrong? Thanks for your content

  • @preetishsrivastav9785
    @preetishsrivastav9785 Год назад

    You are a life saver ❤️

  • @Droidkris
    @Droidkris 3 года назад

    One word! Excellent!

  • @jeetshah3373
    @jeetshah3373 Год назад

    super explanation sir..

  • @ismailkoyuncu5518
    @ismailkoyuncu5518 3 года назад

    Tanks for tutorial. I want ask you something.For the responsive desing... background picture which one the hdpi to use should to be ?

  • @alexhaifa
    @alexhaifa Год назад

    Your video is very good! Thanks for teaching us on this issue.
    I downloaded your project from guit and tried to open it in Android Studio Giraffe 2023 - Unfortunately, it didn't work and as I am a newbie in Android Studio, I wasn't able to fix it.
    Could you try to open it in Android Studio updated and fix it?
    Regards
    Alex from Brazil

  • @stocklin9831
    @stocklin9831 5 месяцев назад

    At 11 minutes and 40 seconds, what plug-in do you use to generate SharedPreferences?
    Thanks

  • @maqcoders8148
    @maqcoders8148 Год назад

    Thanks, amazing tutorial.
    can we add a bottom navigation view or drawer layout on the home screen which you have shown in the previous video?
    how can we handle navigation for those as well?
    if possible, please make a video that covers these scenarios as well. it will help for beginners like me.
    any hints will also be fine.
    thank you!

  • @gauravmaurya8602
    @gauravmaurya8602 4 года назад +2

    Can you please make video on scrollable bottom navigation drawer
    ..
    Like which is present in photo editor app

  • @1719pankaj
    @1719pankaj 3 года назад +1

    What if I don't have a splash screen at all?
    Is there a way to just change the home destination after first run?

  • @youngindiapoetry3648
    @youngindiapoetry3648 3 года назад +6

    If anyone's facing an issue setting up the view pager adapter value, do check that you have the 'kotlin-android-extensions' plugin added to your app.gradle file.

  • @tejasjani2544
    @tejasjani2544 3 года назад

    You make my day

  • @romipatel3254
    @romipatel3254 4 года назад +2

    Hi @Stevdza-San
    This is amazing helping me a lot.
    However, I have questions
    So instead of home fragment I did empty activity and last bit of video where it nav back to the onboarding screen. It still happen to mine so it navigate to the finish onboarding screen if I click back.
    Also I am able to scroll the screen without click on "Next"
    Not sure why, could you please help here.
    Thank you

  • @samstoyroom
    @samstoyroom 3 года назад

    Great tutorial! Btw, may I know your screen recording software, please?

  • @ErikSusanto-b9f
    @ErikSusanto-b9f Год назад +1

    i have a problem in the ViewPagerFragment, at the view.viewPager.adapter = adapter, the viewPager always error

  • @iJuce
    @iJuce 3 года назад

    it worked, thanks!

  • @2004michaelpeer
    @2004michaelpeer 4 года назад

    Great Video, looking forward to more content

  • @iabrarabr8609
    @iabrarabr8609 3 года назад

    if I want to remove one of those fragment how could I do that ?? .. I mean I did as you do but in my app inside each fragment there is a counter where user can press and it count.. I wanted if it reached certain number that fragment will be removed.. do you know how I may do that? .. Thank you I love your channel I have learned a lot

  • @gaddam.rajeshkumar
    @gaddam.rajeshkumar 3 года назад

    Awesome. Could you please let me know, how to remove and add fragments.

  • @MohitYadav-ve3jn
    @MohitYadav-ve3jn 3 года назад

    awesome video but the app crashes when screen is rotated. i too have been working for few days to handle screen orientation change , it would be great if u could shed some light on it

  • @fzn125
    @fzn125 2 года назад

    For new version add : if (isAdded) before Handler in SplashFragment

  • @anyiamoscar8832
    @anyiamoscar8832 3 года назад

    awesome nice , very helpful

  • @serdarbilgili88
    @serdarbilgili88 4 года назад +1

    Can you explain the email verification system and communication screen in the next video?

  • @jeckonly5853
    @jeckonly5853 3 года назад

    good,you help me a lot!

  • @binaryshrey2291
    @binaryshrey2291 Год назад +1

    The tutorial works well under normal circumstances, but has a major flaw when one rotates the screen. The app crashes with null exception as its not able to get the id of the viewpager

    • @MohitYadav-or4kn
      @MohitYadav-or4kn Год назад

      maybe viewModel and Live data can solve this problem

  • @pallabjr8428
    @pallabjr8428 3 года назад

    you are awesome man

  • @jalajgambhir.1
    @jalajgambhir.1 4 года назад

    Hi,
    I have two ViewPager2 layouts, one is a vertical scrollable one and the other is a card stack like layout. I want to include both these ViewPager2 layouts inside a root Recycler View. How can this be done? Any suggestions? Thanks!

  • @sid00760
    @sid00760 4 года назад

    Loved it 🙌🏻😍

  • @Bloggerlar_xayoti
    @Bloggerlar_xayoti 3 года назад

    Thank you Bro

  • @korolli4628
    @korolli4628 3 года назад

    hi there,I have a question,my app logic is splashFragment->loginFragment->mainFragment,but my mainFragment is contain a BottomNavigationView, how can i do this,please help me

  • @shashankgupta006
    @shashankgupta006 3 года назад

    Nice tutorial.

  • @67Diadem
    @67Diadem 3 года назад

    Can we put edit text on Onboarding screens, I mean app can take user input and press next and again input from user then next and so on..

  • @whocodes9747
    @whocodes9747 4 года назад

    THANK U SO MUCH!

  • @waynemutai3341
    @waynemutai3341 4 года назад

    Thank you so much

  • @SuperMarkwel
    @SuperMarkwel 4 года назад

    thx man, very cool

  • @БогданДондук
    @БогданДондук 4 года назад

    Thanks, amazing tutorial. Could you tell how to make such vector drawables?

  • @AndroidTutorialsyt
    @AndroidTutorialsyt 3 года назад

    How to get more illustration as you have on the onboarding screen.

  • @nimazero9129
    @nimazero9129 3 года назад

    I have a problem, so my home screen does not fragment and its activity so the popup method is not going to work, I wonder there is any solution for that???

  • @ayushranjan3472
    @ayushranjan3472 3 года назад +2

    6:48 xml name-> viewPager is showing unresolved reference. Please help!!!!

    • @StevdzaSan
      @StevdzaSan  3 года назад +1

      Kotlinx.synthetic is deprecated, use View Binding instead. I already made a video about it.

  • @imene9939
    @imene9939 2 года назад

    Hi sir ! i want to call 3 screens from home, i'm using java and binding to get id of viewPager.
    What i need is how can i convert this instruction
    "viewPager = activity?.findViewById(R.id.viewPager) "?
    could you help me, please?

  • @muhammedhalilakkaynak4619
    @muhammedhalilakkaynak4619 3 года назад

    thanks for tutorial

  • @ri7az
    @ri7az 3 года назад

    with splash screen.
    thanks so much

  • @jerrymatera
    @jerrymatera 3 года назад +1

    how about working with kotlin viewBinding
    `binding.root.rootView.findViewById(R.id.viewPager).currentItem = 1`
    works for me

  • @Roosevelth
    @Roosevelth 4 года назад

    hello, I have the same problem 7:47 in that minute how can I solve it, and not only that also when I put some images in other activities I get the same error problem in the application would help me a lot thanks.

  • @Njay-music
    @Njay-music 4 года назад +2

    wish i had it in java

  • @robertosanabria2023
    @robertosanabria2023 2 года назад

    Thanks for the video.
    Im gettin next error : "Unresolved reference: viewPager" help please!

    • @andrea17FJ
      @andrea17FJ 2 года назад

      I have the same problem :(

  • @MrRahulmalik
    @MrRahulmalik 4 года назад

    Nice video!

  • @nghiemmanhhung6100
    @nghiemmanhhung6100 3 года назад +1

    greatful

  • @Binary2.0
    @Binary2.0 3 года назад

    Bro when type arraylistof in my ide it get red and Says unable to resolve

  • @ravindraghate2814
    @ravindraghate2814 3 года назад

    please make video on handler deprecated

  • @whocodes9747
    @whocodes9747 4 года назад

    ADAMSIN SEN LAN ADAAAAAMMMMM

  • @versatileman6129
    @versatileman6129 2 года назад +1

    Спасибо большое)

  • @DiamodChorobekov
    @DiamodChorobekov 11 месяцев назад

    thanks

  • @dagurarnason9224
    @dagurarnason9224 4 года назад +1

    i can't seem to reference the viewPager id inside ViewPagerFragment, any idea how to resolve this?

    • @Firentis1
      @Firentis1 4 года назад +3

      Had the same problem - just add to build.gradle:
      apply plugin: 'kotlin-android-extensions'

    • @jadephillips
      @jadephillips 3 года назад +1

      @@Firentis1 THANK YOU!!!

    • @feyyaz3559
      @feyyaz3559 3 года назад +1

      You should use View Binding. I had a same problem and i solved it with this. Here you go: developer.android.com/topic/libraries/view-binding

  • @footballCartoon91
    @footballCartoon91 3 года назад

    That ":" is really confusing me..
    It can be anything like "extends", "object", or "variable".
    For object, for example :
    @Override
    OnCreate(Bundle: ?savedInstanceState){super(savedInstanceState);
    }

  • @hojatghanbarzadeh17
    @hojatghanbarzadeh17 3 года назад

    How transfer from activity to fragment in another activity?

  • @CeciLWeb
    @CeciLWeb 2 года назад

    The app encounters an error when you turn the phone. Because live data is not used :(

  • @isawitbfore
    @isawitbfore 2 года назад

    can anyone tell me how to make it back to homeFragment without having splashFragment first?

  • @rajaazrol9790
    @rajaazrol9790 2 года назад

    i cannot declalare view.viewPager...its said unresolved refference....anyone know the solution?

  • @ravindraghate2814
    @ravindraghate2814 3 года назад

    Viewpager id it does not acces in viewpagerfragment.kt how to solve it

  • @venkateshkoppisetti9935
    @venkateshkoppisetti9935 2 года назад +1

    Iam gettin error viewpager in viewpagerfragment and next in first screen and next in second screen and finish in third screen plz help me

    • @markmagallanes6185
      @markmagallanes6185 2 года назад +1

      Yes, same here. Same error I am getting. Please help

    • @venkateshkoppisetti9935
      @venkateshkoppisetti9935 2 года назад +1

      @@markmagallanes6185 now android syntax main is disparated in java we can't use it . Use view binding instead of it ✅✅

    • @markmagallanes6185
      @markmagallanes6185 2 года назад +1

      @@venkateshkoppisetti9935 ok thank you for replying. I’m a little confused, is there another video I could follow that you know of on here?

  • @techcollege3762
    @techcollege3762 3 года назад

    u did not initialize the life cycle before passing to adapter

  • @its-shubham
    @its-shubham 2 года назад

    getting error Type mismatch: inferred type is ViewPagerAdapter but PagerAdapter? was expected

  • @ayushranjan3472
    @ayushranjan3472 3 года назад

    9:23 as Kotlinx.synthetic is deprecated, how to navigate from screenOne to screenTwo with textView onClickListener.

    • @StevdzaSan
      @StevdzaSan  3 года назад

      I already made a video about migrating from Kotlinx.synthetic.

    • @ayushranjan3472
      @ayushranjan3472 3 года назад

      @@StevdzaSan I am sorry to disturb you again but i am not able to navigate from page 1 to page 2

  • @sandhunba
    @sandhunba 3 года назад +1

    no java :(

  • @wonmirzo
    @wonmirzo 2 года назад

    sensacional

  • @newuser4633
    @newuser4633 3 года назад

    The app crashes when screen is rotated, any help?

  • @abghifareihand
    @abghifareihand 3 года назад

    With dots?

  • @dung_gl
    @dung_gl 3 года назад

    How to use BottomNavigation with ViewPager?

  • @rikanuradila6175
    @rikanuradila6175 2 года назад

    this is java/kotlin?

  • @stunnaman8803
    @stunnaman8803 4 года назад

    My huge problem now is, how can we move back to an activity from the last fragment

    • @tarmagoyf95
      @tarmagoyf95 4 года назад +1

      //add this code to the method of the event who controls the end of tutorial
      i = Intent(this, MyActivity::class.java)
      activity?.startActivity(i)
      activity?.finish()

    • @stunnaman8803
      @stunnaman8803 4 года назад

      @@tarmagoyf95 I want to move from the third screen to an activity when I click the finish button. And replace that home fragment with an activity.
      So do you mean in the third screen fragment. Instead of writing findNavController(). navigate (R.id.action_viewPagerfragment_to_homeFragment) I should replace here with the code you just given to me?

    • @cagataya9792
      @cagataya9792 2 года назад

      @@stunnaman8803 Hi, I have the same problem, want to start an activity or turn back to MainActivity but cannot... Did you solve the problem ?

  • @philanthropist91
    @philanthropist91 3 года назад

    this will not work if we want multiple navigations

  • @zeeshanali-uq8tz
    @zeeshanali-uq8tz 4 года назад

    how to download that drawings

  • @purple66666
    @purple66666 11 месяцев назад

    You are doing something wrong: There should be no fragmet list in the adapter. Keeping track of fragment's state is the supportFragmentManager's job. On createfragment method you must use the fragment manager to populate your viewpager otherwise there will be a lot of problems when the app has changing configurations. Eg:
    "if(position == ENumTabs.LOGIN.ordinal)
    supportFragmentManager.fragmentFactory.instantiate(context.classLoader,LoginFragment::class.java.name)"
    This is especially obvious when you have many fragments like for example when creating a pamflet
    The fragment manager will know to inflate or destroy the chosen fragment and the ones imeddiatly newar it and to destroy the ones that are too far from the current position.
    Your current implementations requires you instantiate all of them at once.