*When I use findViewById and try to use my ID eclipse says that hello(the
ID) cannot be resolved or is not a field. I have done everything I can
think of but it is no use. Please help me if you can!*
I am having trouble with the findViewById();
Here is the code
https://lh4.googleusercontent.com/-BiNog3lL8Hg/UXChRHQPrwI/Adg/YjIIO855dlM/s1600/Capture.PNG
And here is the XML code
https://lh4.googleusercontent.com/-BiNog3lL8Hg/UXChRHQPrwI/Adg/YjIIO855dlM/s1600/Capture.PNG
On Thu, Apr 18, 2013 at 8:48 PM, Jacob Bosarge jtbosa...@gmail.com wrote:
When I type in findViewById(R.id.) it does not give me my IDs like usual.
It gives a list including addtodictionary:int, background:int,
button1:int. I have no clue why it will not recognize my IDs. I would
appreciate
I've got a findViewById(id) returning a TextView from the current layout -
My app works fine under platform 11 emulator.
But under platform 15 emulator, the same code returns
a null.
What could the problem be?
--
You received this message because you are subscribed to the Google
Groups
Can you please post the code and the xml for the TextView you mentioned?
On Mon, Dec 3, 2012 at 4:53 PM, dashman erjdri...@gmail.com wrote:
I've got a findViewById(id) returning a TextView from the current layout -
My app works fine under platform 11 emulator.
But under platform 15
sure - here's the xml and the code.
again works fine under platform 11 compilation.
TextView
android:id=@+id/alternate2
android:gravity=center_horizontal
android:layout_width=wrap_content
android:layout_height=wrap_content
android:layout_centerHorizontal=true
Hm odd... here a small checklist:
- When are you calling findViewById? What is the method / context of
that call?
- Did you try cleaning / fully rebuilding your project? Sometimes the
auto-generated R-files get messed up
- Did you specify alternative layouts for different API
Thanks for the help.
I had a separate layout for landscape.
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
8 matches
Mail list logo