If you mean that you're putting the line
ImageButton imgBtn=(ImageButton) findViewById(R.id.imgBtn);
with your declarations for silent and ringer then you're initialising the
variable before the view has been created
On Fri, Jun 3, 2011 at 9:24 PM, TreKing <[email protected]> wrote:
> On Wed, Jun 1, 2011 at 10:44 PM, jesb <[email protected]> wrote:
>
>> If i declare ImageButton as global variable just like the variable silent
>> and ringer, the app will fail. can somebody tell me why this is?
>>
>
> What do you mean by "global variable"?
> What do you mean by "app will fail"?
>
>
> -------------------------------------------------------------------------------------------------
> TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
> transit tracking app for Android-powered devices
>
> --
> 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
>
--
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