[android-beginners] findViewById returns null

2010-07-12 Thread Conny
Crazy behavior in my code. I have super.xml and a subset.xml. LinearLayout android:id=@+id/superSet android:layout_width=fill_parent android:layout_height=wrap_content android:layout_below=@id/titleBarLayout android:orientation=vertical

Re: [android-beginners] findViewById returns null

2010-07-12 Thread Yousuf Faheem
Hi Conny, Are you placing the text fields in a layout or just declaring them as provided below. If you are not using a layout enclose these TextViews with in a Layout and try. I guess it should work. Also try refreshing R.java build you subset.xml Check if the price variable is reflected in

[android-beginners] findViewById returns NULL (RadioButton/RadioGroup)

2009-05-19 Thread Vignesh
Hi, I am throwing up a dialog on a Buttonpress in my application. This dialog sets the content from an xml layout and the layout has three radio buttons within a radiogroup and then two buttons (Ok/Cancel). My intent is to know the radiobutton choosen by the user at the time of pressing Ok.

[android-beginners] findViewById() returns null

2009-04-06 Thread Magnus
Yes, this post have been discussed a lot here and I have read those posts and tried to do it right. The ids are correct. I call setContentView before using findViewById (..) but it still returns null. public void onCreate(Bundle savedInstanceState) {

[android-beginners] findViewById returns NULL

2008-10-16 Thread [EMAIL PROTECTED]
Hi, I would like to create my activity layout programmatically. I'm trying, in the sample of code below, to display one image on the screen, eventually the image will be retrieved from a database, but right now I'm using an image in the reource folder. I'm using an AbsoluteLayout because I would

[android-beginners] findViewById() returns NULL

2008-09-05 Thread DavidN
I was getting a null exception in my onCreate() until I found that I had to move that method call _after_ the setContentView(R.layout.main), just in case anyone else has this same problem. Don't understand the reason why, but just in case anyone gets this (and then googles for it), this is a