One-liner fix that allows Viewer to switch between Raster and OpenGL
authorChet Haase <chet@google.com>
Thu, 23 Feb 2017 01:28:41 +0000 (17:28 -0800)
committerSkia Commit-Bot <skia-commit-bot@chromium.org>
Thu, 23 Feb 2017 22:33:36 +0000 (22:33 +0000)
A previous change to Viewer removed a key setTag() call that
meant that the logic to replace the SurfaceView on a toggle
between OpenGL/Raster was not able to execute, making the app
useless after that toggle was performed.

BUG=skia:

Change-Id: Idddb7612209ce83d3461155c59f451407118e1d5
Reviewed-on: https://skia-review.googlesource.com/8789
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chet Haase <chet@google.com>

platform_tools/android/apps/viewer/src/main/java/org/skia/viewer/StateAdapter.java

index 332ef03..f82a7b6 100644 (file)
@@ -126,6 +126,7 @@ public class StateAdapter extends BaseAdapter implements AdapterView.OnItemSelec
 
         String value = item.getString(VALUE);
         itemView.setTag(item.toString()); // To save unnecessary view update
+        itemView.setTag(R.integer.value_tag_key, value);
 
         nameText.setText(item.getString(NAME));