By default, the notification’s text content is truncated to fit one line.
By default, the notification’s text content is truncated to fit one line.
If you want your notification to be longer, for example, to create a larger text area, you can do it in this way:
A . var builder = NotificationCompat.Builder(this, CHANNEL_ID)
.setContentText("Much longer text that cannot fit one line…")
.setStyle(NotificationCompat.BigTextStyle()
.bigText("Much longer text that cannot fit one line…"))
…
B . var builder = NotificationCompat.Builder(this, CHANNEL_ID)
.setContentText("Much longer text that cannot fit one line…")
.setLongText("Much longer text that cannot fit one line…"))
…
C . var builder = NotificationCompat.Builder(this, CHANNEL_ID)
.setContentText("Much longer text that cannot fit one line…")
.setTheme(android.
D . style.Theme_LongText);
…
Answer: A
Explanation:
Reference: https://developer.android.com/training/notify-user/build-notification
Latest Associate Android Developer Practice Questions with 107 Q&As
Updated Study Material | Instant Download | Detailed Answers and Explanations