Sylvester Steele wrote:
> even though I can construct, the setItem function gives a null pointer
> exception.

My guess is, that's because you haven't created the TextView or EditText 
widgets, and hence they're null.

Where are you inflating your XML file? In other words, given that you 
wrote the layout you enclosed in your post, how is that layout used?

Off the cuff, I think it will be simplest if you get rid of the layout 
file and, in your CustomEditText constructor, you instantiate a TextView 
and EditView yourself, then call addView(View child, LayoutParams 
params) on your CustomEditText to add each of those with the layout 
parameters you want.

Better yet, you might wish to follow the LabelView sample in the SDK 
ApiDemos, which cover the case of creating a custom widget. An extensive 
article on creating custom components can be found in:

http://code.google.com/android/toolbox/custom-components.html

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Android Training on the Ranch in September! http://www.bignerdranch.com

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to