diff options
| author | 2012-08-25 13:17:22 -0400 | |
|---|---|---|
| committer | 2012-08-25 13:25:37 -0400 | |
| commit | f07439fba4d96c45c3bc873ffbb497cf3fffb744 (patch) | |
| tree | bea31cb3fb9993ae0924433ecdfbd72e6bf13c03 /packages/SystemUI/src | |
| parent | 080ca09c7f4c0033d0efece23687b71f7f8febc9 (diff) | |
Beans in space.
Quick example dream reusing the JB bean bag view.
Change-Id: Iad3ecedc9ba2c258bd33fcfbba2e3fc48382bdc8
Diffstat (limited to 'packages/SystemUI/src')
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/BeanBagDream.java | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/BeanBagDream.java b/packages/SystemUI/src/com/android/systemui/BeanBagDream.java new file mode 100644 index 000000000000..12e45c7adb5e --- /dev/null +++ b/packages/SystemUI/src/com/android/systemui/BeanBagDream.java @@ -0,0 +1,31 @@ +package com.android.systemui; + +import android.service.dreams.Dream; + +import com.android.systemui.BeanBag.Board; + +public class BeanBagDream extends Dream { + + private Board mBoard; + + @Override + public void onStart() { + super.onStart(); + setInteractive(true); + mBoard = new Board(this, null); + } + + @Override + public void onAttachedToWindow() { + super.onAttachedToWindow(); + setContentView(mBoard); + lightsOut(); + mBoard.startAnimation(); + } + + @Override + public void finish() { + mBoard.stopAnimation(); + super.finish(); + } +} |