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 levels / screen 
   sizes?
   

On Monday, December 3, 2012 9:27:34 AM UTC-6, dashman wrote:
>
>
> 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"
>     android:layout_alignParentBottom="true"
>        android:layout_marginBottom="65dip"
>     android:textSize="18sp"
>     android:text=""
>     />
>
>
>             TextView tv = (TextView) findViewById(R.id.alternate2);
>
>
> i've got another findViewByid() in the next line and it works fine.
>
> and i do not dynamically remove the element either.
>
>
>
> On Monday, December 3, 2012 9:58:32 AM UTC-5, Paul-Peter Tournaris wrote:
>>
>> Can you please post the code and the xml for the TextView you mentioned?
>>
>>
>>
>> On Mon, Dec 3, 2012 at 4:53 PM, dashman <[email protected]> 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 emulator, the same code returns
>>> a null.
>>>
>>> What could the problem be?
>>>
>>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to