I’m pretty new to developing Android applications but I am attempting to display the score at the end of a game I am making.
I was planning on switching to a view using:
setContentView(R.layout.over);
And that seems to work but I want to display the score.
I defined a textView:
<TextView android:text="@+id/TextView02" android:id="@+id/TextView02" android:layout_width="wrap_content" android:layout_height="wrap_content"></TextView>
But would like to change the text to read: “Score: (dynamic text from variable here)”.
Obviously I need to reference that variable somehow, or set the text of the textView before changing to this view.
Please help!
That should solve your problem:
Why do u assign to text and id the same values?