1
我有一個通知,其中包含少量文本,但它仍然很大,因此它會顯示在通知欄中,因此它被縮寫。唯一的解決方案,我發現它做出了自定義通知,但它似乎有點矯枉過正,我想要做的。在通知中滾動文本
我可以使通知滾動文本或擴大通知文本區域,因此它將顯示全文而不僅僅是它的前幾個單詞嗎?
我目前調用與通知:
private void triggerNotification() {
Notification notification = new Notification(R.drawable.ic_launcher,
"Title", System.currentTimeMillis());
notification.setLatestEventInfo(this, "First text",
"This is the text that gets abberviated with .. when it is too long",
PendingIntent.getActivity(this, 0, new Intent(this,MainActivity.class)
.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP),
PendingIntent.FLAG_CANCEL_CURRENT));
notification.flags |= Notification.FLAG_AUTO_CANCEL;
nm.notify(0, notification);
}
你的min-sdk支持什麼? – iTurki 2012-08-13 17:36:14
android:minSdkVersion =「8」 – Nick 2012-08-13 17:38:44