No Agenda Show On The Go app for Android

February 16, 2010

Listen to the No Agenda Show with Adam Curry and John C. Dvorak while you’re on the go! Connect to the live stream, and join the show’s chat room from anywhere on your Android phone. Play jingles from the show, too.

The app is free, and has an ad banner to support the show (all proceeds are donated to the show).

The app also has links to the podcasts, forums, and the donation page.  Coming soon: native IRC chat!

Download the app from the Android Market.

Or download directly from the No Agenda Show drop io.

wpToGo app for Android

October 17, 2009

I’m posting this from my G1 using the wpToGo app for Android. Not suited for longer posts of course, but I can see myself posting more often because of the convenience.

Context menus for expandable lists

October 16, 2009

An expandable list supports context menus in pretty much the same way that a standard list does: add a listener for the context menu (when the user has long-pressed on a list item). Unlike a standard list view, however, you probably want to know whether the user has selected a group (expandable item) or a child (sub-item) list item.

Furthermore, you might not want to do anything if the user tries to bring up a context menu on a group item. There might be cases where you would want to do something to all of the children under a group, but in my Librarium application, I wanted to ignore group items and present the context menu only for children.

First, you need to know when the context menu is going to be created so that you can identify whether the user pressed on a group or a child. If they pressed on a group, then cancel the context menu. This also gives us a chance to get the text of the child item, so that we can put it into the header of the context menu.

public void onCreateContextMenu(ContextMenu menu, View v,ContextMenuInfo menuInfo) {

super.onCreateContextMenu(menu, v, menuInfo);

ExpandableListView.ExpandableListContextMenuInfo info =

(ExpandableListView.ExpandableListContextMenuInfo) menuInfo;

int type =

ExpandableListView.getPackedPositionType(info.packedPosition);

int group =

ExpandableListView.getPackedPositionGroup(info.packedPosition);

int child =

ExpandableListView.getPackedPositionChild(info.packedPosition);

//Only create a context menu for child items

if (type == 1) {

//Array created earlier when we built the expandable list

String page =mListStringArray[group][child];

menu.setHeaderTitle(page);

menu.add(0, MENU_READ, 0, “Read page”);

menu.add(0, MENU_EDIT, 0, “Edit page”);

menu.add(0, MENU_FAVORITE, 0, “Add page to favorites”);

menu.add(0, MENU_EXPORT, 0, “Export page to file”);

menu.add(0, MENU_DELETE, 1, “Delete page”);

}

}

Second, create the context menu:

public boolean onContextItemSelected(MenuItem menuItem) {

ExpandableListContextMenuInfo info =

(ExpandableListContextMenuInfo) menuItem.getMenuInfo();

int groupPos = 0, childPos = 0;

int type = ExpandableListView.getPackedPositionType(info.packedPosition);

if (type == ExpandableListView.PACKED_POSITION_TYPE_CHILD) {

groupPos = ExpandableListView.getPackedPositionGroup(info.packedPosition);

childPos = ExpandableListView.getPackedPositionChild(info.packedPosition);

}

//Pull values from the array we built when we created the list

String author = mListStringArray[groupPos][0];

String page = mListStringArray[groupPos][childPos * 3 + 1];

rowId = Integer.parseInt(mListStringArray[groupPos][childPos * 3 + 3]);

switch (menuItem.getItemId()) {

case MENU_READ:

readNote(rowId);

return true;

case MENU_EDIT:

editNote(rowId);

return true;

//etc….

default:

return super.onContextItemSelected(menuItem);

}

}

That’s it. Now users can long-press on an item in an expandable list, and get the context menu if it’s a child item.

Librarium released on Android

October 16, 2009

Do you enjoy reading Latin but don’t have the time to flip through your tattered dictionary? Tap your way through the Latin classics with my Librarium application on Android. Definitions for words are found online, and stored on your Android phone for quick display the next time.

If you know a little Latin, or remember some from high school, Librarium gets you back into reading Latin without all the drudgery of looking up all those definitions and declensions in the dictionary.

Add your own pages of text. Included are a sampling of poems by Catullus, and even the first paragraph from The Hobbit :)

Here is the list of pages by author (you can also list by title, recently read, or your favorites):

byauthor

Tap on any Latin word to see its English definition appear at the top of the page. You can also change the font size and style, or the day/night settings to make reading your Latin more enjoyable:

displaypage

If you want to override the online definition, simply long-press the word. You will see the full definition from the online dictionary, and you can edit the definition any way you like. This makes Librarium very useful for studying Latin or creating your own text translations.

definition-edit


Follow

Get every new post delivered to your Inbox.