Android Development – XML-Based Layout Requirements

Just a quick note to anyone like me experimenting with Android development. Take this XML snippet:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    >
<TextView
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:text="@string/hello"
    />
<Button
	android:id="@+id/btn01"
        android:text="@string/goButton"
    />
</LinearLayout>

I hit compile, it built fine and went to the simulator, but the app crashed right when it ran. Apparently, LinearLayout requires the layout_height and layout_width to be defined, as such:

<Button
	android:id="@+id/btn01"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:text="@string/goButton"
    />

I’ll continue to post these idiot moments as I find them…

Tags: , ,

Leave a Comment

Ants in my Zend Framework (with doctrine for good measure)

I’m starting to use Zend Framework 1.8.4 with Doctrine Object Relational Mapper (because after working on a java/hibernate project, I can’t go back to writing SQL and building databases)  With Doctrine ORM, you can define a data model in YAML or XML and it will build the database with foreign keys, etc, etc ,etc… learn more on that here.
Read More »

Tags: , , , ,

Comments (1)

Granite SecureAMFChannel – AMF over HTTPS

At work we’ve started to use JBoss, writing an application in Java and AS 3.0.  We’re using Seam and Tide to sandwich it all together, and we came upon a slight problem.  Everything worked out great in the test environment, but when we went live, on an HTTPS connection, firebug was reporting that the AMF request out of flex was failing.  That’s due to the services-config.xml in the application pointing to a non-secure connection.  After much digging, we found this to be the solution.
Read More »

Tags: , , , , , ,

Comments (2)

Intro to Grep for M$ People

In my “free time” I’ve been idly trying to become proficient at the *nix command line. As told by my previous “converting to Linux” article, I’m trying to make the shift over to Ubuntu full-time, but for a Microsoft-head such as myself, the move isn’t exactly instantaneous.

So, in an attempt to log my efforts, I’m going to start posting little pieces of information that learn/figure out. Today we start with a light lesson in grep.
Read More »

Comments (2)