Tuesday, October 18, 2011

[android-developers] Re: In Textview, how to change the 'selected' color?

Wow! This is what a wonderful workaround!

Thank you GG!

On Oct 18, 3:51 pm, gaurav gupta <gaurav.gupta...@gmail.com> wrote:
> Hello ,
>
> U can try Html.fromhtml tag.
>
> Like this line
>
> hotelCity = hotel_Name_Str + ","+ "<b><font color=#6AA3FA>"+ "
> "+tracks.get(position).getHotelCity()+ "</font></b>";
> then set this string in a Textview.
>
> hotelname.setText(Html.fromHtml(hotelCity));
>
> Note : *Here hotelCity and hotel_Name_Str is String and hotelname is
> TextView.*
>
> I hope this will work for you.
> Kindly let me know ur comment over this.
>
> Thanks n Regards,
> Gaurav Gupta
> Android Developer
> On Tue, Oct 18, 2011 at 12:13 PM, Build account <newandroi...@gmail.com>wrote:
>
>
>
> > Hello, good to see you again.
>
> > I had looked into,
> > (but there is limitation which I can create only few selector xml
> > physically...since my app need to set various colors properly depends
> > on situation. Not only dozone of colors. lol)
>
> > Is there any way to programmtically implement?
> > I need programmatic way....
>
> > Any advice?
>
> > On Oct 18, 3:07 pm, Justin Anderson <magouyaw...@gmail.com> wrote:
> > > Have you tried looking at a selector?
>
> > > Thanks,
> > > Justin Anderson
> > > MagouyaWare Developerhttp://sites.google.com/site/magouyaware
>
> > > On Mon, Oct 17, 2011 at 10:42 PM, Build account <newandroi...@gmail.com
> > >wrote:
>
> > > > Hello.
>
> > > > Is there any way to change the color of 'selected' state?
> > > > Since I'm trying to use textview as below.
>
> > > > - one simple textview with a standard TextAppearance attribute.
> > > > - with marquee attribute as well.
> > > > - I have set tv.setSelected(true); for marquee effect.
> > > > - in this case I want to change the text color which the moving text's
> > > > color.
>
> > > > setHighlightColor seem that not working..
>
> > > > Any workaround please?
>
> > > > Please advice me
>
> > > > --
> > > > 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-Hide quoted
> > text -
>
> > > - Show quoted text -
>
> > --
> > 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- Hide quoted text -
>
> - Show quoted text -

--
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

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate