[android-developers] View subclass

2011-09-14 Thread bob
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) {

Re: [android-developers] View subclass

2011-09-14 Thread Mark Murphy
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: