问题
I have observed the following behavior when I create a notification with
Notification.setContextText("Teaser text. Read more...");
Notification.setStyle(new Notification.BigTextStyle().bigText("full text ..."));
- When the notification appears at the top of the list (or is the only notification) I see the whole of "full text" wrapped onto multiple lines as required.
- When there are other notifications above this one I see "Teaser text. Read more...".
- If I leave out the BigTextStyle bit above and simply issue
setContentText("full text...")
the full text appears partially and does not wrap around.
Is this the expected behavior? Can it somehow be modified so as to always - i.e. when the notification is not at the top of the list - show the big text - or get ContentText to wrap? I'd be most obliged for any help and tips on this.
回答1:
What you are seeing is correct. Only the topmost notification is expanded by default, however the user can always expand any notification (through a two finger swipe down or one finger hold and swipe down). There's no way to programmatically always make your notification expanded or programmatically expand it.
来源:https://stackoverflow.com/questions/39751675/android-notification-bigtextstyle-behavior