Custom notification maximum height?
android, android-layout
Solution
You seem to already know... You're probably talking about big view style notifications. Google has specific training documentation as well as a technical guide for that. Here's some example code from there:
// Constructs the Builder object.
NotificationCompat.Builder builder =
new NotificationCompat.Builder(this)
.setSmallIcon(R.drawable.ic_stat_notification)
.setContentTitle(getString(R.string.notification))
.setContentText(getString(R.string.ping))
.setDefaults(Notification.DEFAULT_ALL) // requires VIBRATE permission
/*
* Sets the big view "big text" style and supplies the
* text (the user's reminder message) that will be displayed
* in the detail area of the expanded notification.
* These calls are ignored by the support library for
* pre-4.1 devices.
*/
.setStyle(new NotificationCompat.BigTextStyle()
.bigText(msg))
.addAction (R.drawable.ic_stat_dismiss,
getString(R.string.dismiss), piDismiss)
.addAction (R.drawable.ic_stat_snooze,
getString(R.string.snooze), piSnooze);
Note the call to `setStyle`.
Problem
I am trying to make a custom notification and it always ends up being pretty small (about the size of most notifications). I can see that Netflix and Youtube display much larger notifications which look custom (they might be big view) when casting to a chromecast device. How are they making them that large? Thanks. EDIT: Marked it as answered because of the comment pointing out bigContentView