From f2ecc0c8dd4e9787ee83ffa3532cee54abcff653 Mon Sep 17 00:00:00 2001 From: Will Davies Date: Sat, 9 Mar 2019 16:04:40 -0600 Subject: [PATCH] Bug fix for field diagrams --- app/build.gradle | 4 ++-- .../main/java/com/cpjd/roblu/ui/images/Drawing.java | 11 ++++++++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 0882573..74f8dc8 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -27,8 +27,8 @@ android { applicationId "com.cpjd.roblu" minSdkVersion 19 targetSdkVersion 28 - versionCode 70 - versionName "4.5.11" + versionCode 71 + versionName "4.5.12" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" javaCompileOptions { diff --git a/app/src/main/java/com/cpjd/roblu/ui/images/Drawing.java b/app/src/main/java/com/cpjd/roblu/ui/images/Drawing.java index c1a2e5f..64c2aa3 100644 --- a/app/src/main/java/com/cpjd/roblu/ui/images/Drawing.java +++ b/app/src/main/java/com/cpjd/roblu/ui/images/Drawing.java @@ -88,7 +88,16 @@ protected void onCreate(Bundle savedInstanceState) { } LinearLayout layout = findViewById(R.id.drawing_layout); - layout.setBackgroundResource(getIntent().getIntExtra("fieldDiagramID", R.drawable.field2018)); + switch(getIntent().getIntExtra("fieldDiagramID", 0)) { + case 2019: + layout.setBackgroundResource(R.drawable.field2019); + break; + case 2018: + layout.setBackgroundResource(R.drawable.field2018); + break; + default: + layout.setBackgroundResource(R.drawable.field2018); + } this.canvas.setBaseColor(rui.getBackground()); this.canvas.setPaintStrokeWidth(7F);