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 <[email protected]> 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 [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 > -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://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 [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

