WordPress for Android 1.0 Released

It’s been a busy few months for me. wpToGo has grown up and become the official WordPress client for Android! I added a lot of new features to it including creating and managing pages, replying to comments and a lot more! I’m also very excited to open up the app to the developer community to make the app super awesome! Video upload? Stats viewing? UI Sexiness? All should be coming :P

Check out the official site for more info. If you’re interested in getting involved with developing the app please visit the developer blog where I’ll be hanging out.

Opening a Banana Like a Monkey

I’d have to say my favorite website of 2009 has been lifehacker, which posts nifty tips and tricks for us geeks out there including software downloads and cool desktop wallpapers. They even have a Food Hacks category where they offer tips on how to eat better. I’d have to say that my favorite post was ‘Opening a Banana Like a Monkey‘, which has forever changed how I open one of my favorite fruits!

Check out the video:

Footprints in the Mushroom Kingdom

After rescuing the princess,
Luigi took a flight across the Mushroom Kingdom in a Lakitu cloud
to reminisce on his recent adventure with Mario.
In each world he noticed footprints in the ground.
Sometimes there were two sets of footprints,
other times there were one set of footprints.

This bothered Luigi because he noticed
that during the low periods of their adventure,
when he was suffering from
anguish, sorrow or defeat,
he could see only one set of footprints.

So he said to Mario,
“You promised me Mario,
that if I followed you and helped you rescue the princess,
you would walk with me always.
But I have noticed that during
the most trying periods of our adventure.
such as world 8-4,
there have only been one
set of footprints in the ground.
Why, when I needed you most,
you have not been there for me?”

Mario then replied with a smirk in his moustache,
“The times when you have
seen only one set of footprints,
is when I carried you.”

Footprints in the Sand adapted by Dan :)

Working with the Android ListView

Lately I have been working on adding some great new features to wpToGo, including improving the UI for the comment moderation area. I discovered that the Gravatar API was extremely easy to implement and thought it’d be great to have in my wpToGo’s comment moderation ListView.

Turns out that working with Android Layouts can be fairly tricky these days as there’s now multiple devices in the market that have varying screen sizes. Let’s make a ListView layout that will stretch its elements to fit on any Android device and still look snazzy.

First, let’s take a look at the ListView layout code, nothing too surprising here:

list_view.xml

<ListView android:id="@android:id/list"
        android:layout_width="fill_parent" android:layout_height="fill_parent"
        android:layout_weight="1.0"
        android:textColor="#444444"
        android:divider="@drawable/list_divider"
        android:dividerHeight="1px"
        android:cacheColorHint="#00000000">
</ListView>

The only thing to note there is that I created my own divider gradient named “list_divider” which is an xml file that you throw in your drawable folder. This really isn’t that hard, you just specify the colors for the left, center and right side:

list_divider.xml

<?xml version="1.0" encoding="utf-8"?>
<layer-list
    xmlns:android="http://schemas.android.com/apk/res/android">
    <item>
        <shape>
            <gradient
                android:startColor="#999999"
                android:centerColor="#555555"
                android:endColor="#999999"
                android:height="1px"
                android:angle="0" />
        </shape>
    </item>
</layer-list>

So now we have our ListView ready to go, next is the layout for each row in the list. This is also done through a layout xml file that you specify later in your code. I wanted each row to have the Gravatar on the left, with all of the other content on the right so that it mirrored how comments appear on most WordPress blogs. Here’s the layout to get that to work:

row.xml

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
	android:layout_width="fill_parent"
	android:layout_height="fill_parent"
	android:orientation="horizontal"
	android:padding="4px">
	<ImageView android:id="@+id/avatar"
		android:layout_width="48px"
		android:layout_height="48px"/>
	<LinearLayout
		android:layout_width="fill_parent"
		android:layout_height="wrap_content"
		android:orientation="vertical"
		android:paddingLeft="4px">
		<LinearLayout
			android:layout_width="wrap_content"
			android:layout_height="wrap_content"
			android:orientation="vertical"
			android:layout_weight="1"
			android:gravity="center_vertical">
			<TextView android:id="@+id/name"
				android:layout_width="wrap_content"
				android:layout_height="wrap_content"
				android:layout_weight="1"
				android:gravity="left"
				android:textStyle="bold"
				android:singleLine="true"
				android:ellipsize="end"
				android:textColor="#444444"
				android:padding="0px"/>
			<TextView android:id="@+id/email_url"
				android:layout_width="wrap_content"
				android:layout_height="wrap_content"
				android:layout_weight="1"
				android:gravity="left"
				android:singleLine="true"
				android:ellipsize="end"
				android:padding="0px"
				android:textSize="10px"/>
			<TextView android:id="@+id/postTitle"
				android:layout_width="wrap_content"
				android:layout_height="wrap_content"
				android:layout_weight="1"
				android:gravity="left"
				android:singleLine="true"
				android:ellipsize="end"
				android:padding="0px"
				android:textSize="10px"/>
			<TextView android:id="@+id/comment"
				android:orientation="vertical"
				android:layout_width="wrap_content"
				android:layout_height="wrap_content"
				android:singleLine="false"
				android:textColor="#666666"
				android:maxLines="5"
				android:ellipsize="end"/>
		<TextView android:id="@+id/status"
				android:orientation="vertical"
				android:layout_width="wrap_content"
				android:layout_height="wrap_content"
				android:singleLine="true"/>
		</LinearLayout>
	</LinearLayout>
</LinearLayout>

With all of that implemented and doing some background work to load the content, you’ll have a nice looking ListView row comment layout:

And there you have it, a nice looking comment ListView in Android.

Faces.




The Muppets Do Bohemian Rhapsody

Thanks to Beth for passing this one along! A truly epic undertaking!

p.s. Happy Thanksgiving Friends!

What’s in There?

image

I would never, ever eat the top one. Is it stuffed with puke?

Happy Halloween!

…cluck…cluck!
hazel-chicken (1 of 1)

UAF Nanook Hockey

I… am in love with this video.

Seriously, so beautiful!

Great Weekend!

image

Had a great time this weekend with family up at Snoqualmie pass. Had some fun walks to the lakes, and played a ton of Bohnanza and Ticket to Ride. We came home and saw the Seahawks roll over the Rams in HD!

Shot above is of Gold Creek pond.

Next Page »


My del.icio.us Links

Categories

Archives