Yes it is possible…You should extend ActivityGroup in Activity ‘A’.
Then do this in your button click event…
View view =getLocalActivityManager().startActivity("B",new Intent(this,B.class).addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)).getDecorView();
then convert that view as bitmap…
I think this is helpful for you…