QuickActionView in Android

While I was searching for an custom implementation of the QuickContactBadge for Android, I went into this interesting post ( Lorenz’s Blog ), which had a custom widget called QuickAction.
While it’s a very nice widget, it didn’t fit my needs because I had the necessity of create different action layouts ( horizontal, vertical, grid.. ), so I made a very quick modification to the above code and I ended with this implementation.
Basically I removed from the original Class the ActionItem list and set a BaseAdapter as content source. In this way it’s more simple and easy to add more and different views to the widget.
Moreover I added the support for columns ( both fixed and automatic ).
Here you can see a snippet code of the QuickActionView creation:

[cc lang=”java”]
public void onButtonClick( View v ) {

// create the quick action view, passing the view anchor
QuickActionView qa = QuickActionView.Builder( v );

// set the adapter
qa.setAdapter( new CustomAdapter( this ) );

// set the number of columns ( setting -1 for auto )
qa.setNumColumns( (int) (2 + (Math.random() * 10)) );
qa.setOnClickListener( new DialogInterface.OnClickListener() {

@Override
public void onClick( DialogInterface dialog, int which ) {
dialog.dismiss();
Toast.makeText( getBaseContext(), “Selected item: ” + which, Toast.LENGTH_SHORT ).show();
}
} );

// finally show the view
qa.show();
}
[/cc]

Here some Screenshots:

And here you can find the source code: source code

FBTracer updated to Firefox 5

FBTracer in action

FBTracer aka Flash Tracer has been just updated to version 0.1.3 ( also thanks to Daniel D. Vanzin ) which is now compatible with the new Firefox 5.

If you already have the extension installed it’s just a matter of check updates from the addons firefox page, otherwise you can download the extension from this page: http://blog.sephiroth.it/firefox-extensions/flash-tracer-for-firebug/

Note. After a fresh install or update of the plugin, sometimes the fbtracer panel doesn’t refresh itself… in that case a firefox restart will fix the problem.