-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
110 additions
and
4 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
app/src/main/java/fi/tuni/parsta/AnswerResultActivity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package fi.tuni.parsta; | ||
|
||
import android.content.Intent; | ||
import android.os.Bundle; | ||
import android.view.View; | ||
import android.widget.GridLayout; | ||
import android.widget.ImageView; | ||
import android.widget.TextView; | ||
|
||
|
||
import androidx.appcompat.app.AppCompatActivity; | ||
|
||
public class AnswerResultActivity extends AppCompatActivity { | ||
TextView pepTalk; | ||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.activity_answer); | ||
pepTalk = (TextView) findViewById(R.id.answerText); | ||
Bundle extras = getIntent().getExtras(); | ||
boolean wasAnswerRight; | ||
if (extras != null) { | ||
wasAnswerRight = extras.getBoolean("wasAnswerRight"); | ||
if(wasAnswerRight) { | ||
pepTalk.setText("v jes hyvä sinä"); | ||
} else { | ||
pepTalk.setText("parempi onni ensi kerralla (:"); | ||
} | ||
} | ||
|
||
|
||
|
||
} | ||
|
||
public void nextClick(View view) { | ||
Intent gameIntent = new Intent(this, Game.class); | ||
startActivity(gameIntent); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,4 +38,5 @@ public static boolean stringArrayContains(String[] arr, String targetValue) { | |
} | ||
return false; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<LinearLayout | ||
xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:orientation="vertical"> | ||
<TextView | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:id="@+id/answerText"/> | ||
|
||
<Button | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:text="Seuraava" | ||
android:onClick="nextClick" | ||
android:id="@+id/start" | ||
/> | ||
</LinearLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters