I don't see any glaring issues with the XML...  Are there any other places
in your code that you use the tvIntro text field?

Thanks,
Justin Anderson
MagouyaWare Developer
http://sites.google.com/site/magouyaware


On Fri, May 13, 2011 at 8:36 AM, cmt <[email protected]> wrote:

> Thanks guys,
>
> Here is my XML:
>
> <?xml version="1.0" encoding="utf-8"?>
> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/
> android"
>    android:orientation="vertical"
>    android:layout_width="fill_parent"
>    android:layout_height="fill_parent"
>    >
> <TextView
>        android:id="@+id/tvIntro"
>    android:layout_height="wrap_content"
>    android:text="@string/hello" android:layout_weight="1"
> android:layout_width="wrap_content" android:enabled="true"
> android:visibility="visible"/>
>
>
>    <Button android:id="@+id/btnNorth"
> android:layout_height="wrap_content"
> android:layout_width="wrap_content" android:text="Go North"></Button>
>    <Button android:text="Go East" android:id="@+id/btnEast"
> android:layout_width="wrap_content"
> android:layout_height="wrap_content"></Button>
>    <Button android:text="Go South" android:id="@+id/btnSouth"
> android:layout_width="wrap_content"
> android:layout_height="wrap_content"></Button>
>    <Button android:text="Go West" android:id="@+id/btnWest"
> android:layout_width="wrap_content"
> android:layout_height="wrap_content"></Button>
>
>    <Button android:text="Fight" android:id="@+id/btnFight"
> android:layout_width="wrap_content"
> android:layout_height="wrap_content"></Button>
>    <Button android:text="Run" android:id="@+id/btnRun"
> android:layout_width="wrap_content"
> android:layout_height="wrap_content"></Button>
> </LinearLayout>
>
>
> Thanks again!
>
>
>
> On May 12, 2:46 pm, Justin Anderson <[email protected]> wrote:
> > Ummm, I don't think it is an issue with using the "this" keyword...
> >
> > What does your layout XML file look like?
> >
> > Thanks,
> > Justin Anderson
> > MagouyaWare Developerhttp://sites.google.com/site/magouyaware
> >
> > On Thu, May 12, 2011 at 12:22 PM, subha <[email protected]
> >wrote:
> >
> >
> >
> >
> >
> >
> >
> > > just you use  only setContentView(R.layout.main);  it wil work properly
> > > don't use this.setContentView(R.layout.main);
> >
> > > On Thu, May 12, 2011 at 11:47 PM, cmt <[email protected]> wrote:
> >
> > >> I've finally gotten my first Android app to run without any errors,
> > >> however the TextView that I am using, is not being updated.
> >
> > >> Here is the code and the last line is where I use setText to update my
> > >> textview.
> >
> > >> If someone has any ideas as to why my TextView is not updating, could
> > >> you please help me out?
> >
> > >> Thanks!
> >
> > >> public class HelloAndroid extends Activity {
> > >>    /** Called when the activity is first created. */
> > >>        TextView tvIntro;
> > >>    @Override
> > >>    public void onCreate(Bundle icicle) {
> > >>        super.onCreate(icicle);
> >
> > >>        //setup text views
> > >>        this.setContentView(R.layout.main);
> >
> > >>         tvIntro = (TextView)findViewById(R.id.tvIntro);
> >
> > >>        //display game intro
> > >>        tvIntro.setText("Text Adventure - By T");
> >
> > >> --
> > >> 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
>
> --
> 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

Reply via email to