ShowPlaceRank - ShutUpPaulo/TecProg_2016-01 GitHub Wiki
Name | Type | Description | Default Value |
---|---|---|---|
places | ArrayList<> | Stores the places to be displayed at the ranking |
- Constructor to instantiate a ShowPlaceRank object
- No arguments
- Type: Constructor
- Overridden method that calls the parent onCreate to setup the activity view that contains the fragment
- Bundle savedInstanceState: If non-null, this fragment is being re-constructed from a previous saved state as given here
- Type: void
Return type: View - View of the ShowPlaceRank fragment
Arguments:
LayoutInflater inflater - Object used to inflate any views in the fragment
ViewGroup container - If non-null, is the parent view that the fragment should be attached to
Bundle savedInstanceState - If non-null, this fragment is being re-constructed from a previous saved state as given here
Description: Overridden method that creates and returns the view hierarchy associated with the fragment
Name | Type | Description | Default Value |
---|---|---|---|
rankingView | View | Stores the view of the fragment obtained through the layout XML | |
listToBeFilled | ListView | List to be filled with the places that make up the ranking |
Return type: void
Arguments: ListView listToBeFilled - List to be filled with places
Description: Method that fills the list of places
Name | Type | Description | Default Value |
---|---|---|---|
placesData | JSONObject | Stores the data of the places that will fill the list | |
placeAdapter | PlaceAdapter | Required adapter to adapt items of the places array in items of the places list |
Return type: void
Arguments:
JSONObject placesData - Places data obtained through database
ArrayList<> places - Array to be populated with places
Description: Method that fills the list of places
Name | Type | Description | Default Value |
---|---|---|---|
placesDataSize | int | Stores the size of the JSONObject placesData | |
idPlace | int | Stores the identifier of the place obtained from database | |
placeName | String | Stores the name of the place obtained from database | |
placeEvaluate | String | Stores the average of place evaluation obtained from database | |
placeLongitude | String | Stores the longitude of the place localization obtained from database | |
placeLatitude | String | Stores the latitude of the place localization from database | |
placeAddress | String | Stores the address of the place obtained from database | |
placeDescription | String | Stores the description of the place obtained from database | |
placePhone | String | Stores the phone of the place obtained from database | |
placeOperationTime | String | Stores the operating hours of the place obtained from database | |
placesArrayListSize | int | Stores the size of the ArrayList places to check if the size increased by one after adding the place object at array |
Return type: void
Arguments:
AdapterView<?> parent - The AdapterView where the click happened
View view - The view within the AdapterView that was clicked
int position - The position of the view in the adapter
long id - The row identifier of the item that was clicked
Description: Callback method to be invoked when an item in AdapterView has been clicked
Return type: void
Arguments: int position - Position of the place at places array
Description: Method that starts the activity with the information of a place
Name | Type | Description | Default Value |
---|---|---|---|
Intent | intent | Intent object that allows the data transmission of the place clicked on list to the activity that shows this place information | |
placeInfoBundle | Bundle | Bundle object that stores the data of the place clicked to be saved in Intent |
Return type: Bundle - Bundle with the place information to be sent to the activity that shows this information
Arguments: int position - Position of the place at places array
Description: Method that sets the bundle with place information to allow send this information to an activity
Name | Type | Description | Default Value |
---|---|---|---|
placeInfo | Bundle | Bundle object that stores the data of the place clicked |