0
Так что я изучаю использование BigTextStyle для уведомлений в xamarin android. По какой-то причине всякий раз, когда я запускаю свой код, bigText и SetSummaryText не отображаются в уведомлении. Кто-нибудь знает, почему? Мой код ниже:Notification.BigTextStyle не отображается
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
// Set our view from the "main" layout resource
SetContentView (Resource.Layout.Main);
Notification.Builder builder = new Notification.Builder(this)
.SetContentTitle("Big Text")
.SetSmallIcon(Resource.Drawable.Icon);
Notification.BigTextStyle textStyle = new Notification.BigTextStyle();
string longTextMessage = "I went up on one pair of stairs.";
longTextMessage += "/Just like me. ";
textStyle.BigText(longTextMessage);
textStyle.SetSummaryText("The summary text goes here. ");
builder.SetStyle(textStyle);
Notification notification = builder.Build();
NotificationManager notificationManager =
GetSystemService(Context.NotificationService) as NotificationManager;
const int notificationId = 0;
notificationManager.Notify(notificationId, notification);
}
Это не сработало. Я отлаживаю его на своей галактике Samsung 4, работающей под Android 4.4. – user2626734
Не думай, что это сработало! Благодарю. – user2626734