Hi,

check this below code

 if(position==0){
                             spannable = new SpannableString ("");
                             Drawable d =
getResources().getDrawable(em.mThumbIds[position]);
                             d.setBounds(0, 0, d.getIntrinsicWidth(),
d.getIntrinsicHeight());
                               ImageSpan span = new ImageSpan(d,
ImageSpan.ALIGN_BASELINE);
                              spannable.setSpan (span,mOutEditText. getText
(). length (),mOutEditText. getText (). length () ,
Spannable.SPAN_INCLUSIVE_EXCLUSIVE);
                             }
                             else if(position==1){
                                spannable = new SpannableString
("");
                                Drawable d =
getResources().getDrawable(em.mThumbIds[position]);
                                d.setBounds(0, 0, d.getIntrinsicWidth(),
d.getIntrinsicHeight());
                                  ImageSpan span = new ImageSpan(d,
ImageSpan.ALIGN_BASELINE);
                                 spannable.setSpan (span,mOutEditText.
getText (). length (),mOutEditText. getText (). length () ,
Spannable.SPAN_INCLUSIVE_EXCLUSIVE);
                                }

                            else if(position==2){
                               spannable = new SpannableString ("");
                               Drawable d =
getResources().getDrawable(em.mThumbIds[position]);
                               d.setBounds(0, 0, d.getIntrinsicWidth(),
d.getIntrinsicHeight());
                                 ImageSpan span = new ImageSpan(d,
ImageSpan.ALIGN_BASELINE);
                                spannable.setSpan (span,mOutEditText.
getText (). length (),mOutEditText. getText (). length () ,
Spannable.SPAN_INCLUSIVE_EXCLUSIVE);
                               }

mOutEditText.setText (spannable);

On Fri, Aug 26, 2011 at 3:27 PM, skink <psk...@gmail.com> wrote:

>
>
> On Aug 26, 11:49 am, vijayakumar M <iamvijayaku...@gmail.com> wrote:
> > ok..pskink,
> >
> > then how to add multible emoji in edittext?
> >
> >
> >
> >
> >
> > On Fri, Aug 26, 2011 at 3:15 PM, skink <psk...@gmail.com> wrote:
> >
> > > vijayakumar M wrote:
> > > > Hi guys ,
> >
> > > > how to display Smiley/Emoji in android edittext? please help me
> friends.
> >
> > > > --
> >
> > > > "Nobody can go back and start a new beginning, but anyone can start
> today
> > > > and make a new ending"
> > > > -----
> > > > Thanks,
> > > > Regards,
> > > > νιנαソαkum@r M
> > > > BloG:http://iamvijayakumar.blogspot.com/
> >
> > > Use SpannableStringBuilder and its setSpan method
> >
> > > pskinklder and its setSpan method
> >
> > > pskink
> >
> > > --
> > > 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+unsubscr...@googlegroups.com
> > > For more options, visit this group at
> > >http://groups.google.com/group/android-developers?hl=en
> >
> > --
> >
> > "Nobody can go back and start a new beginning, but anyone can start today
> > and make a new ending"
> > -----
> > Thanks,
> > Regards,
> > νιנαソαkum@r M
> > BloG:http://iamvijayakumar.blogspot.com/
> > Mob.No:09048382536(Kerala)
> > Mob.No:09751076707(TN)
>
> Call setSpan multiple times?
>
> pskink
>
> --
> 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+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 




"Nobody can go back and start a new beginning, but anyone can start today
and make a new ending"
-----
Thanks,
Regards,
νιנαソαkum@r M
BloG:http://iamvijayakumar.blogspot.com/
Mob.No:09048382536(Kerala)
Mob.No:09751076707(TN)

-- 
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+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to