I display emoji in EditText using spannable, but the problem is that the
text appears in the bottom of the emoji picture, not in the middle of it
(see picture).
> I display emoji in EditText using spannable, but the problem is that the
> text appears in the bottom of the emoji picture, not in the middle of it
> (see picture).
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscribe@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
> On 16 November 2012 13:20, Live Happy <livehap...@gmail.com> wrote:
>> I display emoji in EditText using spannable, but the problem is that the
>> text appears in the bottom of the emoji picture, not in the middle of it
>> (see picture).
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscribe@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscribe@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
IF you find that the alignment will not work as you desire, then the next
move would be to use a table row and set the gravity for the table row -
with the use of either gravity and/or padding you will get the desired
effect.
Regards,
Fred
On 16 November 2012 14:03, Live Happy <livehap...@gmail.com> wrote:
> On Fri, Nov 16, 2012 at 3:45 PM, Fred Niggle <fred.nig...@googlemail.com>wrote:
>> adjust gravity of the layout to center...
>> On 16 November 2012 13:20, Live Happy <livehap...@gmail.com> wrote:
>>> I display emoji in EditText using spannable, but the problem is that
>>> the text appears in the bottom of the emoji picture, not in the middle of
>>> it (see picture).
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Android Developers" group.
>>> To post to this group, send email to android-developers@googlegroups.com
>>> To unsubscribe from this group, send email to
>>> android-developers+unsubscribe@googlegroups.com
>>> For more options, visit this group at
>>> http://groups.google.com/group/android-developers?hl=en
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscribe@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscribe@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
Live Happy wrote:
> I display emoji in EditText using spannable, but the problem is that the
> text appears in the bottom of the emoji picture, not in the middle of it
> (see picture).
> So, how to make it display in the middle?
imho you can't do this using spans, however you could try ImageSpan
ctor with verticalAlignment e.g:
ImageSpan(Context
context, int resourceId, int
verticalAlignment)
发件人: android-developers@googlegroups.com
[mailto:android-developers@googlegroups.com] 代表 Live Happy
发送时间: 2012年11月16日 21:20
收件人: android-developers@googlegroups.com
主题: [android-developers] Text display in the bottom of emoji
I display emoji in EditText using spannable, but the problem is that the
text appears in the bottom of the emoji picture, not in the middle of it
(see picture).
-- You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en