Fragments - Part 6, Add, Remove & Replace

Fragments - Part 6, Add, Remove & Replace

Codetutor

6 лет назад

66,480 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

SAJJAD AHMAD
SAJJAD AHMAD - 17.03.2023 20:34

If we use fragmentTransaction.add(R.id.fragmentContainer,fragment,"demofragment") and fragmentTransaction.addToBackStack(null); and don't override the onBackPressed method then also it will have the same behaviour as we do it on override the onBackPressed method and use fragmentTransaction.add(R.id.fragmentContainer,fragment,"demofragment") and fragmentTransaction.addToBackStack(null); How come?

Ответить
everything software by rushi
everything software by rushi - 11.10.2022 06:59

Sir your videos are really helpful. Thanks 🙏🙏🙏 a lot!!

Ответить
PinkPoo
PinkPoo - 15.07.2022 17:06

Is it possible to replace the page with html and css?

Ответить
Hijame Orihan
Hijame Orihan - 09.04.2022 19:50

Solved my problem

Ответить
hosein davari
hosein davari - 27.12.2021 21:07

thank you

Ответить
NIKHIL RANA
NIKHIL RANA - 18.11.2021 12:34

Really helped me

Ответить
Rajkamal rajarshi
Rajkamal rajarshi - 05.09.2021 10:25

Your Explanations are really great Thankyou !

Ответить
Udhayarajan Mahes
Udhayarajan Mahes - 30.07.2021 05:36

Nice video 👍. I'm facing "Fragment already executing" any idea on this 🌝

Ответить
Jawad Ahmed
Jawad Ahmed - 22.03.2021 11:05

if we are not using back stack then how it is able to get added on top of another?? plz answer this

Ответить
j t
j t - 22.12.2020 15:14

this video was really very very good

Ответить
Rishabh Panesar
Rishabh Panesar - 23.08.2020 12:20

Really good explanation!
Keep it up, sir!

Ответить
BALARAM VISHWAKARMA
BALARAM VISHWAKARMA - 22.08.2020 19:43

bahut bahut dhanyawad sir🙏🙏

Ответить
Tanay Kamath
Tanay Kamath - 28.07.2020 21:14

sir how is findFragmentById(R.id.fragmentContainer) working? the fragmentContainer is empty at first so how is it an instance of any of the fragments you have created!?.....I watched all videos and didnt get this part plz help sir @Codetutor

Ответить
Shahid Ali
Shahid Ali - 11.07.2020 09:34

@codetutor In your previous video u said that multiple fragments will be added with the help of backstack otherwise it wont add ,now in this video you are adding multiple fragments without backstack ,can you please explain.

Ответить
Himanshu Kandwal
Himanshu Kandwal - 20.06.2020 01:56

How to switch multiple fragments...if one is added another one is removed..and if we add a fragment two times, it gives an error that fragment is already added.😪

Ответить
Ori Fridman
Ori Fridman - 24.03.2020 18:31

love your channel!!! great explanation

Ответить
Maybe Raj
Maybe Raj - 09.03.2020 20:08

A question: So we are adding new fragments on same fragmentContainer, now what is exactly heppening on that? Is it replacing the content (old fragment) inside that cotainer with new fragment or is it just adding it on top? If it is adding on top, can we use LinearLayout or any other as holder to have multiple fragments line by line (one after another)?

Ответить
Muhammad Safi Ullah
Muhammad Safi Ullah - 03.02.2020 18:36

You're great.

Ответить
Aldo Cortes
Aldo Cortes - 27.11.2019 03:53

This helped me solve my problem. Thanks a lot, keep on the good work!

Ответить
Yehonatan Peleg
Yehonatan Peleg - 01.10.2019 22:41

thx, greay video

Ответить
Ramesh R
Ramesh R - 08.04.2019 09:00

Nice explanation.

Ответить
Carlo Bra
Carlo Bra - 02.04.2019 18:16

best explanation with visual examples so far. Thanks

Ответить
Vidit Khanna
Vidit Khanna - 31.12.2018 00:03

Plz help! Sir i want to close a fragment actually the whole fragment activity but getactivity().finish crash my application.

Ответить
Vishnu Bhatt
Vishnu Bhatt - 07.08.2018 17:07

Well explained.Thank you sir.

Ответить
Troy
Troy - 30.07.2018 20:12

I'm sorry to see unlike for these great tutorial lessons... I think anyone who does that it's jealous because they can't do like these great lessons.

Ответить
Fl0rZ
Fl0rZ - 14.07.2018 12:00

you just won a subscriber. I have to build a fitness app for my Bachelor Thesis. I use a Navigation Drawer with fragments. u helped me a lot! Codetutor for president :D

Ответить
Abdé Elahmar
Abdé Elahmar - 11.06.2018 22:21

Hi Anil, im not sure what fragmentContainer is supposed to be, is it the layout in my fragment layout .xml? Or is it the viewPager? Can you give me a little bit more details? thank you very much :) When i use the framelayout i used for the fragment i am currently in, the new just appears over the current one

Ответить
share apps3
share apps3 - 04.05.2018 15:06

i read a good comment about u , i want to repeat this compliment
your tutorials are better than those of Lynda and Udacity.

Ответить
Sulav
Sulav - 18.03.2018 17:47

your tutorials are better than those of Lynda and Udacity.

Ответить
Julie Moore
Julie Moore - 10.02.2018 10:47

This series just gets better.

Ответить
palani samy
palani samy - 20.01.2018 12:35

Hi sir, your android tutorial videos is awesome...quite easy to understand..but I have one doubt, last video of backstack story you have created single fragment reference.but you assigned with multiple fragments with in single reference.but I tried same thing but I got error...what is problem could you please explain???

Ответить
Bharatesh C
Bharatesh C - 05.12.2017 15:48

Thanks for the video.. Keep sharing the knowledge.

Ответить
Yusuf Ceylan
Yusuf Ceylan - 03.12.2017 13:20

Thanks for that amazing detailed tutorial. How many part this tutorial will be?

Ответить