Add more SampleApp support to viewer.

Fixes loading a Sample as first slide.
Adds char input.
Adds --slide and --list options.

Change-Id: I34b66818e3673fcfdc649443e7d9dfb74b478062
Reviewed-on: https://skia-review.googlesource.com/8445
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
diff --git a/samplecode/SampleAndroidShadows.cpp b/samplecode/SampleAndroidShadows.cpp
index 0e0a4b4..803ea49 100644
--- a/samplecode/SampleAndroidShadows.cpp
+++ b/samplecode/SampleAndroidShadows.cpp
@@ -70,32 +70,43 @@
 
         SkUnichar uni;
         if (SampleCode::CharQ(*evt, &uni)) {
+            bool handled = false;
             switch (uni) {
                 case 'W':
                     fShowAmbient = !fShowAmbient;
+                    handled = true;
                     break;
                 case 'S':
                     fShowSpot = !fShowSpot;
+                    handled = true;
                     break;
                 case 'T':
                     fUseAlt = !fUseAlt;
+                    handled = true;
                     break;
                 case 'O':
                     fShowObject = !fShowObject;
+                    handled = true;
                     break;
                 case '>':
                     fZDelta += 0.5f;
+                    handled = true;
                     break;
                 case '<':
                     fZDelta -= 0.5f;
+                    handled = true;
                     break;
                 case '?':
                     fIgnoreShadowAlpha = !fIgnoreShadowAlpha;
+                    handled = true;
                     break;
                 default:
                     break;
             }
-            this->inval(nullptr);
+            if (handled) {
+                this->inval(nullptr);
+                return true;
+            }
         }
         return this->INHERITED::onQuery(evt);
     }
@@ -503,7 +514,7 @@
     }
 
 private:
-    typedef SkView INHERITED;
+    typedef SampleView INHERITED;
 };
 
 //////////////////////////////////////////////////////////////////////////////