diff options
| author | Daniel Sandler <dsandler@android.com> | 2012-05-10 16:20:40 -0400 |
|---|---|---|
| committer | Daniel Sandler <dsandler@android.com> | 2012-05-10 16:45:48 -0400 |
| commit | e551884b0972280c9aee451b489832e67395c8e2 (patch) | |
| tree | 4053452e1559615c7ab088aaa0013a0533fd4b0a /core/java/android | |
| parent | 1a0c9145dc32095acc250bdabc4a9b8f82d6bd3e (diff) | |
| download | frameworks_base-e551884b0972280c9aee451b489832e67395c8e2.zip frameworks_base-e551884b0972280c9aee451b489832e67395c8e2.tar.gz frameworks_base-e551884b0972280c9aee451b489832e67395c8e2.tar.bz2 | |
Restyling action buttons.
Bug: 6418617
Change-Id: I843352fbd167aeb6cc7beb0172b7416aabd5856a
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/app/Notification.java | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java index edeeee2..09d24e3 100644 --- a/core/java/android/app/Notification.java +++ b/core/java/android/app/Notification.java @@ -1490,7 +1490,16 @@ public class Notification implements Parcelable RemoteViews button = new RemoteViews(mContext.getPackageName(), R.layout.notification_action); button.setTextViewCompoundDrawables(R.id.action0, action.icon, 0, 0, 0); button.setTextViewText(R.id.action0, action.title); - button.setOnClickPendingIntent(R.id.action0, action.actionIntent); + if (action.actionIntent != null) { + button.setOnClickPendingIntent(R.id.action0, action.actionIntent); + //button.setBoolean(R.id.action0, "setEnabled", true); + button.setFloat(R.id.button0, "setAlpha", 1.0f); + button.setBoolean(R.id.button0, "setClickable", true); + } else { + //button.setBoolean(R.id.action0, "setEnabled", false); + button.setFloat(R.id.button0, "setAlpha", 0.5f); + button.setBoolean(R.id.button0, "setClickable", false); + } button.setContentDescription(R.id.action0, action.title); return button; } |
