Quick Android Development Tip: Reusing Layouts With Includes

Android development No Comments »

My last few Android development posts have been kind of long (took long to write anyway), so here's a short one...

Read more...

Restarting Eclipse Clean If You Cannot Run Eclipse From A Command Line (Mac OSX)

ColdFusion Builder , Eclipse 2 Comments »

So overnight an update to ColdFusion Builder was released. According to the update instructions, if you're running ColdFusion Builder as a plug-in to Eclipse (like I am), you need to start/restart Eclipse clean, which can be done by typing "eclipse -clean" at the command prompt within your Eclipse folder.

The problem I ran into was I couldn't do that on my MacBook Pro. I opend up a Terminal window, navigated to my Eclipse folder, tried the command, and was told "command not found." 

I had an eclipse exec file in the directory along with the normal Eclipse.app application bundle file, so I'm not sure why it didn't work. I probably either did something wrong or perhaps there's something funky about my Eclipse install.

But fortunately I found another way to launch Eclipse with the clean option in an old set of Eclipse (3.3) documentation.  Here's what I did (after installing the ColdFusion Builder update):

  • I opened a Finder window and navigated to my Eclipse directory.
  • I right-clicked on the Eclipse.app application bundle icon, and selected "Show Package Contents" from the context menu.
  • In the new Finder window that popped up, I went into Contents/MacOS, right-clicked on the eclipse.ini file, and chose to open it in TextEdit.
  • I added "-clean" to the top of the eclipse.ini file, saved the file, then closed it.
  • I then restarted Eclipse.
  • Once Eclipse was up and running, I re-opened the eclipse.ini file, removed the "-clean" line, and saved it again.

 

Defining Other Global Resources in Your Android Application

Android development No Comments »

In my last post, I talked briefly about how the R.java file, a resource file located in the "gen" folder of your Android application project that is automatically generated and updated by Eclipse and serves as a resource map. My example code demonstrated how you could reference layout.xml files via the R.java file and how Eclipse would register the id of the UI objects within the R.java file as well.

I also mentioned that the layout XML files for your Android app are located in a "layout" folder within the "res" ("resources") folder.  There are other folders under the "res" folder as well, and the content within those folders is also registered with the R file, allowing you to access those resources within your Android code.

Read more...

Interacting With UI Objects From the Layout in an Android Activity Object

Android development No Comments »

In my last post, I promised to show how I would attach my simple example layout to an Activity object and make a change or two.

Read more...

Creating Screen Layouts in Android Using XML

Android development No Comments »

In my last post, I alluded to the fact that you can lay out your visual elements and controls on your Android application screens (your Activity objects) using XML. In this post, I'm going to give you a peek at what that XML looks like.

Read more...