The GDCatalog app of the GreenDroid framework provides a good example on setting a drawable image logo in the ActionBar. However, suppose you want to dynamically change it. The only way is to code it. I am sure the first thing that you would do is to set the ActionBar method setBackgroundResource() or setBackgroundDrawable().
The problem with this is that the image gets stretched. Looking at the GreenDroid source, the ActionBar contains a TextView widget that displays the title if you set a String value to it. This was the reference I needed. However, calling the same methods to set the background still stretched the image.
The solution is to use the method setCompoundDrawablesWithIntrinsicBounds() and apply the left Drawable (or whichever position you want the logo to appear in e.g. center, right, etc).
This is how you do it in code. Oh, and make sure you set the TextView value to empty.
TextView tv = (TextView) mActivity.findViewById(R.id.gd_action_bar_title);
tv.setCompoundDrawablesWithIntrinsicBounds(mActivity..getResources().getDrawable(R.drawable.logoimage), null, null, null);