title: Activity Layout: Fragment class: vs android:name attributes
body: <p>I've read the documentation about <a href="http://developer.android.com/guide/topics/fundamentals/fragments.html" rel="noreferrer">Fragments</a> in the Android Developer Guide and I've seen that sometimes they specify the class to instantiate with the Fragment tag attribute <em>android:name</em> and sometime they use the <em>class:</em> attribute:</p>
  
  <pre><code>&lt;fragment
      android:name="com.example.news.ArticleReaderFragment"
      android:id="@+id/viewer"
      android:layout_weight="2"
      android:layout_width="0dp"
      android:layout_height="match_parent" /&gt;
  
  &lt;fragment
      class="com.example.android.apis.app.FragmentLayout$TitlesFragment"
      android:id="@+id/titles" 
      android:layout_weight="1"
      android:layout_width="0px" 
      android:layout_height="match_parent" /&gt;
  </code></pre>
  
  <p>Are <em>android:name</em> and <em>class:</em> interchangeable? If I use the autocompletion function in Eclipse, they both show the same documentation tip (i.e. the attribute provides the class name to be instantiated). Maybe you must use the second one when the class to be instantiated has a name which is different from the java file name, like <em>TitlesFragment</em> which is in the <em>FragmentLayout.java</em> file? Or can I use the syntax <em>package.fileDOTjava$Class</em> also with the <em>android:name</em> attribute?</p>
  
  <p>I'd like to have some documentation for XML tags and attributes as for Android Java Classes  (I've asked about it in another <a href="https://stackoverflow.com/q/10162870/925001">question</a>).</p>