Archive | Programming RSS for this section

My first app! (Scale Randomiser)

At the moment I’m learning Java and Android Development (I did a post on it here and here), and with some basic knowledge I’ve decided to start making my first Android app!

Read More…

Advertisements

XML in Android Development

In Android Development, as I have already said, you use two languages (mostly), Java and XML. Java is used to make things happen while XML lays everything out.

Its a bit of a parallel to web design, HTML and CSS lays everything out and Javascript tells everyone what to do. Here XML lays everything out Java tells everyone what to do.

XML looks like HTML at first sight but then when you notice that there’s no HTML tag you start to get worried. XML and HTML work in tags:

“html’   “/html’                  (replace the ” with < and ‘ with >)

The first one opens the tag, the second one closes it.

In Android, XML lays out two different types of things: 1. The layout of each screen (Activity) 2. The layout of the app itself in the AndroidManifest.xml.

The layout of each screen starts with your common <?xml> tag and then after that the tags are used as parents and children. The “LinearLayout” tag might come first (the parent) and then inside it would be its children, say an “EditText” tag (a text box) or a “Button”. Then because it is XML, you can add attributes which go inside the tag. These will describe what the object will look like:    android:gravity=”center”   would make it in the middle of the screen.

The AndroidManifest.xml is something slightly different. This states all of the Activities in the app and the “intents”. Intents tell the user before they install the app that it will use certain permissions (maybe accessing the internet).

I hope this tells you something new!

tech189

Android Development

I have recently begun learning how to make Android apps. I have been using a set of tutorials made by mybringback (http://www.mybringback.com).

I have progressed through 12 of these tutorials so far and I have made a splash screen and a main page. He’s very good at explaining and he’s made Java and XML for Android a lot easier than a book in my opinion.

There are 40 tutorials in total and I will go through them all.

I could have just learned Java and then Android but it would take longer to get to my goal, making a solid Android app which I can run on my phone, because Java is designed for programs and I would have to learn all of the “imports” for GUI on a computer rather than the “imports” for the Android OS.

From time to time I might post details of how I’m getting on.

EDIT: Just if you were wondering, I’m using the Android Development Bundle from the official Android page. I comes with the SDK, an emulator and the Android Developer Tools which is just Eclipse with lots of plugins pre-installed.

tech189

Janet's Writing Blog

I enjoy doing the research for and writing southern historical fiction. The novel I'm writing is set in the Carolinas in the 1760s. I also wrote a vintage postcard book for Arcadia Publishing titled The Blue Ridge Mountains of North Carolina. This blog chronicles my journey as a writer. Come along!

The Knightly Reader

Always honored to read and review. Especially at night.

raqibzaman

Rock It!

Reymon de Real Photography

Amateur photography by a professional Physical Therapist!