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 <[email protected]> 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 [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

