As the title suggest.
I\'ve downloaded Fragment code from here, http://developer.android.com/shareables/training/FragmentBasics.zip.
It is Fragment exam
My problem was that I had the element in the Activity's XML layout. Therefore the onCreate() of the Fragment was called before the calls in Java code, thus not setting the arguments.
I removed the element from my XML layout and it worked!