Search in sources :

Example 6 with TextEntity

use of org.thoughtcrime.securesms.scribbles.widget.entity.TextEntity in project Signal-Android by WhisperSystems.

the class ScribbleActivity method changeTextEntityColor.

private void changeTextEntityColor(int selectedColor) {
    TextEntity textEntity = currentTextEntity();
    if (textEntity == null) {
        return;
    }
    textEntity.getLayer().getFont().setColor(selectedColor);
    textEntity.updateEntity();
    scribbleView.invalidate();
}
Also used : TextEntity(org.thoughtcrime.securesms.scribbles.widget.entity.TextEntity)

Example 7 with TextEntity

use of org.thoughtcrime.securesms.scribbles.widget.entity.TextEntity in project Signal-Android by signalapp.

the class MotionView method afterTextChanged.

@Override
public void afterTextChanged(Editable s) {
    String text = s.toString();
    MotionEntity entity = getSelectedEntity();
    if (entity != null && entity instanceof TextEntity) {
        TextEntity textEntity = (TextEntity) entity;
        if (!textEntity.getLayer().getText().equals(text)) {
            textEntity.getLayer().setText(text);
            textEntity.updateEntity();
            MotionView.this.invalidate();
        }
    }
}
Also used : MotionEntity(org.thoughtcrime.securesms.scribbles.widget.entity.MotionEntity) TextEntity(org.thoughtcrime.securesms.scribbles.widget.entity.TextEntity)

Example 8 with TextEntity

use of org.thoughtcrime.securesms.scribbles.widget.entity.TextEntity in project Signal-Android by signalapp.

the class ScribbleActivity method changeTextEntityColor.

private void changeTextEntityColor(int selectedColor) {
    TextEntity textEntity = currentTextEntity();
    if (textEntity == null) {
        return;
    }
    textEntity.getLayer().getFont().setColor(selectedColor);
    textEntity.updateEntity();
    scribbleView.invalidate();
}
Also used : TextEntity(org.thoughtcrime.securesms.scribbles.widget.entity.TextEntity)

Aggregations

TextEntity (org.thoughtcrime.securesms.scribbles.widget.entity.TextEntity)8 PointF (android.graphics.PointF)2 InputMethodManager (android.view.inputmethod.InputMethodManager)2 TextLayer (org.thoughtcrime.securesms.scribbles.viewmodel.TextLayer)2 MotionEntity (org.thoughtcrime.securesms.scribbles.widget.entity.MotionEntity)2