I m trying to understand the concept of fragment on android. The official pages has some code snippets and a link mentioning the entire source code called FragementLayout.java.
However on clicking it , I get redirected to this page
http://developer.android.com/tools/samples/index.html
Which says the source code is available in the samples directory where the sdk has been installed. I tried checking out samples of various different API levels (8, 11, 17) but could not find the source code for fragments tutorial. Does any body know where it is ?
I have that exact file in the samples folder of 13, 14 & 16.
For extra credit, I recommend checking out the Fragments demo of Action Bar Sherlock, since I believe it shows a better way of learning Fragments.
For more discussion about this, check out my question & the related answers:
You can see that I do not like the pattern in that tutorial, but there is good discussion for both approaches.
Make a new project using create project from existing sample. Choose maximum target name then Select Sample ApiDemo. Finish. Now go to ApiDemos->src->com.example.android.apis.app->FragmentLayout.java .Enjoy
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With