Esto de estar estudiando un lenguaje de programación nativo para desarrollar aplicaciones en Android es increíble pero a la vez tiene demasiadas cosas para aprender y estudiar porque no es tan simple como agregar una simple línea de código y que todo funcione.
En este caso Gracias a un tutorial estoy desarrollando una aplicación que calcula un índice de masa corporal. Por el momento estoy solo con interfaces visuales y funcionalidades muy simples que son la de cambiar el color según se toque uno de los ítems o el otro.
Studying a native programming language to develop Android apps is incredible, but at the same time, there's a lot to learn and study because it's not as simple as adding a single line of code and making everything work.
In this case, thanks to a tutorial, I'm developing an app that calculates a body mass index. For now, I'm only using visual interfaces and very simple features, such as changing the color depending on whether you touch one item or another.

Lo primero que diseñé fue la interfase visuales que gracias al tutorial lo puedo hacer de manera relativamente sencilla y solo son dos tarjetas una con la leyenda de hombre y la otra de mujer.
Cada vez que uno realice un clic sobre una de esas dos tarjetas que hará seleccionada una de manera que la otra tendrá un color de fondo diferente para dar la sensación de que el usuario está ejecutando un toque sobre esa figura.
The first thing I designed was the visual interface, which I was able to do relatively easily thanks to the tutorial. It consists of just two cards, one labeled "man" and the other "woman."
Each time you click on one of those two cards, one will be selected, and the other will have a different background color to give the impression that the user is tapping on that figure.
Lo que me gusta de Kotlin es que se basa mucho en identificadores los cuales me permiten utilizar el código de manera directa pero requiere demasiadas funciones para algo que en otros lenguajes se hace de manera sencilla y no lo considero mal porque obliga a que uno estructure cada paso.
What I like about Kotlin is that it relies heavily on identifiers, which allow me to use the code directly, but it requires too many functions for something that is done easily in other languages, and I don't consider it bad because it forces you to structure each step.
Dentro de un archivo utilizo toda la lógica para hacer este cambio de colores y funciona de la siguiente manera primero se crean dos booleanos luego dos variables que permiten crearse antes de escribir todo el componente pero que se pueden utilizar después y al final las funciones que se ejecutan cuando se escriben dentro del componente que lo único que hacen es capturar las etiquetas y agregar funciones dentro de la etiquetas que administran el booleano de cada una y en color de fondo.
Inside a file I use all the logic to make this color change and it works as follows: first two booleans are created, then two variables that can be created before writing the entire component but that can be used later, and finally the functions that are executed when they are written inside the component, which only capture the labels and add functions inside the labels that manage the boolean of each one and the background color.