Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 // Created by plusminus on 00:23:14 - 03.10.2008
 package org.osmdroid;
 
Default map view activity.

Author(s):
Manuel Stahl
public class MapActivity extends FragmentActivity
    private static final int DIALOG_ABOUT_ID = 1;
    // ===========================================================
    // Constructors
    // ===========================================================
    
Called when the activity is first created.
    @Override
    public void onCreate(final Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        this.setContentView(..);
        // FrameLayout mapContainer = (FrameLayout) findViewById(R.id.map_container);
        // RelativeLayout parentContainer = (RelativeLayout) findViewById(R.id.parent_container);
        FragmentManager fm = this.getSupportFragmentManager();
        MapFragment mapFragment = new MapFragment();
        fm.beginTransaction().add(..mapFragment).commit();
    }
    @Override
    protected Dialog onCreateDialog(final int id)
    {
        Dialog dialog;
        switch (id) {
            case :
                return new AlertDialog.Builder(MapActivity.this).setIcon(..)
                        .setTitle(..).setMessage(..)
                        .setPositiveButton(...new DialogInterface.OnClickListener() {
                            @Override
                            public void onClick(final DialogInterface dialogfinal int whichButton)
                            {
                                //
                            }
                        }).create();
            default:
                dialog = null;
                break;
        }
        return dialog;
    }
New to GrepCode? Check out our FAQ X