DEV Community

KevinSarav
KevinSarav

Posted on

Update on Progress

Hello. This post will summarize what I've learned and what I hope to improve, as well as what changes have occurred.

I'm currently not part of the job search site project anymore. However, everything I learned about web development getting ready for that project is still intact. I've reached the final projects of the Udemy web dev course. My biggest challenge with the face recognition project is making a box appear where the face is, but the coordinates of the box are printed on the console.

I'm currently taking an interest in and learning Android app development. I'm going through free YouTube videos to learn. I'm mainly interested because it uses Java, which I love a lot more than web development languages.

I've completed a series of videos on using Java to make Android apps. I'm currently reading a book that goes over Kotlin's application to Android. So far, the first quarter taught how it differed with Java and other features of it, but I have yet to learn how to apply it to Android development.

The reason why I wanted to learn Kotlin for Android is because I read online that it is a very convenient and clean language to use. I find some of the things done with Java for Android development is redundant. Also, it's very similar to Java, which should make it easy to learn.

I'm trying to make an Android calculator app using Kotlin. My calculator app is attempting to mimic the behavior of the Windows application, much like my Java program I mentioned already does. I wanted to transfer that concept to make an application using Kotlin. So far, my app consists of a TextView at the very top with the number aligned to the very right and a GridLayout that holds all the buttons.

Right away, one of the challenges is making the front end look neat. The buttons on the fifth column, the rightmost column, are cut in half. I could not find help online on how to tackle this. My workaround to this was to just shrink the buttons on the rightmost column so they fit inside of the emulated phone.

However, my next challenge is that when I emulate the app on my phone, it cuts off the fifth column entirely. This is my first time seeing first-hand what people mean when saying developing for Android is difficult because of the multitude of devices. I thought Android Studio would immediately scale my app so it would work on other phones, but that doesn't appear to be the case. I read solutions online that say the only way is to make separate XML files for small, normal, large and X-large screens, and then also landscape mode versions of those.

I could have made different XML files, but I did not want to go through such lengths for such a simple app. To work around this problem, I elected to remove one column from my GridLayout, center the GridLayout, and arrange the buttons to fit in this new, smaller GridLayout. In essence, I added a buffer/margin to either side of my GridLayout so that no matter the phone, all my buttons will fit inside.

In my next post, I hope to talk further about my calculator app.

Top comments (0)