About

As a basically new and aspiring programmer, I have started off my journey using Android App Studio. I have decided to mark down all my little victories across my "journey." Although most people decide to take a class or something of the sort, I decided to only focus on programming as a side project. Nothing too serious, right? Well, that's how it was in the beginning when I was using MIT App Inventor. Just playing around with the tutorials. That's how it was for a little less then a month until I got the idea to make a tanakh for android. I had always been searching for one (on my android running tablet), but never did I seem to find one that fitted my taste. I mean, it's not like I wanted such a complicated one, all I wanted was a Hebrew-English one! So I set to work with MIT App Inventor creating such a thing. All the buttons were set up and all the procedures were too. Then however, I started to enter the actual text. That's when all the problems hit. Turns out in the end that MIT App Inventor has a max size for your app. After a while of thinking about it, I decided to give real hard-core programming a chance (you know the thing that looks really complicated with a bunch of letters?). This blog will show my progress and teach you the techniques I'm using in a quite simple way.

Monday, June 2, 2014

The UI Interface- Background

First things first, I needed to set up the user interface. My goal was to get the first screen to look like this:



To do this, I needed to set up the background.  After a while of researching, I learnt that to set the background I needed to go into my computer files to
>Users >Lily >AndroidStudioProjects >MyApplication5 >app >src >main >res >drawable-mdpi

then drag and drop (or paste) the image into the folder.


Now we go to Android App Studio where we will see that the image is now available to us:


We go to activity_main.xml and enter the following:

You can ignore the rest, all we really need to focus on is how it says android:background="@drawable/index" Realize that it is considered a drawable.  Also keep in mind that your file name will be different. I wrote index after the / because the file name is index.jpg.  If your file name is sky.jpg, then you would write android:background="@drawable/sky"


No comments:

Post a Comment