In my Android application I want to create a expendable notification. For this I have to set a Style for the notification like this:
NotificationCompat.Builder builder = new NotificationCompat.Builder(this);
builder.setSmallIcon(android.R.drawable.ic_menu_info_details);
builder.setContentTitle("My notification");
builder.setContentText("Hello World!");
builder.setStyle(...);
Android gives me some styles I can use with this method but I like to create my own, so I can load a layout in the notification. So how can I do this? If I create a subclass of Style
there are only these two methods:
public Notification build();
public void setBuilder(Builder builder);
So how can I load my own layout in the notification? builder.setContent
is insufficient for me because then I only have 64dp for the layout.