Create result Label in EditTextActivity in onStart and update it on any change

This commit is contained in:
Olga Miller 2017-03-05 14:21:09 +01:00
parent 24c5c1804b
commit a2911345c5
3 changed files with 75 additions and 47 deletions

View file

@ -18,6 +18,7 @@ package om.sstvencoder.TextOverlay;
import android.graphics.Color;
import java.io.Serializable;
import java.lang.reflect.Field;
public class Label implements Serializable {
public static final float TEXT_SIZE_NORMAL = 2f;
@ -122,4 +123,15 @@ public class Label implements Serializable {
public void setOutlineColor(int color) {
mOutlineColor = color;
}
public Label getClone() {
Label clone = new Label();
try {
for (Field field : getClass().getDeclaredFields()) {
field.set(clone, field.get(this));
}
} catch (Exception ignore) {
}
return clone;
}
}