Hi Timothy, Thank you very much for the code, this was exactly what I was looking for. I thought that maybe there was a way of doing it just using the TextView methods or setting TextPaint parameters, but this way is perfectly fine and it works for me. The only thing that doesn't seem to work properly is applying animations on the TypeFaceTextView. I think it draws the outline fine the first time, but for some reason the subsequent calls to draw from the animation don't paint the outline. Maybe it has something to do with the Xfermode or some parameter I should set in the Animation. Any idea?, I'm trying to find out as I am still not very familiar with Xfermodes and Animations.
Thanks for your help. On 7 dic, 21:37, Timothy F <megbec...@gmail.com> wrote: > We wrote a drop-in replacement for TextView called TypeFaceTextView > (http://code.google.com/p/skylight1/source/browse/trunk/SkylightGame/ > src/net/nycjava/skylight1/view/TypeFaceTextView.java). You can use it > in your layout XMLs wherever you would use TextView, and it > automatically puts a black outline around the text, but best of all, > it supports a "typeface" attribute which can be the name of a typeface > file in your assets directory. > > We're thinking about updating it to be more friendly with the Eclipse > layout editor, so let us know if you are using it, as that may be the > incentive for us to get on with it. > > On Dec 7, 8:59 am, keianhzo <imanol.mar...@gmail.com> wrote: > > > Hi everybody, > > > I'm trying to use a Helvetica outlined ttf and i want the background > > of the font to be yellow and the outline part be black. I'm doing it > > loading the font in a TypeFace from assets and applying it to a > > TextView in the following way: > > > mTextViewMessage.setTypeface(myTypeFace); > > mTextViewMessage.getPaint().bgColor = Color.YELLOW; > > mTextViewMessage.setTextColor(Color.BLACK); > > mTextViewMessage.setTextSize(26); > > mTextViewMessage.setText(message); > > > but it does not work, the font is drawn with the black outline but no > > yellow background. In fact I am not even sure what does the bgColor > > field from TextPaint is for, i haven't found information about it in > > the doc. I've also tried to use the setBackgroundColor(Color) method > > from TextView but it doesn't fill the font inner part but all the > > TextView space. > > > So is there any way of doing it?. > > > Thanks for your help. -- 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