PlaceAdapter - ShutUpPaulo/TecProg_2016-01 GitHub Wiki

Class PlaceAdpater

1. Class Attributes

  • No arguments

2. Methods

2.1. PlaceAdapter

2.1.1. Description:

  • Constructs a place adapter with a given context and list of places

2.1.2. Arguments:

  • Context context: Context of place adapter
  • List places: List of given places

2.1.3. Return:

  • Type: Constructor

2.2. getView

2.2.1. Description:

  • Returns the View in given position

2.2.2. Arguments:

  • int position: Position of the View
  • View convertView: Old view that will be reused
  • ViewGroup parent: Parent that this view will be attached to

2.2.3. Return:

  • Type: View
  • Description: Updated view

2.2.4. Variables:

Name Type Description Default Value
place Place Place object at the given position * * *
viewHolder ViewHolder ViewHolder to show the place in a item of the list * * *
placeNameText String Stores the name of the place summarized if its size is greater than the maximum * * *

2.3. resumePlaceName

2.3.1. Description:

  • If the place name is greater, reduces the place name to the maximum size and add ellipsis

2.3.2. Arguments:

  • String placeName: Name of the place

2.3.3. Return:

  • Type: String
  • Description: Name of the place reduced

2.3.4. Variables:

Name Type Description Default Value
placeNameText String Stores the final place name, reduced if needed * * *
⚠️ **GitHub.com Fallback** ⚠️