summaryrefslogtreecommitdiffstats
path: root/res/layout
diff options
context:
space:
mode:
authorJake Hamby <jhamby@google.com>2011-05-17 18:49:03 -0700
committerJake Hamby <jhamby@google.com>2011-06-06 15:52:24 -0700
commit50a624a47ce645a7992e346e40a4e7ec5e0df9b7 (patch)
tree6425bdec2c38ae4454144529ba2831acadb1b289 /res/layout
parentf00da53dd98c2d536126ed9a405633de584fd36d (diff)
downloadandroid_packages_apps_CellBroadcastReceiver-50a624a47ce645a7992e346e40a4e7ec5e0df9b7.tar.gz
android_packages_apps_CellBroadcastReceiver-50a624a47ce645a7992e346e40a4e7ec5e0df9b7.tar.bz2
android_packages_apps_CellBroadcastReceiver-50a624a47ce645a7992e346e40a4e7ec5e0df9b7.zip
Initial checkin of Cell Broadcast display application.
Simple Cell Broadcast application. Supports ETWS and CMAS emergency messages, and can be extended to support other types of PWS (Public Warning System) emergency warnings. User preferences for configuration of each supported national system (ETWS, CMAS, and channel 50 broadcasts for Brazil) are displayed/hidden based on the values in res/values/config.xml. For emergency alerts, a flashing warning icon and special alert sound is played. If there is a text-to-speech engine installed for the language of the broadcast, then the contents of the broadcast message will be spoken after the alert sound is played. The user can disable the text-to-speech feature in settings, as well as adjusting the length of the alert sound and enabling/disabling delivery of several emergency broadcast channels. The CellBroadcastReceiverTests apk includes a launcher activity with buttons for sending each type of test message. This APK must be signed with the system certificate in order to acquire the BROADCAST_SMS permission required to send test broadcasts to the app. Change-Id: If9b61e02c246de5783b3e39cd100ea707ea80084
Diffstat (limited to 'res/layout')
-rw-r--r--res/layout/cell_broadcast_list_item.xml59
-rw-r--r--res/layout/cell_broadcast_list_screen.xml28
-rw-r--r--res/layout/delete_broadcast_dialog_view.xml28
3 files changed, 115 insertions, 0 deletions
diff --git a/res/layout/cell_broadcast_list_item.xml b/res/layout/cell_broadcast_list_item.xml
new file mode 100644
index 00000000..a039aff1
--- /dev/null
+++ b/res/layout/cell_broadcast_list_item.xml
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+ * Copyright (C) 2011 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.
+ */
+-->
+
+<com.android.cellbroadcastreceiver.CellBroadcastListItem xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="?android:attr/listPreferredItemHeight"
+ android:background="@drawable/list_item_background_unread"
+ android:paddingRight="10dip" >
+
+ <TextView android:id="@+id/channel"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textAppearance="?android:attr/textAppearanceMediumInverse"
+ android:singleLine="true"
+ android:layout_marginTop="6dip"
+ android:layout_marginRight="5dip"
+ android:layout_marginLeft="7dip"
+ android:layout_alignParentTop="true"
+ android:layout_alignWithParentIfMissing="true"
+ android:ellipsize="marquee" />
+
+ <TextView android:id="@+id/date"
+ android:layout_marginTop="6dip"
+ android:layout_marginRight="5dip"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:textAppearance="?android:attr/textAppearanceSmallInverse"
+ android:singleLine="true"
+ android:layout_alignParentRight="true"
+ android:layout_alignParentTop="true" />
+
+ <TextView android:id="@+id/message"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textAppearance="?android:attr/textAppearanceSmallInverse"
+ android:singleLine="true"
+ android:layout_marginBottom="10dip"
+ android:layout_marginLeft="7dip"
+ android:layout_alignParentBottom="true"
+ android:layout_alignWithParentIfMissing="true"
+ android:ellipsize="end" />
+
+</com.android.cellbroadcastreceiver.CellBroadcastListItem>
diff --git a/res/layout/cell_broadcast_list_screen.xml b/res/layout/cell_broadcast_list_screen.xml
new file mode 100644
index 00000000..44de8ee9
--- /dev/null
+++ b/res/layout/cell_broadcast_list_screen.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+ * Copyright (C) 2011 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.
+ */
+-->
+
+<ListView android:id="@android:id/list" xmlns:android="http://schemas.android.com/apk/res/android"
+ style="?android:attr/listViewWhiteStyle"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:drawSelectorOnTop="false"
+ android:scrollbarStyle="insideOverlay"
+ android:background="@android:color/white"
+ android:cacheColorHint="@android:color/white"
+ android:fadingEdgeLength="16dip" />
diff --git a/res/layout/delete_broadcast_dialog_view.xml b/res/layout/delete_broadcast_dialog_view.xml
new file mode 100644
index 00000000..0ae4328f
--- /dev/null
+++ b/res/layout/delete_broadcast_dialog_view.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2009 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.
+-->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:orientation="vertical"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:padding="15dip">
+
+ <TextView android:id="@+id/message"
+ style="?android:attr/textAppearanceMedium"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content" />
+
+</LinearLayout>