ShowTop5Ranking - ShutUpPaulo/TecProg_2016-01 GitHub Wiki
Name | Type | Description | Default Value |
---|---|---|---|
places | ArrayList<> | Stores the five places with better evaluation 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
- Overridden method that creates and returns the view hierarchy associated with the fragment
- 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
- Type: View
- Description: View of the ShowTop5Ranking fragment
Name | Type | Description | Default Value |
---|---|---|---|
top5RankingView | View | Stores the view of the fragment obtained through the layout XML | * * * |
listView | ListView | List to be filled with the top five places that make up the ranking | * * * |
completeRankingButton | Button | Button that triggers the action that opens the complete ranking | * * * |
- Method that fills the list of places
- ListView listToBeFilled: List to be filled with places
- Type: void
Name | Type | Description | Default Value |
---|---|---|---|
placesData | JSONObject | Stores the data of the top five places that will fill the list | * * * |
placeAdapter | PlaceAdapter | Required adapter to adapt items of the places array in items of the places list | * * * |
- Method that fills the list of places
- JSONObject placesData: Places data obtained through database
- ArrayList<> places: Array to be populated with places
- Type: void
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 | * * * |
- Callback method to be invoked when an item in AdapterView has been clicked
- 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
- Type: void
- Method that starts the activity with the information of a place
- int position: Position of the place at places array
- Type: void
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 | * * * |
- Method that sets the bundle with place information to allow send this information to an activity
- int position: Position of the place at places array
- Type: Bundle
- Description: Bundle with the place information to be sent to the activity that shows this information
Name | Type | Description | Default Value |
---|---|---|---|
placeInfo | Bundle | Bundle object that stores the data of the place clicked | * * * |
- Method that adds the fragment to the recommended events list at the view
- No arguments
- Type: void
Name | Type | Description | Default Value |
---|---|---|---|
recommendEventFragment | Fragment | Fragment to be added at the view | * * * |
fragmentTransaction | FragmentTransaction | Object that adds the fragment at the view | * * * |
- Overridden method that opens the complete ranking when the user click in the button that triggers that action
- View view: View that contains the button that triggers the action
- Type: void
Name | Type | Description | Default Value |
---|---|---|---|
fragmentTransaction | FragmentTransaction | Object that replace the current fragment with the fragment that shows the complete ranking | * * * |