자답입니다.
private Bitmap setIcons(String title, String contents)
{
LayoutInflater inflater = (LayoutInflater)getSystemService(LAYOUT_INFLATER_SERVICE);
v = inflater.inflate(R.layout.cargo_map_marker, null);
if (v.getMeasuredHeight() <= 0) {
v.measure(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT);
TextView tvTitle = (TextView)v.findViewById(R.id.cargoMap_info_title);
TextView tvContents = (TextView)v.findViewById(R.id.cargoMap_info_contents);
tvTitle.setText(title);
tvContents.setText(contents);
Bitmap b = Bitmap.createBitmap(v.getMeasuredWidth(), v.getMeasuredHeight(), Bitmap.Config.ARGB_8888);
Canvas c = new Canvas(b);
v.layout(0, 0, v.getMeasuredWidth(), v.getMeasuredHeight());
v.draw(c);
return b;
}
TextView tvTitle = (TextView)v.findViewById(R.id.cargoMap_info_title);
TextView tvContents = (TextView)v.findViewById(R.id.cargoMap_info_contents);
tvTitle.setText(title);
tvContents.setText(contents);
Bitmap b = Bitmap.createBitmap( v.getLayoutParams().width, v.getLayoutParams().height, Bitmap.Config.ARGB_8888);
Canvas c = new Canvas(b);
v.layout(v.getLeft(), v.getTop(), v.getRight(), v.getBottom());
v.draw(c);
return b;
}