示例#1
0
 private void setSelectedEndPos() {
   if (DBG) {
     Log.d(LOG_TAG, "--- setSelectEndPos:");
   }
   if (mEST.getSelectionStart() == mCurStart) {
     setSelectedEndPos(mEST.getSelectionEnd());
   } else {
     setSelectedEndPos(mEST.getSelectionStart());
   }
 }
示例#2
0
 private void setSelectStartPos() {
   if (DBG) {
     Log.d(LOG_TAG, "--- setSelectStartPos");
   }
   mCurStart = mEST.getSelectionStart();
   mState = STATE_SELECT_ON;
 }
示例#3
0
 private void unsetSelect() {
   if (DBG) {
     Log.d(LOG_TAG, "--- offSelect");
   }
   int currpos = mEST.getSelectionStart();
   mEST.setSelection(currpos, currpos);
   mState = STATE_SELECT_OFF;
 }
示例#4
0
 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");
   }
 }