Search in sources :

Example 6 with EditableDrawable

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);
    }
}
Also used : EditableDrawable(com.aviary.android.feather.library.graphics.drawable.EditableDrawable)

Example 7 with EditableDrawable

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);
    }
}
Also used : EditableDrawable(com.aviary.android.feather.library.graphics.drawable.EditableDrawable)

Aggregations

EditableDrawable (com.aviary.android.feather.library.graphics.drawable.EditableDrawable)7 DrawableHighlightView (com.aviary.android.feather.widget.DrawableHighlightView)3 ImageViewDrawableOverlay (com.aviary.android.feather.widget.ImageViewDrawableOverlay)3 Paint (android.graphics.Paint)2 MoaActionList (com.aviary.android.feather.library.moa.MoaActionList)2 Matrix (android.graphics.Matrix)1 Rect (android.graphics.Rect)1 RectF (android.graphics.RectF)1 Handler (android.os.Handler)1 ResultReceiver (android.os.ResultReceiver)1 KeyEvent (android.view.KeyEvent)1 View (android.view.View)1 OnKeyListener (android.view.View.OnKeyListener)1 EditText (android.widget.EditText)1 ImageView (android.widget.ImageView)1 TextView (android.widget.TextView)1 MoaAction (com.aviary.android.feather.library.moa.MoaAction)1 MoaColorParameter (com.aviary.android.feather.library.moa.MoaColorParameter)1 MoaPointParameter (com.aviary.android.feather.library.moa.MoaPointParameter)1 AdapterView (com.aviary.android.feather.widget.AdapterView)1