B
b18a9n
Neues Mitglied
- 1
Hi für ein kleines Spiel was ich Programmiere, will ich eine Score anzeige.
Allerdings Stürzt meine Activity bei der Scoreanzeige immer ab. Hab schon hier im Forum, bei google und bei anddev gesucht aber bisher nix gefunden :-(
Die Score anzeige in meinem Layout:
wenn ich jetzt an die Stelle ".setText(score)" komme stürzt meine Activity ab weis einer woran das liegen kann.
Allerdings Stürzt meine Activity bei der Scoreanzeige immer ab. Hab schon hier im Forum, bei google und bei anddev gesucht aber bisher nix gefunden :-(
Die Score anzeige in meinem Layout:
Code:
<TextView android:text="Score" android:layout_height="wrap_content" android:layout_width="wrap_content" android:gravity="left"/>
<TextView android:id="@+id/score" android:text="" android:layout_height="wrap_content" android:layout_width="fill_parent" android:gravity="right"/>
Code:
private void update()
.
.
.
score++;
CharSequence score = "";
score = "" + (int)(Score + ExtraPoints);
mScoreDisplay = (TextView) findViewById(R.id.score);
mScoreDisplay.setText(score);
.
.
.