Figured it out, real silly mistake.  I was calling setContentView
(R.layout.myLayout) twice, once before and once after my code.  Thanks
for all your help!

On Jan 31, 9:02 am, Phill Midwinter <ph...@grantmidwinter.com> wrote:
> Have you set the button id correctly in the XML layout?
>
> 2009/1/31 Marco Schmitz <netzprofi.ma...@googlemail.com>
>
>
>
>
>
> > sometimes you need to invalidate()
>
> > greetings,
> > darolla
>
> > 2009/1/31 Chander Pechetty <cspeche...@gmail.com>:
>
> > > Have you done "setContentView(R.layout.yourLayout)" before calling
> > > this. Looks ok to me, it certainly works for me.
> > > if you are doing this on a certain click , then make sure its
> > > clickable...
> > > button1.setClickable(true);
>
> > > -Chander
>
> > > On Jan 31, 10:37 am, Bob <bshumsk...@yahoo.com> wrote:
> > >> Hi,
> > >> How do I change the text on a button at run-time?  This code doesn't
> > >> appear to do anything, what am I doing wrong:
>
> > >>  Button button1=(Button)findViewById(R.id.button1);
> > >>         button1.setText("Change text");
>
> > >> Thanks,
> > >> Bob
>
> --
> Phill Midwinter
> Director
> Grant Midwinter Limited
> d: 0844 736 5234 x: 0
> m: 07538 082156
> e: ph...@grantmidwinter.com
--~--~---------~--~----~------------~-------~--~----~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to