if(shape.getGraphicsAlgorithm() instanceof MultiText) {
MultiText text = (MultiText) shape.getGraphicsAlgorithm();
text.setHeight(height - 25);
text.setWidth(width);
} else if(shape.getGraphicsAlgorithm() instanceof Image) {
Image image = (Image) shape.getGraphicsAlgorithm();
if(bo instanceof CallActivity) {
// calculate position for icon
final int iconWidthAndHeight = 10;
final int padding = 5;
final int xPos = (context.getShape().getGraphicsAlgorithm().getWidth() / 2) - (iconWidthAndHeight / 2);
final int yPos = context.getShape().getGraphicsAlgorithm().getHeight() - padding - iconWidthAndHeight;
image.setX(xPos);
image.setY(yPos);
} else {
int imageX = image.getX();
if(imageX > 20) {
image.setX(width - 20);
}
}
} else if(shape.getGraphicsAlgorithm() instanceof Text) {
Text text = (Text) shape.getGraphicsAlgorithm();
text.setHeight(height - 25);