Game_15YOUR_STUDENT_ID_NUMBER/.gitignore
*.iml
.gradle
/local.properties
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
.DS_Store
/build
/captures
.externalNativeBuild
Game_15YOUR_STUDENT_ID_NUMBER/app/.gitignore
/build
Game_15YOUR_STUDENT_ID_NUMBER/app/build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
defaultConfig {
applicationId "au.edu.federation.game_15"
minSdkVersion 21
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}
Game_15YOUR_STUDENT_ID_NUMBER/app/proguard-rules.pro
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
Game_15YOUR_STUDENT_ID_NUMBER/app/src/androidTest/java/au/edu/federation/game_15/ExampleInstrumentedTest.java
Game_15YOUR_STUDENT_ID_NUMBER/app/src/androidTest/java/au/edu/federation/game_15/ExampleInstrumentedTest.java
package au.edu.federation.game_15;
import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see
Testing documentation */
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();
assertEquals("au.edu.federation.game_15", appContext.getPackageName());
}
}
Game_15YOUR_STUDENT_ID_NUMBER/app/src/main/AndroidManifest.xml
Game_15YOUR_STUDENT_ID_NUMBER/app/src/main/java/au/edu/federation/game_15/MainActivity.java
Game_15YOUR_STUDENT_ID_NUMBER/app/src/main/java/au/edu/federation/game_15/MainActivity.java
package au.edu.federation.game_15;
import android.app.Dialog;
import android.content.Context;
import android.content.SharedPreferences;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import java.util.ArrayList;
public class MainActivity extends AppCompatActivity {
private Button clearResultButton;
private Button newGameButton;
private ArrayList