quick fix for compose edit text

This commit is contained in:
Mariotaku Lee 2015-05-12 01:01:08 +08:00
parent 3ba340ba01
commit 2342598960
2 changed files with 4 additions and 2 deletions

View File

@ -740,9 +740,9 @@ public class ComposeActivity extends ThemedFragmentActivity implements LocationL
intent.setAction(ImagePickerActivity.INTENT_ACTION_GET_IMAGE);
intent.setData(Uri.parse(imageSpans[0].getSource()));
startActivityForResult(intent, REQUEST_PICK_IMAGE);
((Spannable) s).setSpan(new MarkForDeleteSpan(), start, start + count,
Spanned.SPAN_INCLUSIVE_INCLUSIVE);
}
((Spannable) s).setSpan(new MarkForDeleteSpan(), start, start + count,
Spanned.SPAN_INCLUSIVE_INCLUSIVE);
}
}

View File

@ -60,6 +60,8 @@ public class BitmapUtils {
BitmapFactory.decodeFile(path, o);
// Corrupted image, so return now.
if (o.outWidth <= 0 || o.outHeight <= 0) return false;
// Ignore for GIF image
if ("image/gif".equals(o.outMimeType)) return true;
o.inJustDecodeBounds = false;
if (o.outWidth > TwidereConstants.TWITTER_MAX_IMAGE_WIDTH || o.outHeight > TwidereConstants.TWITTER_MAX_IMAGE_HEIGHT) {
// The image dimension is larger than Twitter's limit.