Desarrollando una aplicación basica en Kotlin [ESP-ENG]
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.

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.
Thanks for your contribution to the STEMsocial community. Feel free to join us on discord to get to know the rest of us!
Please consider delegating to the @stemsocial account (85% of the curation rewards are returned).
You may also include @stemsocial as a beneficiary of the rewards of this post to get a stronger support.
Congratulations @dobro2020! You have completed the following achievement on the Hive blockchain And have been rewarded with New badge(s)
Your next target is to reach 2500 comments.
You can view your badges on your board and compare yourself to others in the Ranking
If you no longer want to receive notifications, reply to this comment with the word
STOP
Check out our last posts: