Changes

An Introduction to Using Fragments in Android Studio

30 bytes removed, 14:43, 18 July 2014
no edit summary
<pre>
package com.example.myfragmentdemo.myfragmentdemo;
import android.os.Bundle;
<pre>
package com.example.myfragmentdemo.myfragmentdemo;
import android.os.Bundle;
The key properties within the <fragment> element are android:name, which must reference the class associated with the fragment, and tools:layout, which must reference the XML resource file containing the layout of the fragment.
Once added to the layout of an activity, fragments may be viewed and manipulated within the Android Studio Designer tool. Figure 21 24-1, for example, shows the above layout with the embedded fragment within the Android Studio Designer:
[[Image:android_studio_fragment_in_designer.png|A fragment embedded in a layout in Android Studio Designer]]
Figure 2224-1