-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Welcome to the Equipo5 wiki!
feature/{nombre_del_branch} -> cuando realizamos un task o creamos una nueva funcionalidad
bugfix/{nombre_del_branch} -> Cuando trabajamos en arreglar bugs antes del release
hotfix/{nombre_del_branch} -> Cuando trabajamos en arreglar bugs despues del release y necesitamos arreglarlo urgentemente
{carpeta}/{codigo_del_ticket}_{Descripcion del ticket}
Ejemplo:
feature/ABC-001_implementacion-del-drawer-menu
Cuando hacemos un commit primero pondremos el codigo del ticket, la razon es porque asi podremos trackear de donde viene una vez mergeamos el branch con develop ya que una vez mergeado el branch se destruira por defecto.
Ejemplo:
ABC-001: incluir colores predeterminados en colors.xml
The companion objects should have been declared just below the class declaration. There are 2 main trends to position this singleton: at the top of the class or at the bottom. Normally it should depend on the importance of the variables or functions declared. Due to we use to write extras, request codes, functions for starting the activities and so on, it is logical to put it at the top of the class.
The order of the functions in a class, should follow a logical way for understanding the behavior. For example, in an Activity, the first functions must be the lifeCycle ones: onCreate(), onResume(), onActivityResult(), etc. The order of those functions, should be written (more or less) in the order of trigger that the Activity has. Another example: the init{} statement must be at the very beginning of the class, just below the companion object if it exists.
Commonly, the name of the packages will be on singular. I.e.: adapters Vs adapter
Activity Example: MainActivity, LoginActivity
This way of naming is for handing the lack of subfolders in the layout folder.
The layouts for the activities, fragments and so on, must be named starting with the name of the type of class, followed by the name of the feature in snake case. Example: MainActivity activity_main Example: BeautyOnboardingFragment fragment_beauty_onboarding_fragment
The items must be called with the prefix item_.
Prefixes
Widget | Prefix |
---|---|
TextView | tv |
ImageView | iv |
LinearLayout | ll |
Button | btn |
EditText | et |
ConstraintLayout | cl |
Toolbar | tb |
TextureView | textureView |
Checkbox | cb |
RecyclerView | rv |
... | ... |
Example: list of countries countries. Avoid things like countriesList or worse, listCountries. If a country is a object of the type Coun try, the list is just its plural (due to collections are the most used list).
The extra variables used for passing data to an Activity have to follow this convention: EXTRA_
The argument variables used for passing data to a Fragment have to follow this convention: ARG_
The extra variables used for getting data from an Activity (usually on the onActivityResult) have to follow this convention: EXTRA_RESULT_
The extra variables used for getting data from a Fragment (usually on the onActivityResult) have to follow this convention: ARG_RESULT_
The request code has to follow this naming convention REQUEST_CODE_
Additionally, it is highly recommended to use a single enum or constant values for all the project for ensuring the request code are not repeated with the consequent source of bugs.