(M7) Write a Java program (Simple Android App)

Hi, hows it going, I’m Matt Bichay I’m going to walk you through how to solve the problem for this week’s programming assignment. I would imagine that most people’s problems will come from setting up Android Studio Its a bear sometimes. But… I’ve had some experience with it so it shouldn’t be too bad. The next step would be to properly setup the AVD. If you have an Android phone already, it makes it a lot easier. You just open up the settings application, then you scroll all the way down to the about page, find the build number, and then just tap it about 10 times extremely fast, and it will enable developer mode. You then go into the developer mode settings and you enable USB debugging; then you can use your phone to launch the application. You don’t have to use the virtual device that it has with Android Studio. That thing takes up a lot of memory, so especially if you have a laptop, it will go extremely slow and take forever. Yeah, so, the assignment is to take all your classes and stack them on top of each other in a big text field. Then add little check boxes next to them. You have pretty much two choice to do that, but I’m pretty sure there’s other ways to do it but, the two easiest ways ways would be to use XML document editor that they include with Android Studio. and… you just manually add a bunch of text boxes and a bunch of check boxes next to them, go through and edit each string, follow the video where Bucky teaches you how to add a string to your resource XML database. or you can do it with java code, Bucky goes over that in I think the 13th or 14th video. In my opinion I think thats the way you should do it because that’s how we’ve been learning for this entire class. But yeah, If you want to use the XML editor, thats totally fine also. Yeah, so you just add each class, if you do it with java you can write a function that you pass a string and a check box and it will pair the two together and then display it on to your page, then you just save it in a big array or any kind of container you want to use. then at the very end, you just add a button called “submit” or something like that. Then just to see if your code is working, you can add like an onClickListener so when you click the submit button you could parse through all of your check boxes and see which ones are checked and use the logging utility to to log out the string that is next to the check box. You can use that with the… I think the Android.util.log API. Then after that, you want to change the background color. I think you want to change the background color of all the text boxes, text color or the background color of the entire activity page. And you can do that just by either going into the XML and googling your favorite color in hex. Then adding the color attribute, Bucky teaches you how to do that in video 9. So yeah, after you change the background color, you can go through and try to add little cool things, like adding the CSUMB logo to the top of the activity, or you can add it to an icon, the launcher icon, both of those are really simple to do and takes a little bit of googling. you can figure it out! Yeah so, good luck everybody, this shouldn’t be too hard of a project, if you need to find extra information the Android documentation is extremely good, its one of the best documentations I’ve read so… I wouldn’t hesitate to look there first! Good luck everybody, bye!

2 thoughts on “(M7) Write a Java program (Simple Android App)

Leave a Reply

Your email address will not be published. Required fields are marked *