[android-developers] Re: View subclass

2011-09-15 Thread bob
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

[android-developers] Re: View subclass

2011-09-15 Thread bob
Actually, this is returning null: StatsTable st = (StatsTable) findViewById(R.id.hello); Any idea why? 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 ... /

[android-developers] Re: View subclass

2011-09-15 Thread bob
The problem was in my widget, I had the correct constructor (Context context AttributeSet attr); HOWEVER - super(context) was being called - not super(context, attr). Once I fixed that, life was better. On Sep 15, 3:21 am, bob b...@coolgroups.com wrote: Actually, this is returning null: