Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Getting started

 
Jim Venolia
Ranch Hand
Posts: 248
2
Chrome Linux VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A little background. Been using *nix since about '84 or so. Started with Linux in 94. Contributed to the Linux firewire and ethernet driver code. Ported Linux to the SH-4 microprocessor in 2000, where the code died when the startup I was working for went toes up. Written several Linux device drivers for custom chips (none of which are in the Linux tree because, well, I'm a code monkey, not a legal monkey).

That is to say, I know my way around programming, and Linux, and am currently learning Java.

I wrote a "hello world" program this afternoon. Did it in some Java file Eclipse created for me. But google leaves the impression I should have done this in an xml file somewhere.

The goal is to write a simple 2D graphics game (probably pong or breakout), then partner with someone who is an idea generator and Get Rich Soon. But Hello World taught me there is a lot of stuff to know that has nothing to do with programming.

My question is, is there a good resource for learning how you *should* learn to write Android apps? Book or website, doesn't matter.

If you're interested, my Hello World lists the prescription drugs I take daily, the relevant code is:



Comments on how much this code sucks appreciated.
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The usual way to create layouts in Android is indeed via XML files. That's not to say that doing it programmatically is inherently wrong, but it is the exception - any open source Android app you look at will generally have numerous XML files in the res/layout directory that describe the details of how things are displayed. And any static text that is displayed will usually be kept in the res/values/strings.xml file, and then be referenced by the TextView that display it. The activity code would then be a mere:

assuming main.xml is the layout file. A lot you need to know about that can be found at http://developer.android.com/guide/topics/ui/declaring-layout.html (and just about everything written in http://developer.android.com/guide/components/index.html and its linked pages is good to know). Android is by now a huge subject, a book would really help organize for you all that's out there. I liked Android in Action, but there are numerous others; some are listed in the http://www.coderanch.com/how-to/java/AndroidFaq. The odds of creating an app successful enough to provide even a modest living for a team of 1 or 2 are just about zero, I'd estimate (unless you jump in full time). The expectation of users who should pay for the app (or make in-app purchases) are high these days, due to the large number of competing offerings, so it's hard to create something polished enough to find lots of users. Not to discourage you, mind you, just to set expectations properly.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic