From 3e190ede751474c7e1b87b34e36354c0ef9e8af4 Mon Sep 17 00:00:00 2001 From: John Spurlock Date: Fri, 27 Jul 2012 10:54:08 -0400 Subject: Notification Studio initial commit. Demo app for designing/previewing Android notifications on the device itself. Simple UI for tweaking the various options available when constructing notifications, including the new expanded builder styles introduced in api 16. Notification designs can be shared as mockups (images) or code. Uses latest support lib for compatibility back to api 10. Change-Id: I3b6c539b36786ea5335f95a9ded4fb50ea5d0a00 --- apps/NotificationStudio/.classpath | 8 + apps/NotificationStudio/.project | 33 +++ .../.settings/org.eclipse.jdt.core.prefs | 4 + apps/NotificationStudio/AndroidManifest.xml | 38 ++++ .../NotificationStudio/libs/android-support-v4.jar | Bin 0 -> 351326 bytes apps/NotificationStudio/project.properties | 14 ++ .../res/drawable-hdpi/android_logo.gif | Bin 0 -> 4678 bytes .../ic_notification_multiple_mail_holo_dark.png | Bin 0 -> 378 bytes .../res/drawable-hdpi/romain.jpg | Bin 0 -> 8832 bytes .../res/drawable-nodpi/icon_bg.xml | 29 +++ .../res/drawable-nodpi/romainguy_rockaway.jpg | Bin 0 -> 414841 bytes .../res/layout-v14/boolean_editor.xml | 21 ++ apps/NotificationStudio/res/layout-v16/studio.xml | 33 +++ .../res/layout-w801dp/studio.xml | 28 +++ .../res/layout/boolean_editor.xml | 20 ++ apps/NotificationStudio/res/layout/divider.xml | 40 ++++ .../res/layout/editable_item.xml | 111 +++++++++ apps/NotificationStudio/res/layout/editors.xml | 29 +++ apps/NotificationStudio/res/layout/preview.xml | 56 +++++ apps/NotificationStudio/res/layout/studio.xml | 26 +++ apps/NotificationStudio/res/menu/action_bar.xml | 30 +++ .../res/values-sw600dp/dimens.xml | 24 ++ .../res/values-sw720dp/dimens.xml | 21 ++ apps/NotificationStudio/res/values-v11/colors.xml | 21 ++ apps/NotificationStudio/res/values-v11/dimens.xml | 21 ++ apps/NotificationStudio/res/values/colors.xml | 23 ++ apps/NotificationStudio/res/values/dimens.xml | 33 +++ apps/NotificationStudio/res/values/strings.xml | 55 +++++ .../notificationstudio/MaxHeightScrollView.java | 41 ++++ .../NotificationStudioActivity.java | 249 +++++++++++++++++++++ .../notificationstudio/action/ShareCodeAction.java | 35 +++ .../action/ShareMockupAction.java | 79 +++++++ .../notificationstudio/editor/BitmapEditor.java | 36 +++ .../notificationstudio/editor/BooleanEditor.java | 49 ++++ .../notificationstudio/editor/DateTimeEditor.java | 139 ++++++++++++ .../notificationstudio/editor/DropDownEditor.java | 84 +++++++ .../android/notificationstudio/editor/Editors.java | 100 +++++++++ .../notificationstudio/editor/IconEditor.java | 118 ++++++++++ .../notificationstudio/editor/IntEditor.java | 32 +++ .../notificationstudio/editor/LinesEditor.java | 28 +++ .../notificationstudio/editor/TextEditor.java | 73 ++++++ .../generator/CodeGenerator.java | 139 ++++++++++++ .../generator/NotificationGenerator.java | 131 +++++++++++ .../notificationstudio/model/EditableItem.java | 216 ++++++++++++++++++ .../model/EditableItemConstants.java | 74 ++++++ 45 files changed, 2341 insertions(+) create mode 100644 apps/NotificationStudio/.classpath create mode 100644 apps/NotificationStudio/.project create mode 100644 apps/NotificationStudio/.settings/org.eclipse.jdt.core.prefs create mode 100644 apps/NotificationStudio/AndroidManifest.xml create mode 100644 apps/NotificationStudio/libs/android-support-v4.jar create mode 100644 apps/NotificationStudio/project.properties create mode 100644 apps/NotificationStudio/res/drawable-hdpi/android_logo.gif create mode 100644 apps/NotificationStudio/res/drawable-hdpi/ic_notification_multiple_mail_holo_dark.png create mode 100644 apps/NotificationStudio/res/drawable-hdpi/romain.jpg create mode 100644 apps/NotificationStudio/res/drawable-nodpi/icon_bg.xml create mode 100644 apps/NotificationStudio/res/drawable-nodpi/romainguy_rockaway.jpg create mode 100644 apps/NotificationStudio/res/layout-v14/boolean_editor.xml create mode 100644 apps/NotificationStudio/res/layout-v16/studio.xml create mode 100644 apps/NotificationStudio/res/layout-w801dp/studio.xml create mode 100644 apps/NotificationStudio/res/layout/boolean_editor.xml create mode 100644 apps/NotificationStudio/res/layout/divider.xml create mode 100644 apps/NotificationStudio/res/layout/editable_item.xml create mode 100644 apps/NotificationStudio/res/layout/editors.xml create mode 100644 apps/NotificationStudio/res/layout/preview.xml create mode 100644 apps/NotificationStudio/res/layout/studio.xml create mode 100644 apps/NotificationStudio/res/menu/action_bar.xml create mode 100644 apps/NotificationStudio/res/values-sw600dp/dimens.xml create mode 100644 apps/NotificationStudio/res/values-sw720dp/dimens.xml create mode 100644 apps/NotificationStudio/res/values-v11/colors.xml create mode 100644 apps/NotificationStudio/res/values-v11/dimens.xml create mode 100644 apps/NotificationStudio/res/values/colors.xml create mode 100644 apps/NotificationStudio/res/values/dimens.xml create mode 100644 apps/NotificationStudio/res/values/strings.xml create mode 100644 apps/NotificationStudio/src/com/android/notificationstudio/MaxHeightScrollView.java create mode 100644 apps/NotificationStudio/src/com/android/notificationstudio/NotificationStudioActivity.java create mode 100644 apps/NotificationStudio/src/com/android/notificationstudio/action/ShareCodeAction.java create mode 100644 apps/NotificationStudio/src/com/android/notificationstudio/action/ShareMockupAction.java create mode 100644 apps/NotificationStudio/src/com/android/notificationstudio/editor/BitmapEditor.java create mode 100644 apps/NotificationStudio/src/com/android/notificationstudio/editor/BooleanEditor.java create mode 100644 apps/NotificationStudio/src/com/android/notificationstudio/editor/DateTimeEditor.java create mode 100644 apps/NotificationStudio/src/com/android/notificationstudio/editor/DropDownEditor.java create mode 100644 apps/NotificationStudio/src/com/android/notificationstudio/editor/Editors.java create mode 100644 apps/NotificationStudio/src/com/android/notificationstudio/editor/IconEditor.java create mode 100644 apps/NotificationStudio/src/com/android/notificationstudio/editor/IntEditor.java create mode 100644 apps/NotificationStudio/src/com/android/notificationstudio/editor/LinesEditor.java create mode 100644 apps/NotificationStudio/src/com/android/notificationstudio/editor/TextEditor.java create mode 100644 apps/NotificationStudio/src/com/android/notificationstudio/generator/CodeGenerator.java create mode 100644 apps/NotificationStudio/src/com/android/notificationstudio/generator/NotificationGenerator.java create mode 100644 apps/NotificationStudio/src/com/android/notificationstudio/model/EditableItem.java create mode 100644 apps/NotificationStudio/src/com/android/notificationstudio/model/EditableItemConstants.java (limited to 'apps') diff --git a/apps/NotificationStudio/.classpath b/apps/NotificationStudio/.classpath new file mode 100644 index 0000000..a4763d1 --- /dev/null +++ b/apps/NotificationStudio/.classpath @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/apps/NotificationStudio/.project b/apps/NotificationStudio/.project new file mode 100644 index 0000000..00f0a21 --- /dev/null +++ b/apps/NotificationStudio/.project @@ -0,0 +1,33 @@ + + + NotificationStudio + + + + + + com.android.ide.eclipse.adt.ResourceManagerBuilder + + + + + com.android.ide.eclipse.adt.PreCompilerBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + com.android.ide.eclipse.adt.ApkBuilder + + + + + + com.android.ide.eclipse.adt.AndroidNature + org.eclipse.jdt.core.javanature + + diff --git a/apps/NotificationStudio/.settings/org.eclipse.jdt.core.prefs b/apps/NotificationStudio/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..f77b31c --- /dev/null +++ b/apps/NotificationStudio/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,4 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 +org.eclipse.jdt.core.compiler.compliance=1.5 +org.eclipse.jdt.core.compiler.source=1.5 diff --git a/apps/NotificationStudio/AndroidManifest.xml b/apps/NotificationStudio/AndroidManifest.xml new file mode 100644 index 0000000..cb849e0 --- /dev/null +++ b/apps/NotificationStudio/AndroidManifest.xml @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/apps/NotificationStudio/libs/android-support-v4.jar b/apps/NotificationStudio/libs/android-support-v4.jar new file mode 100644 index 0000000..f92dea2 Binary files /dev/null and b/apps/NotificationStudio/libs/android-support-v4.jar differ diff --git a/apps/NotificationStudio/project.properties b/apps/NotificationStudio/project.properties new file mode 100644 index 0000000..9b84a6b --- /dev/null +++ b/apps/NotificationStudio/project.properties @@ -0,0 +1,14 @@ +# This file is automatically generated by Android Tools. +# Do not modify this file -- YOUR CHANGES WILL BE ERASED! +# +# This file must be checked in Version Control Systems. +# +# To customize properties used by the Ant build system edit +# "ant.properties", and override values to adapt the script to your +# project structure. +# +# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): +#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt + +# Project target. +target=android-16 diff --git a/apps/NotificationStudio/res/drawable-hdpi/android_logo.gif b/apps/NotificationStudio/res/drawable-hdpi/android_logo.gif new file mode 100644 index 0000000..6078e86 Binary files /dev/null and b/apps/NotificationStudio/res/drawable-hdpi/android_logo.gif differ diff --git a/apps/NotificationStudio/res/drawable-hdpi/ic_notification_multiple_mail_holo_dark.png b/apps/NotificationStudio/res/drawable-hdpi/ic_notification_multiple_mail_holo_dark.png new file mode 100644 index 0000000..c4f3648 Binary files /dev/null and b/apps/NotificationStudio/res/drawable-hdpi/ic_notification_multiple_mail_holo_dark.png differ diff --git a/apps/NotificationStudio/res/drawable-hdpi/romain.jpg b/apps/NotificationStudio/res/drawable-hdpi/romain.jpg new file mode 100644 index 0000000..e932901 Binary files /dev/null and b/apps/NotificationStudio/res/drawable-hdpi/romain.jpg differ diff --git a/apps/NotificationStudio/res/drawable-nodpi/icon_bg.xml b/apps/NotificationStudio/res/drawable-nodpi/icon_bg.xml new file mode 100644 index 0000000..dcecdd3 --- /dev/null +++ b/apps/NotificationStudio/res/drawable-nodpi/icon_bg.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/apps/NotificationStudio/res/drawable-nodpi/romainguy_rockaway.jpg b/apps/NotificationStudio/res/drawable-nodpi/romainguy_rockaway.jpg new file mode 100644 index 0000000..68473ba Binary files /dev/null and b/apps/NotificationStudio/res/drawable-nodpi/romainguy_rockaway.jpg differ diff --git a/apps/NotificationStudio/res/layout-v14/boolean_editor.xml b/apps/NotificationStudio/res/layout-v14/boolean_editor.xml new file mode 100644 index 0000000..ae77468 --- /dev/null +++ b/apps/NotificationStudio/res/layout-v14/boolean_editor.xml @@ -0,0 +1,21 @@ + + + diff --git a/apps/NotificationStudio/res/layout-v16/studio.xml b/apps/NotificationStudio/res/layout-v16/studio.xml new file mode 100644 index 0000000..083ac79 --- /dev/null +++ b/apps/NotificationStudio/res/layout-v16/studio.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/apps/NotificationStudio/res/layout-w801dp/studio.xml b/apps/NotificationStudio/res/layout-w801dp/studio.xml new file mode 100644 index 0000000..0391f8b --- /dev/null +++ b/apps/NotificationStudio/res/layout-w801dp/studio.xml @@ -0,0 +1,28 @@ + + + + + + + + + \ No newline at end of file diff --git a/apps/NotificationStudio/res/layout/boolean_editor.xml b/apps/NotificationStudio/res/layout/boolean_editor.xml new file mode 100644 index 0000000..e482322 --- /dev/null +++ b/apps/NotificationStudio/res/layout/boolean_editor.xml @@ -0,0 +1,20 @@ + + + diff --git a/apps/NotificationStudio/res/layout/divider.xml b/apps/NotificationStudio/res/layout/divider.xml new file mode 100644 index 0000000..d2e20f8 --- /dev/null +++ b/apps/NotificationStudio/res/layout/divider.xml @@ -0,0 +1,40 @@ + + + + + + + + + \ No newline at end of file diff --git a/apps/NotificationStudio/res/layout/editable_item.xml b/apps/NotificationStudio/res/layout/editable_item.xml new file mode 100644 index 0000000..816dd0f --- /dev/null +++ b/apps/NotificationStudio/res/layout/editable_item.xml @@ -0,0 +1,111 @@ + + + + + + + + + + + + + + + + + + + + +