FRAGMENTS - Android Fundamentals

แชร์
ฝัง
  • เผยแพร่เมื่อ 1 ต.ค. 2024
  • In this video you will get to know the concept of fragments and how to actually use them in our app.
    ⭐ Get certificates for your future job
    ⭐ Save countless hours of time
    ⭐ 100% money back guarantee for 30 days
    ⭐ Become a professional Android developer now:
    pl-coding.com/...
    Get my FREE PDF about 20 things you should never do in Jetpack Compose:
    pl-coding.com/...
    💻 Let me personally review your code and provide individual feedback, so it won't backfire and cost you a fortune in future:
    elopage.com/s/...
    Regular Android tutorials on my Instagram: / philipplackner_official
    Checkout my GitHub: github.com/phi...
    You like my free content? Here you can me a coffee:
    www.buymeacoff...

ความคิดเห็น • 413

  • @xTwisteDx
    @xTwisteDx 4 ปีที่แล้ว +162

    WOW! Fantastic video. This explained fragments better than my instructors by a massive margin. Keep up the great work!

    • @PhilippLackner
      @PhilippLackner  4 ปีที่แล้ว +14

      Thank you so much for your awesome feedback man, that makes me really happy and I'm glad it helped you!!

    • @pieror.pinatelli1341
      @pieror.pinatelli1341 4 ปีที่แล้ว +13

      I agree, he literally did a 3h class in 17 mins. so simple

    • @suleimanzhukov
      @suleimanzhukov 3 ปีที่แล้ว

      Same

    • @igorthelight
      @igorthelight 2 ปีที่แล้ว +5

      Free TH-cam tutors with passion > Paid University teachers with "I'm doing my job" mentality
      ;-)

  • @dawid7891
    @dawid7891 3 ปีที่แล้ว +65

    Kind of tutorials I like most: not only showing how it's done, but also explaing why is it done this way. Thank you.

  • @suleimanzhukov
    @suleimanzhukov 3 ปีที่แล้ว +31

    I understood everything without knowing Kotlin 😅
    Thank you, man

  • @JoeMadds0
    @JoeMadds0 2 ปีที่แล้ว +59

    For those who's design view disappears or goes blank, like mine did once I added the element as shown @ 1:40, I may have a solution for you.
    The tl;dr: Follow the tutorial to 10:30, because you'll need the new classes and layouts that Phillip shows you how to make. Once you get to the 10:30 mark, take a pause and add this line of code to the element in activity_main.xml:
    tools:layout="@layout/fragment_first
    Voila, your design view should be showing again.
    To know how to find solutions like this yourself:
    If you had the same error as me, follow the video to 10:30, and before you add the code as shown in the tl;dr(delete it now if you did), at the top right of the design view you should see a red circle with an exclamation(!). Clicking that will open a panel at the bottom of the screen showing errors/issues, and one of them will have the same red exclamation saying "Unknown Fragments". Click the carrot to the left of that and it will describe why there is an error, but more importantly it will fix it for you if you click the blue link(this link will only appear if you have created a fragment layout to insert into the fragment) that says "Use@layout/fragment_first, Pick Layout...".
    Doing so will add the line of code "tools:layout="@layout/fragment_first"" to the element for you.
    Took me about longer than I care to admit to resolve this, so hopefully this helps someone.
    Oh and thanks for the tutorials Phillip! I'm really enjoying them :)

    • @charismaswitch1515
      @charismaswitch1515 ปีที่แล้ว +3

      was struck here for half hour!! thanks

    • @pietrocasavecchia6007
      @pietrocasavecchia6007 ปีที่แล้ว

      Thank you so much

    • @josipmarasovic7084
      @josipmarasovic7084 ปีที่แล้ว

      i love u >P

    • @klcbsoft
      @klcbsoft ปีที่แล้ว

      Thanks for your explanation. The handling of the design-portion is a massive turn-off in Android Studio/IntelliJ. Going invisible whenever AS doesn't know what to do is a horrific way to guide users for such a mature IDE.

    • @orbulak
      @orbulak ปีที่แล้ว

      Thank u bro, i love u❤🤣

  • @worldoffun9600
    @worldoffun9600 4 ปีที่แล้ว +1

    y u use dark theme ... it's not visible on low-resolution video streaming..... totally waste.....

  • @sanketjadhav2255
    @sanketjadhav2255 4 ปีที่แล้ว +10

    This was so so sooooooo helpful sir. Today i was about to quit android dev because i got stuck on fragments. You explained is soooo well.. thanks a lot sir.

    • @PhilippLackner
      @PhilippLackner  4 ปีที่แล้ว +14

      Lol, don't quit android dev because you feel stuck. You will feel stuck so often in development, solving those problems will make you better. But thanks a lot for those compliments, I'm glad I could help! 🙏🙏

  • @FahmiEshaq
    @FahmiEshaq 3 ปีที่แล้ว +1

    I don't get it. You didn't initialize btnFragment1 and btnFragment2 in MainActivity. How did your code work without initialization?

  • @kaustubhkulkarni
    @kaustubhkulkarni 4 ปีที่แล้ว +7

    This video provided so much clarity on fragments! Really helped me. Thank you!

  • @tonycheng1614
    @tonycheng1614 3 ปีที่แล้ว +4

    for god sake, you saved me tons of times for figuring out by myself

  • @KalpeshChari
    @KalpeshChari 2 ปีที่แล้ว +1

    Thier is recent changes in fragments and its life cycle can you please make a new window with recent changes and also using context to use in recycleview in fragments

  • @guy1407
    @guy1407 4 ปีที่แล้ว +7

    one of the simplest demo I have watched, that actually works. Thanks a lot !

  • @tonnyleroy3122
    @tonnyleroy3122 3 ปีที่แล้ว +1

    Make a video about fragment to fragment communication using interface

  • @techpal5525
    @techpal5525 3 ปีที่แล้ว +1

    How do I pass the data from that fragment to the other activity?

  • @dankosalopek8870
    @dankosalopek8870 4 ปีที่แล้ว +5

    dam, watched like 5 videos so far about this and u are the first one who explained nicly

  • @safvdd1500
    @safvdd1500 ปีที่แล้ว +1

    didn't understand how did you use buttons in mainactivity without initialization ?

  • @maryana44s
    @maryana44s ปีที่แล้ว +2

    with viewbinding:
    binding.btnFirstFragment.setOnClickListener {
    supportFragmentManager.beginTransaction().apply {
    replace(R.id.fragment, firstFragment)
    commit()
    }
    }
    binding.btnSecondFragment.setOnClickListener {
    supportFragmentManager.beginTransaction().apply {
    replace(R.id.fragment, secondFragment)
    commit()
    }
    }

  • @ibrahimylmaz8378
    @ibrahimylmaz8378 2 ปีที่แล้ว +4

    I'm super new and I was able to follow through %100. You are amazing and one of the best tutors I've ever seen. Thanks to people like you, hopefully, I'll get a job in this field. Thank you!

  • @MoMadNU
    @MoMadNU 3 ปีที่แล้ว +4

    Very well done! I used Java instead of Kotlin for this tutorial. Kotlin is very clever at fixing the verbose aspects of Java so I will be switching to it at some point.

    • @Prskati
      @Prskati 3 ปีที่แล้ว +2

      If you've tried Typescript or Rust before, the switch to Kotlin will be super smooth

  • @luisalejandroquirogagomez1721
    @luisalejandroquirogagomez1721 4 ปีที่แล้ว +4

    Thank you, very informative! I have a lot of trouble understanding when and where to use fragments instead of activities. This throws a little rope for me.

  • @localblackman427
    @localblackman427 4 ปีที่แล้ว +4

    This what a phenomenal tutorial. I'm getting ready to make my first tablet app and this is clutch!

  • @nbr1YankeeFan
    @nbr1YankeeFan 3 ปีที่แล้ว +3

    Finally! a simple video that shows how to create and switch between fragments. Thank you so much for this!!!

  • @cheesegeezer5019
    @cheesegeezer5019 2 ปีที่แล้ว +2

    Best Android Dev Video out there!! Coming from C# and various front end mark ups like mcml, winforms and WPF,etc, I find the android environment very "fragmented" and hard to understand. This video alone has helped me out massively. Thank you very much!!

  • @Peter-Petes
    @Peter-Petes 3 ปีที่แล้ว +1

    Can a fragment hold recyclerView ? And can fragments be changed using bottomNavigationView ?

    • @StriderBillman
      @StriderBillman 6 หลายเดือนก่อน

      A fragment can hold a RecyclerView. I can attest to that.

  • @deezplace
    @deezplace 4 ปีที่แล้ว +2

    Thank you !! This was super helpful (I just started with Android Studio/Kotlin yesterday).
    I have only one question (well, right now anyways) would it still function fine to have those two buttons INside the fragments.
    So that the fragments could occupy more of the screen space;
    The first fragment containing a button to "Second fragment" and the second fragment containing a button to the "First fragment" ..?
    I want to have a help/disclaimer screen with just text, no real processing.
    Thanks again !!

    • @PhilippLackner
      @PhilippLackner  4 ปีที่แล้ว +4

      Yes this also works, then you have to refer to the support fragment manager of the activity(inside of your fragment class: activity?.supportFragmentManager) and perform the transaction. The example with the buttons here is just for demonstration, in a real app you wouldn't do it like this for navigational purposes, you would instead use bottom navigation view or similar views 😁

  • @Allan_Ralph
    @Allan_Ralph 3 ปีที่แล้ว +2

    Thanks Philipp Lackner, this is one of THEEEE Best Explanations out there. You are too good a teacher !

  • @evelynediazaraque6095
    @evelynediazaraque6095 4 ปีที่แล้ว +4

    Thank you so much! This was incredibly easier to understand.

  • @himanshujain718
    @himanshujain718 4 ปีที่แล้ว +2

    Thanks a lot, very informative video.
    Please make video on fragment life cycle.

  • @andreasgeorgiou9109
    @andreasgeorgiou9109 3 ปีที่แล้ว +1

    As an Android Studio beginner, I find this video very helpful. Very nice and clear explanation about fragments! Thank you...

  • @samuelonyango879
    @samuelonyango879 3 ปีที่แล้ว +3

    Hi Phillip, thank you for this wonderful tutorial, very nice explanations there.
    I am new to android development and your tutorials are amazing!
    I would like to do the same things with switches, I have switch 1 and switch 2 in first fragment and under its layout I have some text view items whose visibility have been set to gone and I would like them to appear once the respective switches are turned on.
    How can I link them up like that?
    Thank you Phillip.

  • @rogadev
    @rogadev 3 ปีที่แล้ว +5

    Wow. Android tutorials that actually make sense, presented with someone who doesn't have an atrocious accent? You deserve a goddamn medal. Thank you for posting these videos - I'm definitely checking out your other videos later.

  • @superfriend7117
    @superfriend7117 4 ปีที่แล้ว +1

    Sir your teaching style and your voice is very clear and very easy to understand , you are just amazing Sir.

  • @saketg5954
    @saketg5954 4 ปีที่แล้ว +2

    Thank you, but I was hoping for Java. I hope its similar to the Kotlin code.

    • @radwl
      @radwl 4 ปีที่แล้ว +1

      Kotlin is very similar to Java, it's actually easier to use and it's cleaner!

    • @coderinthewoods
      @coderinthewoods 4 ปีที่แล้ว

      Java is half-dead.

    • @saketg5954
      @saketg5954 4 ปีที่แล้ว

      @@coderinthewoods Please don't say that. I'm just learning Android dev in Java.

  • @GrumpyOldMan9
    @GrumpyOldMan9 3 ปีที่แล้ว

    Nice, but it's "parAmeter", not "pArameter", just like you should say "Integer", and not "intEger", or should say "thermOmeter", and not "thErmometer". Dutch and German native speakers often make that mistake because that's where the emphasis is in their languages.

  • @dominicldoe4838
    @dominicldoe4838 3 ปีที่แล้ว +1

    Amazing man!!! Very easy to understand. Thanks!!

  • @VocalWithShubham
    @VocalWithShubham 2 ปีที่แล้ว

    @PhilippLackner Why don't you put addToBackStack(null) while initializing the fragment container screen with Fragment 1?

  • @primaryJeemail
    @primaryJeemail ปีที่แล้ว

    I'm using ANdroid Studio Flamingo. When I create empty project, I'm not able to see Action bar, is this because by default action bar is not set? how to make it visible by default?

  • @bigotes20random86
    @bigotes20random86 2 ปีที่แล้ว +1

    Amazing tutorial, tysm mate! :D

  • @chrakesh5181
    @chrakesh5181 17 วันที่ผ่านมา

    Bro..
    Where to code inside a fragment. Could u provide code for adding two numbers inside fragments..

  • @RaabStephan
    @RaabStephan 2 ปีที่แล้ว

    I've created an alertdialog fragment. How do I go about closing that fragment once it's been shown?
    Also, how can I pass information from the alertdialog fragment (such as a String or an Int) back to the Activity that launched it?

  • @BaiBator
    @BaiBator ปีที่แล้ว

    Hey Philip ! Wehe did you learn all these things ? You seemed pretty familiar and sophisticated while coidng. Can you recommend some sources ? I've bought some Udemy courses but they doesn't expalin a lot to me.

  • @sahilmadavi5171
    @sahilmadavi5171 3 ปีที่แล้ว

    Hello sir , I'm getting one problem sir , I have done with build for my project and build is working for AWD but when I'm going to REBUILD it that to use it in other phone I getting a single fragment only not the whole app

  • @hacktooth1
    @hacktooth1 2 ปีที่แล้ว +1

    Really good tutorial Phillip! Thanks. Only item I can think to add that may help someone. My app built off a basic template and it was missing the plugin id 'kotlin-android-extensions' so I was not seeing the buttons in my MainActivity.kt file when I tried to add the onClickListeners.

  • @sudhanshusharma9159
    @sudhanshusharma9159 3 ปีที่แล้ว

    click on secondF button, click on firstF button. Try this 2-3 time. I see crash. Fragment is already added to the stack. Can you provide help in this?

  • @jog282
    @jog282 3 ปีที่แล้ว

    Thank you!! Great explanation,
    your video really heped me.
    Now subscribed and will check your other vids.

  • @clinck3439
    @clinck3439 3 ปีที่แล้ว

    when i am creating new blank fragment it is generating kotlin file instead of kotlin class, any soluiton ?

  • @prabhatgupta1497
    @prabhatgupta1497 2 หลายเดือนก่อน

    thank you very much for such a nice tutorial series. I have one query that Every button click is pushing new fragment instance, it may cause memory issue, how to push fragment uniquely in backstack ?

  • @allofcode3344
    @allofcode3344 3 ปีที่แล้ว

    I have a question, if you click on button 1 multiple times does your fragment get putbon the stack multiple times?
    If I you press button two and than button one, does fragment one go through the fragment lifecycle again or does it resume where you started fragment two,?

  • @mathieuclement8011
    @mathieuclement8011 2 ปีที่แล้ว

    If you click on "Fragment 1" a bunch of times, then it is also added to the stack that many times. How can I prevent duplicates, does the fragment manager support this?

  • @ug_it_english
    @ug_it_english ปีที่แล้ว

    Thank you very much, thank you for sharing . I bow to you.

  • @srtghfnbfg
    @srtghfnbfg 3 ปีที่แล้ว

    How come you can just reference "btnFragment1" from the code inside your main activity ? For me it's just red, is there a magical import or something i missed ?

  • @_bhuvaneshwaran123
    @_bhuvaneshwaran123 ปีที่แล้ว

    Thank you so much, itz very useful for me 🎉🎉

  • @AminaMuradalieva
    @AminaMuradalieva ปีที่แล้ว

    Thank you so much! Your explanation is really comprehensive))

  • @jafarpirooj-rx3tm
    @jafarpirooj-rx3tm 7 หลายเดือนก่อน

    Thank you. I have a question . How to design fragments to get whole screen? I have a recycleview and I want to when I click on one of them, open fragment

  • @mukulasija4501
    @mukulasija4501 2 ปีที่แล้ว

    Thank you so much... this video has very very nice explanation..

  • @BCS_AAMIRASHRAF
    @BCS_AAMIRASHRAF ปีที่แล้ว

    those who can't see their design in replace

  • @thegreatcujo33
    @thegreatcujo33 3 ปีที่แล้ว

    I did everything exactly as it is explained in the video and it won't recognize my button id's "btnFragment1" or "btnFragment2". They're red in the activity_main.xml file.

    • @lokkeshss7024
      @lokkeshss7024 3 ปีที่แล้ว +1

      Use findViewById in your MainActivity to call button1 and button2 and then call onclicklistner

  • @SocienNeicos
    @SocienNeicos ปีที่แล้ว

    Incredible explanation, thank you so much

  • @No.Name___
    @No.Name___ 3 ปีที่แล้ว

    where to do the back end coding for fields present in framgment ??? in mainactivity.java or the java class for frament.

  • @gerdsfargen6687
    @gerdsfargen6687 9 หลายเดือนก่อน

    A million subs for this man. Thank you! Danke Schön

  • @amitray769
    @amitray769 3 ปีที่แล้ว

    Very clear video really love your content

  • @MrVipulLal
    @MrVipulLal ปีที่แล้ว

    Comprehensive tutorial. Thanks 🙏

  • @hhvdblom
    @hhvdblom 2 ปีที่แล้ว

    Great and Professional video :-) I even could do it with Java :-)

  • @ramadhansaputra3812
    @ramadhansaputra3812 ปีที่แล้ว

    framelayout, begintransaction, commit, addtobackstack

  • @l_zonnacraft987
    @l_zonnacraft987 7 หลายเดือนก่อน

    8:19 , can this be done on java too or is it only allowed for Kotlin?

  • @joaoluis8481
    @joaoluis8481 ปีที่แล้ว

    those lines apparently don't work in my Android Studio. its looks like old lines for my version
    rlly dont know

  • @astonmargolis-dias7089
    @astonmargolis-dias7089 4 วันที่ผ่านมา

    youtube only reason im passing my classes. god bless you sir.

  • @GuitarreroDaniel
    @GuitarreroDaniel 3 ปีที่แล้ว +1

    Terrific explanation, this was the only video that made me understand the difference between Activity and Fragment.

  • @deepaktiwari620
    @deepaktiwari620 2 ปีที่แล้ว

    Wow u r too good sir ! it's helps me a lot .. keep making video like this ... love from india.

  • @20-000
    @20-000 3 ปีที่แล้ว

    What if the buttons are not from activity but are placed on fragment?

  • @yizifood4617
    @yizifood4617 ปีที่แล้ว

    I keep getting unresolved reference fragment

  • @saideekshith3295
    @saideekshith3295 2 ปีที่แล้ว

    we can do this without fragments also no?
    Just by using layouts

  • @StormKillProduction
    @StormKillProduction 4 ปีที่แล้ว +1

    Thank you so much for this Video! Nice and easy explanation of fragments, really helped me.

  • @jonothen2212
    @jonothen2212 2 ปีที่แล้ว

    thanks bro this helped man
    any vid about list view yet man?

  • @edoforna9952
    @edoforna9952 4 หลายเดือนก่อน

    thanks man, after 4 years this video is still very useful :)

  • @ProgrammerTimes
    @ProgrammerTimes ปีที่แล้ว

    great work bro i have created similar video on my channel if you have time do check it

  • @orerick2871
    @orerick2871 2 ปีที่แล้ว

    please consider doing a video on fragment's lifecycle

  • @deepdiwakar9643
    @deepdiwakar9643 4 ปีที่แล้ว +2

    Just curious to know, in the code we're just adding the fragment in the stack. so if someone clicks btnFragment1 multiple times then it will create multiple copies of Fragment1 in the stack.
    Btw you're doing great very informative playlist, just wanted to shed some light on this thing

    • @michaelgray371
      @michaelgray371 2 ปีที่แล้ว +1

      This was my thought. If you fill in the name you could check to see if the name is already on the back stack and not add it if so

    • @TheImaginativeSachin
      @TheImaginativeSachin ปีที่แล้ว

      @@michaelgray371 Great Minds think alike 🤣

  • @satyakottisa5206
    @satyakottisa5206 3 ปีที่แล้ว

    Thanks for the explanation. I am running into a problem with my use case which has an Activity Which starts fragment 1. Say Fragment1 has UI with 2 buttons with default UI states of button 1 enabled and button 2 disabled. When i click on Button 1 it enables Button 2. Finally when i press button 2 it launches fragment 2 . This whole navigation works smoothly. But when i press backbutton when in Fragment 2 i am expecting my Fragment 1 to Pop with both buttons enabled. For me its popping the fragment 1 but with default button states (Button1 enabled, button 2 disabled). Appreciate if any feed back is provided on how to address this.

  • @Kunal-jp8tn
    @Kunal-jp8tn 2 ปีที่แล้ว

    Thank you so much for this great tutorial....

  • @GrumpyOldMan9
    @GrumpyOldMan9 3 ปีที่แล้ว

    Set a noise gate on your sound recording input, so that we don't hear you typing ;)

  • @inspirationalquotes5840
    @inspirationalquotes5840 3 ปีที่แล้ว

    Do you have a video shows how to get activity name from a fragment?

  • @thomasgeorge3229
    @thomasgeorge3229 3 ปีที่แล้ว +1

    did you declare btnfragment1 at 14:48

    • @taekwondoman2D
      @taekwondoman2D 3 ปีที่แล้ว

      I am confused as to how he accessed it without using findViewById

    • @PhilippLackner
      @PhilippLackner  3 ปีที่แล้ว +2

      That was possible due to Kotlin synthetics which were removed from android studio by default. You can add them back by pasting "id 'kotlin-android-extensions' in your build.gradle app file in the plugins block

  • @Sam-yb9ut
    @Sam-yb9ut 5 หลายเดือนก่อน

    Extremely useful, Thank you

  • @naturelife7655
    @naturelife7655 5 หลายเดือนก่อน

    Hey! How you used button views without binding them to ids?

  • @cyruscantero9376
    @cyruscantero9376 2 ปีที่แล้ว

    2:26 omg thank you so much, you already helped me here

  • @ryanbennett6801
    @ryanbennett6801 4 ปีที่แล้ว +1

    You explain this really well. Thanks for making these videos

    • @PhilippLackner
      @PhilippLackner  4 ปีที่แล้ว +1

      Thank you, you're welcome mate!

  • @aparnakurudi677
    @aparnakurudi677 4 ปีที่แล้ว +1

    Hello there, Thank you for this video. I would like to know more about how to call int/ float/ char values to the next fragment also. (basically I want to know how to call values from one fragment and operate in another).

    • @PhilippLackner
      @PhilippLackner  4 ปีที่แล้ว

      You have to use the activity of the fragments to exchange information from fragment to fragment

  • @Mr_DJB
    @Mr_DJB 2 ปีที่แล้ว +1

    Spent 2 days trying to suss out how fragments work and how to move between them, and finally this video gives me a concise and easy to understand explanation. Thank you so much

  • @hafifkiloyladaolsadeadlift5428
    @hafifkiloyladaolsadeadlift5428 4 หลายเดือนก่อน

    That was a great video. Thank you!

  • @troytaylor108
    @troytaylor108 2 หลายเดือนก่อน

    Man, thanks!! That tutorial was on point!

  • @lancesamaria8130
    @lancesamaria8130 ปีที่แล้ว

    GREAT Explanation dude!!!

  • @samirshrestha7418
    @samirshrestha7418 3 ปีที่แล้ว

    How can we use other components inside fragment like recyclerview, tablayouts etc. in a proper managed way which can be used in production level

  • @ranvaknin9669
    @ranvaknin9669 3 ปีที่แล้ว +1

    Ive been developing on android for almost a year now and only now I feel like I've really understood fragments. Keep it up

  • @aihoneyai1197
    @aihoneyai1197 4 ปีที่แล้ว

    hi , i just wanna ask, inside the fragment, can i put anything inside besides textview? like a button that can go to another activity when clicked? can I do that? sorry I'm new.

    • @PhilippLackner
      @PhilippLackner  4 ปีที่แล้ว

      Of course, any view just as for activities

  • @stunnaman8803
    @stunnaman8803 4 ปีที่แล้ว

    Sir please I removed actionBar from mainActivity. So there was no actionBar on all fragment.. so in the next fragment I wanna show an actionBar. How do I do that.. or how can I move from fragment to an activity. So that I can create actionBar on that activity

  • @Praktiskais_Latvietis
    @Praktiskais_Latvietis 2 ปีที่แล้ว

    Thank you, Excelent

  • @mikloskontra1981
    @mikloskontra1981 7 หลายเดือนก่อน

    Very good explanation thank s

  • @BGMINOOBLIVE
    @BGMINOOBLIVE 3 ปีที่แล้ว

    Thanks for an easy tutorial

  • @NielFiv
    @NielFiv ปีที่แล้ว

    I can't proceed because of the design tab, buttons and fragment won't show up. feels like I need the Gradle Scripts

    • @MohaOfficial
      @MohaOfficial ปีที่แล้ว

      add this line to your fragment
      tools:layout="@layout/fragment_first"
      and also add id so the fragment will apear

  • @talktoAB
    @talktoAB 4 ปีที่แล้ว

    Not helping at all, I thought he said he will explain how to also Remove the First_Fragment and Second_Fragment