From Lollipop source code I can see image size is 128dp, see notification_template_material_big_media.xml on GitHub:
<!-- Layout to be used with only max 3 actions. It has a much larger picture at the left side-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/status_bar_latest_event_content"
android:layout_width="match_parent"
android:layout_height="128dp"
android:background="#00000000"
android:tag="bigMediaNarrow"
>
<ImageView android:id="@+id/icon"
android:layout_width="128dp"
android:layout_height="128dp"
android:scaleType="centerCrop"
/>
<!-- ...Nothing interesting for us futher... -->
</RelativeLayout>
This is for expanded layout with 3 or less action buttons. Looking to Notification.MediaStyle.getBigLayoutResource(int) on GrepCode, if there are more buttons it seems notification_template_material_big_media.xml is used:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/status_bar_latest_event_content"
android:layout_width="match_parent"
android:layout_height="128dp"
android:background="#00000000"
android:tag="bigMedia"
>
<include layout="@layout/notification_template_icon_group"
android:layout_width="@dimen/notification_large_icon_width"
android:layout_height="@dimen/notification_large_icon_height"
/>
<!-- ...Nothing interesting for us futher... -->
</RelativeLayout>
And notification_template_icon_group.xml looks like this:
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:internal="http://schemas.android.com/apk/prv/res/android"
android:layout_width="@dimen/notification_large_icon_width"
android:layout_height="@dimen/notification_large_icon_height"
android:id="@+id/icon_group"
>
<ImageView android:id="@+id/icon"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="12dp"
android:layout_marginBottom="12dp"
android:layout_marginStart="12dp"
android:layout_marginEnd="12dp"
android:scaleType="centerInside"
/>
<ImageView android:id="@+id/right_icon"
android:layout_width="16dp"
android:layout_height="16dp"
android:padding="3dp"
android:layout_gravity="end|bottom"
android:scaleType="centerInside"
android:visibility="gone"
android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp"
/>
</FrameLayout>
You can find notification_large_icon_width
and notification_large_icon_height
in .../res/values/dimens.xml:
<!-- The width of the big icons in notifications. -->
<dimen name="notification_large_icon_width">64dp</dimen>
<!-- The width of the big icons in notifications. -->
<dimen name="notification_large_icon_height">64dp</dimen>
So the final answer - 128dp for expanded layout with 3 or less action buttons and 64dp if there are more then 3.
MediaStyle
gets displayed as the background for the lockscreen, I choose to decode to the device's maximum size. Though this may not be ideal... – Bandoleer