use of com.aviary.android.feather.library.graphics.drawable.EditableDrawable in project mobile-android by photo.
the class MemePanel method endEditView.
/**
* Terminates an edit view.
*
* @param hv
* the hv
*/
private void endEditView(DrawableHighlightView hv) {
EditableDrawable text = (EditableDrawable) hv.getContent();
mLogger.info("endEditView", text.isEditing());
if (text.isEditing()) {
text.endEdit();
endEditText(hv);
}
CharSequence value = text.getText();
if (topHv.equals(hv)) {
editTopButton.setText(value);
clearButtonTop.setVisibility(value != null && value.length() > 0 ? View.VISIBLE : View.INVISIBLE);
} else if (bottomHv.equals(hv)) {
editBottomButton.setText(value);
clearButtonBottom.setVisibility(value != null && value.length() > 0 ? View.VISIBLE : View.INVISIBLE);
}
}
use of com.aviary.android.feather.library.graphics.drawable.EditableDrawable in project mobile-android by photo.
the class MemePanel method beginEditView.
/**
* Begins an edit view.
*
* @param hv
* the hv
*/
private void beginEditView(DrawableHighlightView hv) {
mLogger.info("beginEditView");
final EditableDrawable text = (EditableDrawable) hv.getContent();
if (hv == topHv) {
endEditView(bottomHv);
} else {
endEditView(topHv);
}
if (!text.isEditing()) {
text.beginEdit();
beginEditText(hv);
}
}
Aggregations