-
Notifications
You must be signed in to change notification settings - Fork 2
ShowUser
Izabela Cardoso edited this page May 9, 2016
·
6 revisions
| Name | Type | Description | Default Value |
|---|---|---|---|
| INVALID_IDENTIFIER | final int | Stores a invalid identifier to initialize identifier variables | -2 |
| userEvaluatedId | String | Stores the identifier of the user who has your information shown and can be evaluated | INVALID_IDENTIFIER |
| currentUserId | int | Stores the identifier of the user logged in | INVALID_IDENTIFIER |
- Constructor to instantiate a ShowUser object
- No arguments
- Type: Constructor
- 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 Register fragment
| Name | Type | Description | Default Value |
|---|---|---|---|
| showUserView | View | Stores the view of the fragment obtained through the layout XML | * * * |
| isUserLoggedIn | boolean | Stores the user login status, must be true if the user is logged in and false if the user is logged out | * * * |
| loginUtility | LoginUtility | Object that allows the access of the login utility methods | * * * |
- Triggers actions that must be done when the rating changes
- RatingBar ratingBar: The RatingBar whose rating has changed
- float rating: The current rating (Must be >=0 and <=5)
- boolean fromUser: True if the rating change was initiated by a user's touch gesture or arrow key/horizontal trackbell movement
- Type: void
| Name | Type | Description | Default Value |
|---|---|---|---|
| userEvaluation | UserEvaluation | Object to instantiate an user evaluation when the evaluator user set the rating at the ratingBar | null |
| userEvaluationDAOn | UserEvaluationDAO | Object to access DAO method that allows to save the user evaluation at database | * * * |
- Instantiates an UserEvaluation object
- Float rating: Evaluation given to the user (Must be >=0 and <=5)
- Integer userId: Identifier of the evaluator user
- Integer userEvaluatedId: Identifier of the user evaluated
- Type: void
| Name | Type | Description | Default Value |
|---|---|---|---|
| SUCCESSFUL_EVALUATION_MESSAGE | String | Message for inform that the evaluation was registered with success | "Avaliação cadastrada com sucesso" |
- Get the user name, birth date and mail from database
- String userName: String to stores the name of the user
- String userBirthDate: String to stores the birth date of the user
- String userMail: String to stores the mail of the user
- Type: void
| Name | Type | Description | Default Value |
|---|---|---|---|
| userDAO | UserDAO | Object that allows access the DAO method to search user information at database | * * * |
| userData | JSONObject | Stores the result of the search that contains the user information | * * * |
- If the user already has an evaluation, this method sets it at ratingBar
- RatingBar ratingBar: RatingBar to sets the evaluation
- Type: void
| Name | Type | Description | Default Value |
|---|---|---|---|
| userEvaluationDAO | UserEvaluationDAO | Object that allows access the DAO method to search an user evaluation at database | * * * |
| userEvaluationAtDataBase | JSONObject | Stores the result of the search that contains the data of the user evaluation if the user already has, or null if he has not | * * * |
| currentEvaluation | Float | Stores the user evaluation as float obtained through the data stored in the JSONObject userEvaluationAtDataBase | * * * |
- Sets the TextViews to show the user information
- View showUserView: View that contains the TextViews
- String userName: Name to be set at the text view that shows the user name
- String userBirthDate: Date to be set at the text view that shows the user birth date
- String userMail: Mail to be set at the text view that shows the user mail
- Type: void
| Name | Type | Description | Default Value |
|---|---|---|---|
| userNameTextView | TextView | TextView that shows the name of the user | * * * |
| userDateTextView | TextView | TextView that shows the birth date of the user | * * * |
| userMailTextView | TextView | TextView that shows the mail of the user | * * * |
- Verify if the user is logged in or logged out
- No arguments
- Type: boolean
- Description: True if the user is logged in and false if the user is logged out
| Name | Type | Description | Default Value |
|---|---|---|---|
| isUserLoggedIn | boolean | True if the user is logged in and false if the user is logged out | false |
| loginUtility | LoginUtility | Object that allows access the LoginUtility method to check if the user is logged | * * * |
- Sets the message of the ratingBar label based on user login status
- View showUserView: View that contains the ratingBar label
- String message: Message to be displayed at the label
- Type: void
| Name | Type | Description | Default Value |
|---|---|---|---|
| ratingMessageTextView | TextView | TextView that shows the message of the ratingBar label | * * * |
- Sets the necessary configurations of the ratingBar based on user login status
- boolean isUserLoggedIn: User login status
- View showUserView: View that contains the ratingBarlabel
- Type: void
| Name | Type | Description | Default Value |
|---|---|---|---|
| LOGGED_IN_MESSAGE | final String | Message to be displayed at the rating bar label for the users logged in | "Sua avaliação:" |
| LOGGED_OUT_MESSAGE | final String | Message to be displayed at the rating bar label for the users logged out | "Faça login para avaliar este usuário!" |
| ratingBar | RatingBar | Rating bar to be configured | * * * |
- Sets the style of the ratingBar
- RatingBar ratingBar: RatingBar to have its style set
- Type: void
| Name | Type | Description | Default Value |
|---|---|---|---|
| stars | LayerDrawable | Stars of the rating bar to have their color set | * * * |
- [Stylesheet] (Stylesheet)
-
[EditOrRemoveFragment] (EditOrRemoveFragment)
-
[RegisterFragment] (RegisterFragment)
-
[ShowUser] (ShowUser)
-
[ShowPlaceRank] (ShowPlaceRank)
-
[ShowTop5Ranking] (ShowTop5Ranking)
-
[ListEvents] (ListEvents)
-
[DisableAccountFragment] (DisableAccountFragment)
-
[PlaceDAO] (PlaceDAO)
-
[UserDAO] (UserDAO)
-
[EventCategoryDAO] (EventCategoryDAO)
-
[UserEvaluationDAO] (UserEvaluationDAO)
-
[EventEvaluation] (Class-EventEvaluation)
-
[Place] (Place)
-
[User] (Class-User)
-
[UserEvaluation] (UserEvaluation)