From 18159037a4f6a6b539736f6b8c0bdab4d26e3bd7 Mon Sep 17 00:00:00 2001 From: Dianne Hackborn Date: Mon, 2 Dec 2013 16:30:50 -0800 Subject: [PATCH] Add API demo for game style system UI interaction. Shows the ideal way for a game to interact with system UI, hiding the status bar and nav bar while being played, making them visible when paused or otherwise interacting with controls of the game, and determing layout of game controls to not be covered by the status bar or nav bar. Change-Id: Ia192c31321113d81f96c06c7a69a06ef72c4682a --- samples/ApiDemos/AndroidManifest.xml | 10 + samples/ApiDemos/res/layout/game.xml | 48 +++++ .../android/apis/graphics/TouchPaint.java | 57 ++++-- .../android/apis/view/GameActivity.java | 189 ++++++++++++++++++ 4 files changed, 292 insertions(+), 12 deletions(-) create mode 100644 samples/ApiDemos/res/layout/game.xml create mode 100644 samples/ApiDemos/src/com/example/android/apis/view/GameActivity.java diff --git a/samples/ApiDemos/AndroidManifest.xml b/samples/ApiDemos/AndroidManifest.xml index d7bda3125..f202d595d 100644 --- a/samples/ApiDemos/AndroidManifest.xml +++ b/samples/ApiDemos/AndroidManifest.xml @@ -2469,6 +2469,16 @@ + + + + + + + diff --git a/samples/ApiDemos/res/layout/game.xml b/samples/ApiDemos/res/layout/game.xml new file mode 100644 index 000000000..809a253c1 --- /dev/null +++ b/samples/ApiDemos/res/layout/game.xml @@ -0,0 +1,48 @@ + + + + + + + + + +