exam questions

Exam Associate Android Developer All Questions

View all questions & answers for the Associate Android Developer exam

Exam Associate Android Developer topic 1 question 2 discussion

Actual exam question from Google's Associate Android Developer
Question #: 2
Topic #: 1
[All Associate Android Developer Questions]

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.R.style.Theme_LongText); ...
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️
Reference:
https://developer.android.com/training/notify-user/build-notification

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Currently there are no comments in this discussion, be the first to comment!
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago