summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--res/layout/cell_broadcast_list_item.xml48
-rw-r--r--res/layout/cell_broadcast_list_screen.xml4
-rw-r--r--res/values/colors.xml1
-rw-r--r--src/com/android/cellbroadcastreceiver/CellBroadcastAlertService.java4
4 files changed, 31 insertions, 26 deletions
diff --git a/res/layout/cell_broadcast_list_item.xml b/res/layout/cell_broadcast_list_item.xml
index 95f8ff69..489039f2 100644
--- a/res/layout/cell_broadcast_list_item.xml
+++ b/res/layout/cell_broadcast_list_item.xml
@@ -19,43 +19,45 @@
<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:layout_height="wrap_content"
android:background="@drawable/list_item_background_unread"
- android:paddingRight="10dip" >
+ android:paddingStart="16dp"
+ android:paddingEnd="16dp"
+ android:paddingTop="16dp"
+ android:paddingBottom="16dp"
+ >
<TextView android:id="@+id/channel"
- android:layout_width="wrap_content"
+ android:layout_width="match_parent"
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_alignParentLeft="true"
+ android:layout_marginEnd="16dip"
+ android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:layout_alignWithParentIfMissing="true"
- android:layout_toLeftOf="@+id/date"
- android:ellipsize="marquee" />
+ android:layout_toStartOf="@+id/date"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:textColor="#DD000000"
+ android:singleLine="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:layout_alignParentEnd="true"
+ android:layout_alignBaseline="@id/channel"
+ android:textAppearance="?android:attr/textAppearanceSmall"
android:singleLine="true"
- android:layout_alignParentRight="true"
- android:layout_alignParentTop="true" />
+ />
<TextView android:id="@+id/message"
- android:layout_width="wrap_content"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:textAppearance="?android:attr/textAppearanceSmallInverse"
+ android:layout_below="@id/channel"
+ android:layout_marginTop="4dp"
+ android:textAppearance="?android:attr/textAppearanceSmall"
android:singleLine="true"
- android:layout_marginBottom="6dip"
- android:layout_marginLeft="7dip"
- android:layout_alignParentBottom="true"
- android:layout_alignWithParentIfMissing="true"
- android:ellipsize="end" />
+ android:ellipsize="marquee"
+ />
</com.android.cellbroadcastreceiver.CellBroadcastListItem>
diff --git a/res/layout/cell_broadcast_list_screen.xml b/res/layout/cell_broadcast_list_screen.xml
index 1e963151..fd7f784d 100644
--- a/res/layout/cell_broadcast_list_screen.xml
+++ b/res/layout/cell_broadcast_list_screen.xml
@@ -26,9 +26,7 @@
android:layout_height="match_parent"
android:drawSelectorOnTop="false"
android:scrollbarStyle="insideOverlay"
- android:background="@android:color/white"
- android:cacheColorHint="@android:color/white"
- android:fadingEdgeLength="16dip" />
+ />
<TextView android:id="@+android:id/empty"
android:layout_width="match_parent"
diff --git a/res/values/colors.xml b/res/values/colors.xml
index 28968629..f6aa332c 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -20,5 +20,6 @@
<!-- the background color used for unread broadcasts -->
<color name="unread_bgcolor">#ffffffff</color>
<color name="read_bgcolor">#ffeeeeee</color>
+ <color name="notification_color">#FFFF9800</color><!-- Orange 800 -->
</resources>
diff --git a/src/com/android/cellbroadcastreceiver/CellBroadcastAlertService.java b/src/com/android/cellbroadcastreceiver/CellBroadcastAlertService.java
index 75907c9f..ebb706c9 100644
--- a/src/com/android/cellbroadcastreceiver/CellBroadcastAlertService.java
+++ b/src/com/android/cellbroadcastreceiver/CellBroadcastAlertService.java
@@ -371,6 +371,10 @@ public class CellBroadcastAlertService extends Service {
.setTicker(channelName)
.setWhen(System.currentTimeMillis())
.setContentIntent(pi)
+ .setCategory(Notification.CATEGORY_SYSTEM)
+ .setPriority(Notification.PRIORITY_HIGH)
+ .setColor(getResources().getColor(R.color.notification_color))
+ .setVisibility(Notification.VISIBILITY_PUBLIC)
.setDefaults(Notification.DEFAULT_ALL);
builder.setDefaults(Notification.DEFAULT_ALL);