111 Fragments in Android |

slidenerd · 241K views · 2013 · 6:07

Open on YouTube

Software (other)Web developmenttutorialdated

Why Stack Overflow recommends it

Stack Overflow users link it when answering beginner questions about fragments, such as how to communicate between fragments or split a screen into modular pieces.

Recommended by 5 people across 5 different months, 2013 to 2014.

What it is

A short 2013 Android tutorial from the slidenerd channel that explains what fragments are and why they exist. It covers modularizing UI with fragments, building apps that work on both phones and tablets, and how fragments are used with the ActionBar, tabbed navigation and list navigation.

What people said

Recommends Coderji · 2013-11 · Stack Overflow · on “How to divide Android game screen”

Its better to use fragments [LINK] or Fragment video tutorial [this video] , identify 3 fragments and in let in each fragment have a canvas

Recommends Saggy · 2014-04 · Stack Overflow · on “Communicate between two fragments”

I hope you have searched enough before posting this question. Many duplicate question are round there. Anyways, you can refer here [LINK] . For your ease I should highlight few things: Two fragments hould not communicate disrectly to each other in any case (most newbie do this mistake) Any communication should take place via the parent Activity through an interface. Rest you will get an idea from the link I mention above. Also, you can have a look on slidenerd videos. They have given a good explanation of it here [this video] . Hope it helps you.

Recommends fantazituborg · 2014-06 · Stack Overflow · on “Using a fragment to display user installed apps”

way don't you just from youre main activity on click off the tab create a fragment with a listview in it and displays the data list there?? you can pars the list to the fragment bay saying fragmentclass fragment = new fragmentclass(list); fragment.show(); if youre having truble understanding fragments you can watch this great tutorial [this video] on it especialy the part on inter fragment communication is realy use full

Recommends JamesJSkier · 2014-07 · Stack Overflow · on “How to have a Menu always visible across multiple layouts?”

Fragments, they are a way to define parts of the user interface. They are similar to activities, they have their own lifecycle. They are also closely tied to the life cycle of their parent activity. You can add them statically by declaring them in your xml manifest and in your layout file -or- you can add them dynamically in runtime by creating them as java objects and xml layout files and then add them using the FragmentManager class. check out the Documentation on the android developer website [LINK] also, check out some tutorials on youtube, I like these ones especially: [this video] Good Luck!

Recommends Hirak Chhatbar · 2014-10 · Stack Overflow · on “The most lightweight way to dynamically load different views at runtime?”

i understood what u want and still will recommend fragments. it actually isnt a mess. i too was afraid of fragmetns initially. u need to invest couple of days completely on fragments and u will be done. u can add tiny views also with fragments. refer to fragment tutorials of slidenerd. [this video]