summaryrefslogtreecommitdiff
path: root/src/com/android/dreams/phototable/FlipperDream.java
diff options
context:
space:
mode:
authorChris Wren <cwren@android.com>2012-08-31 12:46:30 -0400
committerChris Wren <cwren@android.com>2012-09-04 12:59:28 -0400
commitc91cbab0936ec64c8078aa8deeb1cfbe0e15cbfa (patch)
tree4abc9159672334cdf283808537e59b26a36560b2 /src/com/android/dreams/phototable/FlipperDream.java
parentf61019ceb816fed9e5035c3d9b8451f6e4ee1da9 (diff)
downloadPhotoTable-c91cbab0936ec64c8078aa8deeb1cfbe0e15cbfa.tar.gz
add a simple photo flipper dream.
Change-Id: I33a5dc491445ba6203e744099187df2760486be6
Diffstat (limited to 'src/com/android/dreams/phototable/FlipperDream.java')
-rw-r--r--src/com/android/dreams/phototable/FlipperDream.java38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/com/android/dreams/phototable/FlipperDream.java b/src/com/android/dreams/phototable/FlipperDream.java
new file mode 100644
index 0000000..f7b1cfe
--- /dev/null
+++ b/src/com/android/dreams/phototable/FlipperDream.java
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.android.dreams.phototable;
+
+import android.service.dreams.Dream;
+
+/**
+ * Example interactive screen saver: single photo with flipping.
+ */
+public class FlipperDream extends Dream {
+ private static final String TAG = "FlipperDream";
+
+ @Override
+ public void onStart() {
+ super.onStart();
+ setInteractive(true);
+ }
+
+ @Override
+ public void onAttachedToWindow() {
+ super.onAttachedToWindow();
+ lightsOut();
+ setContentView(R.layout.carousel);
+ }
+}