Thanks for the response this all makes perfect sense. I've. Made the changes
and hope to try it out today some time.

Thanks again...

Dan
On Apr 30, 2011 6:05 PM, "Streets Of Boston" <[email protected]>
wrote:
> The new contents of FragmentActivity.java are in my earlier post.
>
> The AFragmentActivity.java is a copy of the original FragmentActivity.java

> with these additional changes:
>
> - public class AFragmentActivity extends Activity *implements
> FragmentActivity*
> - Then fix the compiler errors from the change above (i.e. implement
> missing methods that are defined by the FragmentActivity). This is pretty
> trivial.
>
> The AFragmentMapActivity is a copy of the AFragmentActivity with these
> additional changes:
>
> - public abstract class AFragmentMapActivity extends *Map*Activity
> implements FragmentActivity
>
> Then you'll find that other source files in the compatibility have some
> compiler errors. These are trivial to fix. Mostly adding (Context) or
> (Activity) casts and calling '.getFragments()' instead of '.mFragments'
and
> such.
>
> Here is a usage example:
> *public class Main extends AFragmentMapActivity {
>
> /** Called when the activity is first created. */
> @Override
> public void onCreate(Bundle savedInstanceState) {
> super.onCreate(savedInstanceState);
> setContentView(R.layout.main);
> }*
> * @Override
> protected boolean isRouteDisplayed() {
> return false;
> }
> }*
>
> *public class MapFragment extends Fragment {
> private View fragmentView;
> private MapView mapView;*
> *
> @Override
> public View onCreateView(LayoutInflater inflater, ViewGroup container,
> Bundle savedInstanceState) {
> fragmentView = inflater.inflate(R.layout.map, container, false);
> mapView = (MapView)fragmentView.findViewById(R.id.mapview);
>
> return fragmentView;
> }*
> *}*
>
> And the layout main.xml has a <fragment> in there that refers to *
> MapFragment*.
> *
>
> *
>
>
>
>
> -
> -
>
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to