[android-developers] Re: In Textview, how to change the 'selected' color?
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.comwrote: 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+unsubscr...@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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: In Textview, how to change the 'selected' color?
Hello , U can try Html.fromhtml tag. Like this line hotelCity = hotel_Name_Str + ,+ bfont 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.comwrote: 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+unsubscr...@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+unsubscr...@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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[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 + ,+ bfont 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.comwrote: 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+unsubscr...@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+unsubscr...@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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: In Textview, how to change the 'selected' color?
Hmm... I'm not aware of a way to programmatically create a selector (but that doesn't mean it is impossible). Thanks, Justin Anderson MagouyaWare Developer http://sites.google.com/site/magouyaware On Tue, Oct 18, 2011 at 1:49 AM, Build account newandroi...@gmail.comwrote: 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 + ,+ bfont 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+unsubscr...@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+unsubscr...@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+unsubscr...@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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: In Textview, how to change the 'selected' color?
http://developer.android.com/reference/android/content/res/ColorStateList.html Public Constructors ColorStateList http://developer.android.com/reference/android/content/res/ColorStateList.html#ColorStateList%28int[][],%20int[]%29(int[][] states, int[] colors) Creates a ColorStateList that returns the specified mapping from states to colors. -- Kostya 18.10.2011 20:22, Justin Anderson ?: Hmm... I'm not aware of a way to programmatically create a selector (but that doesn't mean it is impossible). Thanks, Justin Anderson MagouyaWare Developer http://sites.google.com/site/magouyaware On Tue, Oct 18, 2011 at 1:49 AM, Build account newandroi...@gmail.com mailto:newandroi...@gmail.com wrote: Wow! This is what a wonderful workaround! Thank you GG! On Oct 18, 3:51 pm, gaurav gupta gaurav.gupta...@gmail.com mailto:gaurav.gupta...@gmail.com wrote: Hello , U can try Html.fromhtml tag. Like this line hotelCity = hotel_Name_Str + ,+ bfont 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 mailto:newandroi...@gmail.comwrote: 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 mailto:magouyaw...@gmail.com wrote: Have you tried looking at a selector? Thanks, Justin Anderson MagouyaWare Developerhttp://sites.google.com/site/magouyaware http://sites.google.com/site/magouyaware On Mon, Oct 17, 2011 at 10:42 PM, Build account newandroi...@gmail.com mailto: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 mailto:android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com mailto:android-developers%2bunsubscr...@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 mailto:android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com mailto:android-developers%2bunsubscr...@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 mailto:android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com mailto:android-developers%2bunsubscr...@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+unsubscr...@googlegroups.com For more options, visit this group at
Re: [android-developers] Re: In Textview, how to change the 'selected' color?
Nice! Thanks, Justin Anderson MagouyaWare Developer http://sites.google.com/site/magouyaware On Tue, Oct 18, 2011 at 10:28 AM, Kostya Vasilyev kmans...@gmail.comwrote: http://developer.android.com/reference/android/content/res/ColorStateList.html Public Constructors **ColorStateListhttp://developer.android.com/reference/android/content/res/ColorStateList.html#ColorStateList%28int[][],%20int[]%29(int[][] states, int[] colors)** Creates a ColorStateList that returns the specified mapping from states to colors. -- Kostya 18.10.2011 20:22, Justin Anderson пишет: Hmm... I'm not aware of a way to programmatically create a selector (but that doesn't mean it is impossible). Thanks, Justin Anderson MagouyaWare Developer http://sites.google.com/site/magouyaware On Tue, Oct 18, 2011 at 1:49 AM, Build account newandroi...@gmail.comwrote: 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 + ,+ bfont 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.comwrote: 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en-Hidequoted 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+unsubscr...@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+unsubscr...@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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Kostya Vasilyev -- 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 -- 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