diff options
author | TreeHugger Robot <treehugger-gerrit@google.com> | 2019-04-26 18:57:17 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2019-04-26 18:57:17 +0000 |
commit | 2f47432d7d6f35b2e72f447da233f76c66bc8465 (patch) | |
tree | a2ed735a7de99ab76e9567036c1777174972d06b | |
parent | 7b2009571e3dca095d10c9de87b360d0fdd2b75d (diff) | |
parent | 906351838dad1461b6182362ccc1fa3363fdfb65 (diff) | |
download | CellBroadcastReceiver-2f47432d7d6f35b2e72f447da233f76c66bc8465.tar.gz |
Merge "Fixed the emergency alert history UI issue" into qt-dev
-rw-r--r-- | res/drawable/list_item_background_read.xml | 24 | ||||
-rw-r--r-- | res/drawable/list_item_background_unread.xml | 24 | ||||
-rw-r--r-- | res/layout/cell_broadcast_list_item.xml | 2 | ||||
-rw-r--r-- | res/values/colors.xml | 3 | ||||
-rw-r--r-- | src/com/android/cellbroadcastreceiver/CellBroadcastListItem.java | 8 |
5 files changed, 1 insertions, 60 deletions
diff --git a/res/drawable/list_item_background_read.xml b/res/drawable/list_item_background_read.xml deleted file mode 100644 index 6b84893dc..000000000 --- a/res/drawable/list_item_background_read.xml +++ /dev/null @@ -1,24 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- Copyright (C) 2007 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. ---> - -<selector xmlns:android="http://schemas.android.com/apk/res/android"> - <item android:state_selected="true" - android:drawable="@android:color/transparent" /> - <item android:state_pressed="true" android:state_selected="false" - android:drawable="@android:color/transparent" /> - <item android:state_selected="false" - android:drawable="@color/read_bgcolor" /> -</selector> diff --git a/res/drawable/list_item_background_unread.xml b/res/drawable/list_item_background_unread.xml deleted file mode 100644 index ffedbc13b..000000000 --- a/res/drawable/list_item_background_unread.xml +++ /dev/null @@ -1,24 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- Copyright (C) 2007 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. ---> - -<selector xmlns:android="http://schemas.android.com/apk/res/android"> - <item android:state_selected="true" - android:drawable="@android:color/transparent" /> - <item android:state_pressed="true" android:state_selected="false" - android:drawable="@android:color/transparent" /> - <item android:state_selected="false" - android:drawable="@color/unread_bgcolor" /> -</selector> diff --git a/res/layout/cell_broadcast_list_item.xml b/res/layout/cell_broadcast_list_item.xml index 09230a4bf..ca2c383b0 100644 --- a/res/layout/cell_broadcast_list_item.xml +++ b/res/layout/cell_broadcast_list_item.xml @@ -20,7 +20,7 @@ <com.android.cellbroadcastreceiver.CellBroadcastListItem xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" - android:background="@drawable/list_item_background_unread" + android:background="?android:attr/colorBackground" android:paddingStart="16dp" android:paddingEnd="16dp" android:paddingTop="16dp" diff --git a/res/values/colors.xml b/res/values/colors.xml index d7505053e..6db24acec 100644 --- a/res/values/colors.xml +++ b/res/values/colors.xml @@ -17,9 +17,6 @@ */ --> <resources> - <!-- the background color used for unread broadcasts --> - <color name="unread_bgcolor">#ffffffff</color> - <color name="read_bgcolor">#ffeeeeee</color> <color name="notification_color">#FFDB4437</color><!-- Red 500 --> <color name="cell_broadcast_color_primary">#ff263238</color> diff --git a/src/com/android/cellbroadcastreceiver/CellBroadcastListItem.java b/src/com/android/cellbroadcastreceiver/CellBroadcastListItem.java index 8a06f8a08..56939b1a0 100644 --- a/src/com/android/cellbroadcastreceiver/CellBroadcastListItem.java +++ b/src/com/android/cellbroadcastreceiver/CellBroadcastListItem.java @@ -18,7 +18,6 @@ package com.android.cellbroadcastreceiver; import android.content.Context; import android.graphics.Typeface; -import android.graphics.drawable.Drawable; import android.telephony.CellBroadcastMessage; import android.text.Spannable; import android.text.SpannableStringBuilder; @@ -64,13 +63,6 @@ public class CellBroadcastListItem extends RelativeLayout { */ public void bind(CellBroadcastMessage message) { mCbMessage = message; - - Drawable background = message.isRead() ? - getResources().getDrawable(R.drawable.list_item_background_read) : - getResources().getDrawable(R.drawable.list_item_background_unread); - - setBackground(background); - mChannelView.setText(CellBroadcastResources.getDialogTitleResource(mContext, message)); mDateView.setText(message.getDateString(getContext())); mMessageView.setText(formatMessage(message)); |