use of org.thoughtcrime.securesms.scribbles.viewmodel.TextLayer in project Signal-Android by WhisperSystems.
the class ScribbleActivity method addTextSticker.
protected void addTextSticker() {
TextLayer textLayer = createTextLayer();
TextEntity textEntity = new TextEntity(textLayer, scribbleView.getWidth(), scribbleView.getHeight());
scribbleView.addEntityAndPosition(textEntity);
// move text sticker up so that its not hidden under keyboard
PointF center = textEntity.absoluteCenter();
center.y = center.y * 0.5F;
textEntity.moveCenterTo(center);
// redraw
scribbleView.invalidate();
startTextEntityEditing();
changeTextEntityColor(toolbar.getToolColor());
}
use of org.thoughtcrime.securesms.scribbles.viewmodel.TextLayer in project Signal-Android by WhisperSystems.
the class ScribbleActivity method createTextLayer.
private TextLayer createTextLayer() {
TextLayer textLayer = new TextLayer();
Font font = new Font();
font.setColor(TextLayer.Limits.INITIAL_FONT_COLOR);
font.setSize(TextLayer.Limits.INITIAL_FONT_SIZE);
textLayer.setFont(font);
return textLayer;
}
Aggregations