Improve image loading in the notification, the widget and the lockscreen album art by moving stuff to worker thread and adjusting the bitmap size which should also prevent the to large bitmap exception currently occurring in the widget for some devices.
This commit is contained in:
parent
d8c7af3e09
commit
9d4ea9911f
7 changed files with 98 additions and 79 deletions
|
|
@ -23,8 +23,8 @@
|
|||
|
||||
<ImageView
|
||||
android:id="@+id/icon"
|
||||
android:layout_width="128dp"
|
||||
android:layout_height="128dp"
|
||||
android:layout_width="@dimen/notification_big_image_size"
|
||||
android:layout_height="@dimen/notification_big_image_size"
|
||||
android:scaleType="centerCrop"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
|
|
|
|||
|
|
@ -24,8 +24,8 @@
|
|||
|
||||
<ImageView
|
||||
android:id="@+id/icon"
|
||||
android:layout_width="128dp"
|
||||
android:layout_height="128dp"
|
||||
android:layout_width="@dimen/notification_big_image_size"
|
||||
android:layout_height="@dimen/notification_big_image_size"
|
||||
android:scaleType="centerCrop"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@
|
|||
|
||||
<ImageView
|
||||
android:id="@+id/album_art"
|
||||
android:layout_width="96dp"
|
||||
android:layout_height="96dp"
|
||||
android:layout_width="@dimen/widget_medium_image_size"
|
||||
android:layout_height="@dimen/widget_medium_image_size"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/default_album_art" />
|
||||
|
||||
|
|
|
|||
|
|
@ -17,12 +17,6 @@
|
|||
|
||||
<dimen name="status_bar_padding">0dp</dimen>
|
||||
|
||||
<!-- Notification template -->
|
||||
<dimen name="notification_big_icon_height">64.0dip</dimen>
|
||||
<dimen name="notification_big_icon_width">64.0dip</dimen>
|
||||
<dimen name="notification_info_container_padding_left">8.0dip</dimen>
|
||||
<dimen name="notification_info_container_padding_bottom">4.0dip</dimen>
|
||||
|
||||
<dimen name="tab_height">48dp</dimen>
|
||||
|
||||
<dimen name="tagEditorHeaderVariableSpace">100dp</dimen>
|
||||
|
|
@ -31,8 +25,6 @@
|
|||
Refer to App Widget Documentation for margin information
|
||||
http://developer.android.com/guide/topics/appwidgets/index.html#CreatingLayout
|
||||
-->
|
||||
<dimen name="app_widget_small_artwork_height">64dp</dimen>
|
||||
|
||||
<dimen name="pause_bar_width">5dp</dimen>
|
||||
<dimen name="pause_bar_distance">4dp</dimen>
|
||||
<dimen name="pause_bar_height">14dp</dimen>
|
||||
|
|
@ -48,7 +40,9 @@ http://developer.android.com/guide/topics/appwidgets/index.html#CreatingLayout
|
|||
<dimen name="seek_bar_margin_left_right">-17dp</dimen>
|
||||
<dimen name="list_padding_vertical">2dp</dimen>
|
||||
|
||||
<dimen name="notification_albumart_size">128dp</dimen>
|
||||
<dimen name="widget_medium_image_size">96dp</dimen>
|
||||
<dimen name="notification_big_image_size">128dp</dimen>
|
||||
|
||||
<dimen name="bottom_offset_fab_activity">86dp</dimen>
|
||||
|
||||
<dimen name="scrollbar_width">8dp</dimen>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue