private void setSelectedEndPos() { if (DBG) { Log.d(LOG_TAG, "--- setSelectEndPos:"); } if (mEST.getSelectionStart() == mCurStart) { setSelectedEndPos(mEST.getSelectionEnd()); } else { setSelectedEndPos(mEST.getSelectionStart()); } }
private void setSelectStartPos() { if (DBG) { Log.d(LOG_TAG, "--- setSelectStartPos"); } mCurStart = mEST.getSelectionStart(); mState = STATE_SELECT_ON; }
private void unsetSelect() { if (DBG) { Log.d(LOG_TAG, "--- offSelect"); } int currpos = mEST.getSelectionStart(); mEST.setSelection(currpos, currpos); mState = STATE_SELECT_OFF; }
private void insertImageSpan(ImageSpan span) { if (DBG) { Log.d(LOG_TAG, "--- insertImageSpan"); } if (span != null) { Log.d( LOG_TAG, "--- insertimagespan:" + span.getDrawable().getIntrinsicHeight() + "," + span.getDrawable().getIntrinsicWidth()); Log.d(LOG_TAG, "--- insertimagespan:" + span.getDrawable().getClass()); int curpos = mEST.getSelectionStart(); mEST.getText().insert(curpos, "\uFFFC"); mEST.getText().setSpan(span, curpos, curpos + 1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); mEST.notifyStateChanged(mMode, mState); } else { Log.e(LOG_TAG, "--- insertImageSpan: null span was inserted"); } }