com.virtual.tour.road.com.virtual.tour.road.vista

## Class SongAdapter

- java.lang.Object
- - android.widget.BaseAdapter
  - - com.virtual.tour.road.com.virtual.tour.road.vista.SongAdapter

- All Implemented Interfaces:
    android.widget.Adapter, android.widget.ListAdapter, android.widget.SpinnerAdapter

      public class SongAdapter
      extends android.widget.BaseAdapter

  Created by Carolina Bonnin on 19/05/2015.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private android.view.LayoutInflater` | `songInf`
    `private java.util.ArrayList<Song>` | `songs`

    - ### Fields inherited from interface android.widget.Adapter

      `IGNORE_ITEM_VIEW_TYPE, NO_SELECTION`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SongAdapter(android.content.Context c, java.util.ArrayList<Song> theSongs)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getCount()` How many items are in the data set represented by this Adapter.
    `java.lang.Object` | `getItem(int arg0)` Get the data item associated with the specified position in the data set.
    `long` | `getItemId(int arg0)` Get the row id associated with the specified position in the list.
    `android.view.View` | `getView(int arg0, android.view.View arg1, android.view.ViewGroup arg2)` Get a View that displays the data at the specified position in the data set.

    - ### Methods inherited from class android.widget.BaseAdapter

      `areAllItemsEnabled, getDropDownView, getItemViewType, getViewTypeCount, hasStableIds, isEmpty, isEnabled, notifyDataSetChanged, notifyDataSetInvalidated, registerDataSetObserver, unregisterDataSetObserver`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### songInf

          private android.view.LayoutInflater songInf

    - #### songs

          private java.util.ArrayList<Song> songs

  - ### Constructor Detail

    - #### SongAdapter

          public SongAdapter(android.content.Context c,
                             java.util.ArrayList<Song> theSongs)

  - ### Method Detail

    - #### getCount

          public int getCount()

      Description copied from interface: `android.widget.Adapter`
      How many items are in the data set represented by this Adapter.
      Returns:
        Count of items.

    - #### getItem

          public java.lang.Object getItem(int arg0)

      Description copied from interface: `android.widget.Adapter`
      Get the data item associated with the specified position in the data set.
      Parameters:
        `arg0` - Position of the item whose data we want within the adapter's data set.
      Returns:
        The data at the specified position.

    - #### getItemId

          public long getItemId(int arg0)

      Description copied from interface: `android.widget.Adapter`
      Get the row id associated with the specified position in the list.
      Parameters:
        `arg0` - The position of the item within the adapter's data set whose row id we want.
      Returns:
        The id of the item at the specified position.

    - #### getView

          public android.view.View getView(int arg0,
                                           android.view.View arg1,
                                           android.view.ViewGroup arg2)

      Description copied from interface: `android.widget.Adapter`
      Get a View that displays the data at the specified position in the data set. You can either create a View manually or inflate it from an XML layout file. When the View is inflated, the parent View (GridView, ListView...) will apply default layout parameters unless you use `LayoutInflater.inflate(int, android.view.ViewGroup, boolean)` to specify a root view and to prevent attachment to the root.
      Parameters:
        `arg0` - The position of the item within the adapter's data set of the item whose view we want.
        `arg1` - The old view to reuse, if possible. Note: You should check that this view is non-null and of an appropriate type before using. If it is not possible to convert this view to display the correct data, this method can create a new view. Heterogeneous lists can specify their number of view types, so that this View is always of the right type (see `Adapter.getViewTypeCount()` and `Adapter.getItemViewType(int)`).
        `arg2` - The parent that this view will eventually be attached to
      Returns:
        A View corresponding to the data at the specified position.