MenuMapButtonListener.java :  » Location » friendtracker » atila » android » friendtracker » Android Open Source

Android Open Source » Location » friendtracker 
friendtracker » atila » android » friendtracker » MenuMapButtonListener.java
/*
 * FriendTracker
 * Copyright (c) 2009 Juan Gomez Mosquera
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
 * for more details.
 *
 * You should have received a copy of the GNU General Public License along
 * with this program; if not, write to the Free Software Foundation, Inc.,
 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. Or you can get a 
 * copy here: <http://www.gnu.org/licenses/>.
 */

package atila.android.friendtracker;

import android.view.View;
import android.app.Activity;
import android.content.Intent;


public class MenuMapButtonListener implements View.OnClickListener 
{
  private Activity m_Parent;
  
  MenuMapButtonListener(Activity parent)
  {
    m_Parent = parent;
  }
  
  public void onClick(View view) 
  {
    ShowMap();
    m_Parent.setResult(android.app.Activity.RESULT_OK);
       m_Parent.finish();
  }
  
  private void ShowMap()
  {
    Intent event = new Intent(m_Parent, FTMapActivity.class);
    m_Parent.startActivityForResult(event, FriendTracker.ACTIVITY_CREATE);
  }

}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.