Android Open Source - maps-app-android Drawer Item






From Project

Back to project page maps-app-android.

License

The source code is released under:

Apache License - 2.0 TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by...

If you think the Android project maps-app-android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

/* Copyright 1995-2014 Esri
 */*  w ww . j  av  a  2  s.  c  o m*/
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * For additional information, contact:
 * Environmental Systems Research Institute, Inc.
 * Attn: Contracts Dept
 * 380 New York Street
 * Redlands, California, USA 92373
 *
 * email: contracts@esri.com
 *
 */

package com.esri.android.mapsapp;

import android.view.View;
import android.widget.LinearLayout;

/**
 * Represents an item in the navigation drawer list.
 */
public class DrawerItem {
  public interface OnClickListener {
    public void onClick();
  }

  private final OnClickListener mListener;

  private final LinearLayout mView;

  public DrawerItem(LinearLayout view, OnClickListener listener) {
    mView = view;
    mListener = listener;
  }

  /**
   * Invokes the OnClickListener registered with this DrawerItem.
   */
  public void onClicked() {
    if (mListener != null) {
      mListener.onClick();
    }
  }

  public View getView() {
    return mView;
  }
}




Java Source Code List

com.esri.android.mapsapp.ContentBrowserFragment.java
com.esri.android.mapsapp.DrawerItem.java
com.esri.android.mapsapp.MapFragment.java
com.esri.android.mapsapp.MapsAppActivity.java
com.esri.android.mapsapp.account.AccountManager.java
com.esri.android.mapsapp.account.SignInActivity.java
com.esri.android.mapsapp.basemaps.BasemapItem.java
com.esri.android.mapsapp.basemaps.BasemapsAdapter.java
com.esri.android.mapsapp.basemaps.BasemapsDialogFragment.java
com.esri.android.mapsapp.dialogs.ProgressDialogFragment.java
com.esri.android.mapsapp.location.DirectionsDialogFragment.java
com.esri.android.mapsapp.location.RoutingDialogFragment.java
com.esri.android.mapsapp.tools.Compass.java
com.esri.android.mapsapp.util.StringUtils.java
com.esri.android.mapsapp.util.TaskExecutor.java
com.esri.android.mapsapp.util.UiUtils.java