diff --git a/.gitignore b/.gitignore
index 0ed1778..fd45b12 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,7 +1,7 @@
*.iml
.gradle
-app/release
/local.properties
+/.idea/caches/build_file_checksums.ser
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
diff --git a/.idea/assetWizardSettings.xml b/.idea/assetWizardSettings.xml
deleted file mode 100644
index b9e8265..0000000
--- a/.idea/assetWizardSettings.xml
+++ /dev/null
@@ -1,150 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/caches/build_file_checksums.ser b/.idea/caches/build_file_checksums.ser
index 843cc8e..e666eae 100644
Binary files a/.idea/caches/build_file_checksums.ser and b/.idea/caches/build_file_checksums.ser differ
diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
index 30aa626..34dc27c 100644
--- a/.idea/codeStyles/Project.xml
+++ b/.idea/codeStyles/Project.xml
@@ -1,5 +1,8 @@
+
+
+
@@ -25,5 +28,8 @@
+
+
+
\ No newline at end of file
diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml
new file mode 100644
index 0000000..79ee123
--- /dev/null
+++ b/.idea/codeStyles/codeStyleConfig.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 99202cc..7bfef59 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -1,31 +1,6 @@
-
-
-
-
-
-
-
+
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
index 35eb1dd..94a25f7 100644
--- a/.idea/vcs.xml
+++ b/.idea/vcs.xml
@@ -1,6 +1,6 @@
-
+
\ No newline at end of file
diff --git a/README.md b/README.md
deleted file mode 100644
index 4e772de..0000000
--- a/README.md
+++ /dev/null
@@ -1,6 +0,0 @@
-# PingPoints
-Android App to count points on a Tenis Table match
-
-
-
-
diff --git a/app/build.gradle b/app/build.gradle
index b68c17c..9fe4f74 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -10,10 +10,9 @@ android {
applicationId "adrienmalin.pingpoints"
minSdkVersion 15
targetSdkVersion 28
- versionCode 2
- versionName "1.1"
+ versionCode 1
+ versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
- vectorDrawables.useSupportLibrary true
}
buildTypes {
release {
@@ -24,13 +23,11 @@ android {
}
dependencies {
- implementation fileTree(include: ['*.jar'], dir: 'libs')
- implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
- implementation 'com.android.support:appcompat-v7:28.0.0-rc01'
- implementation 'com.android.support.constraint:constraint-layout:1.1.2'
- implementation 'com.android.support:support-v4:28.0.0-rc01'
+ implementation fileTree(dir: 'libs', include: ['*.jar'])
+ implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
+ implementation 'com.android.support:appcompat-v7:28.0.0'
+ implementation 'com.android.support.constraint:constraint-layout:1.1.3'
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'
- implementation 'com.android.support:design:28.0.0-rc01'
}
diff --git a/app/release/output.json b/app/release/output.json
deleted file mode 100644
index 8a74f32..0000000
--- a/app/release/output.json
+++ /dev/null
@@ -1 +0,0 @@
-[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":2,"versionName":"1.1","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}]
\ No newline at end of file
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 432ac20..c1565b3 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -1,6 +1,6 @@
+ package="adrienmalin.pingpoints" >
-
+ android:theme="@style/AppTheme" >
+
+
-
-
-
\ No newline at end of file
diff --git a/app/src/main/ic_launcher-web.png b/app/src/main/ic_launcher-web.png
deleted file mode 100644
index f334783..0000000
Binary files a/app/src/main/ic_launcher-web.png and /dev/null differ
diff --git a/app/src/main/java/adrienmalin/pingpoints/CreditsActivity.kt b/app/src/main/java/adrienmalin/pingpoints/CreditsActivity.kt
deleted file mode 100644
index 4b0ab73..0000000
--- a/app/src/main/java/adrienmalin/pingpoints/CreditsActivity.kt
+++ /dev/null
@@ -1,23 +0,0 @@
-package adrienmalin.pingpoints
-
-import android.os.Bundle
-import android.support.v7.app.AppCompatActivity
-import android.text.method.LinkMovementMethod
-import android.view.MenuItem
-import android.widget.TextView
-
-
-class CreditsActivity : AppCompatActivity() {
- override fun onCreate(savedInstanceState: Bundle?) {
- super.onCreate(savedInstanceState)
- setContentView(R.layout.activity_credits)
- setSupportActionBar(findViewById(R.id.toolbar))
- supportActionBar?.setDisplayHomeAsUpEnabled(true)
- findViewById(R.id.iconsCredit)?.movementMethod = LinkMovementMethod.getInstance()
- }
-
- override fun onOptionsItemSelected(item: MenuItem): Boolean {
- finish()
- return true
- }
-}
diff --git a/app/src/main/java/adrienmalin/pingpoints/EndOfMatchDialog.kt b/app/src/main/java/adrienmalin/pingpoints/EndOfMatchDialog.kt
deleted file mode 100644
index 887470a..0000000
--- a/app/src/main/java/adrienmalin/pingpoints/EndOfMatchDialog.kt
+++ /dev/null
@@ -1,59 +0,0 @@
-package adrienmalin.pingpoints
-
-import android.app.AlertDialog
-import android.content.DialogInterface
-import android.content.Intent
-import android.os.Bundle
-import android.support.v4.app.DialogFragment
-
-
-class EndOfMatchDialog: DialogFragment() {
- override fun onCreateDialog(savedInstanceState: Bundle?)=
- AlertDialog.Builder(activity).apply{
- val players = (activity as MainActivity).players
- val names = players.map { it.name }
- val winnerName = players.maxBy { it.score }?.name ?: ""
- val score = players.map { it.score }.sortedDescending()
-
- setTitle(getString(R.string.end_match_dialog_title, winnerName))
- setMessage(getString(R.string.score, score[0], score[1]))
- setPositiveButton(
- R.string.new_match,
- DialogInterface.OnClickListener { dialog, id ->
- startActivity(
- Intent(context, MainActivity::class.java).apply {
- putExtra("names", names.toTypedArray())
- }
- )
- }
- )
- setNeutralButton(
- R.string.share_button,
- DialogInterface.OnClickListener { dialog, id ->
- val newMatchIntent: Intent = Intent().apply {
- action = Intent.ACTION_SEND
- putExtra(
- Intent.EXTRA_SUBJECT,
- getString(
- R.string.share_subject,
- names[Side.LEFT.value],
- names[Side.RIGHT.value]
- )
- )
- putExtra(
- Intent.EXTRA_TEXT,
- getString(R.string.share_message,
- names[Side.LEFT.value],
- names[Side.RIGHT.value],
- winnerName,
- score[0],
- score[1]
- )
- )
- type = "text/plain"
- }
- startActivity(newMatchIntent)
- }
- )
- }.create()
- }
diff --git a/app/src/main/java/adrienmalin/pingpoints/MainActivity.kt b/app/src/main/java/adrienmalin/pingpoints/MainActivity.kt
deleted file mode 100644
index 42a4aa0..0000000
--- a/app/src/main/java/adrienmalin/pingpoints/MainActivity.kt
+++ /dev/null
@@ -1,181 +0,0 @@
-package adrienmalin.pingpoints
-
-import android.content.Intent
-import android.content.pm.ActivityInfo
-import android.os.Build
-import android.os.Bundle
-import android.support.v7.app.AppCompatActivity
-import android.support.v7.app.AppCompatDelegate
-import android.view.Menu
-import android.view.MenuItem
-import android.view.View
-import android.widget.Button
-import android.widget.ImageView
-import android.widget.Toast
-
-
-class MainActivity : AppCompatActivity() {
- var players: Array = emptyArray()
- var serviceSide: Side = Side.LEFT
- var relaunchSide: Side = Side.RIGHT
- var textScore: android.widget.TextView? = null
- var textService: android.widget.TextView? = null
- var buttons: Array