More Group Sites
Education Books
School Rankings
Jobless Net
Better Home
Enviro++
更好教育论坛


Help | Subscribe/Unsubscribe | Rules | Other Group Sites: Better Education | Better Education Forum
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Share
Options
View
Go to last post Go to first unread
hong  
#1 Posted : Sunday, 20 October 2019 5:52:06 PM(UTC)
hong

Rank: Administration

Reputation:

Groups: AcademicCoachingSchool, admin, Administration, BookSeller, CatholicSchool, CoachingAdult, CoachingProfessional, CoachingSports, ExtraCurriculumCoaching, IndependentSchool, Moderator, MusicTeacher, PrivateSchool, PublicSchool, SelectiveSchool, tutor
Joined: 23/11/2008(UTC)
Posts: 519

Xamarin Forms Android Notification.BigTextStyle

On Android, lock screen or notification drawer may show truncated push notification messages with ... at the end. User can expand the messages. However, if you want to show entire messages without the truncation, you can set BigTextStyle.        

Code:
// Instantiate the Big Text style:
            NotificationCompat.BigTextStyle textStyle = new NotificationCompat.BigTextStyle();
            //Notification.BigTextStyle textStyle = new Notification.BigTextStyle();

            // Fill it with text:             string longTextMessage = messageBody;             textStyle.BigText(longTextMessage);

            // Set the summary text:             //textStyle.SetSummaryText("The summary text goes here.");

Or simply one line                 .SetStyle(new NotificationCompat.BigTextStyle().BigText(messageBody))

Use NotificationCompat instead of Notification.

Reference:

Notification.BigTextStyle not appearing

Edited by user Monday, 21 October 2019 5:16:59 AM(UTC)  | Reason: Not specified

Sponsor
Rss Feed  Atom Feed
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.