Great, thanks. You're right that it tripped me up because it wants this constructor:
public StatsTable(Context context, AttributeSet attrs) { It works now that I put it in. On Sep 14, 7:24 pm, Mark Murphy <mmur...@commonsware.com> wrote: > If StatsTable is in the com.coolgroups.bob package, you would use: > > <com.coolgroups.bob.StatsTable android:id="@+id/hello" ... /> > > Note that you would need a different (additional) constructor, one > that takes an AttributeSet as the second parameter. See my ColorMixer > custom widget: > > https://github.com/commonsguy/cwac-colormixer > > > > > > > > > > On Wed, Sep 14, 2011 at 8:21 PM, bob <b...@coolgroups.com> wrote: > > So, I created my own View subclass like this: > > > public class StatsTable extends View { > > > public StatsTable(Context context) { > > super(context); > > // TODO Auto-generated constructor stub > > } > > > @Override > > public void onDraw(Canvas canvas) { > > canvas.drawARGB(255, 1, 0, 0); > > } > > > } > > > Anyone know what I have to do to reference this in my layout XML? > > > -- > > 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 > > -- > Mark Murphy (a Commons > Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy > > Android 3.1 Programming Books:http://commonsware.com/books -- 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