mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-19 10:48:19 +00:00
WidgetTray improvement
UI - Fixing the issue of widget row not rendering - Moved the resetting of previous bitmap to the start of onBind instead of the onDetachedWindow. Performance - WidgetModel do not have to keep packageName list around. Will com in immediate follow up CLs - use lowRes widgets bitmap before fully loading the fullRes one. - application icons are fully loaded in background thread. b/19897708 Change-Id: I5b3b43a5c543a5135c395f90df32e66d57dc86e0
This commit is contained in:
@@ -47,7 +47,7 @@ import com.android.launcher3.compat.AppWidgetManagerCompat;
|
||||
*/
|
||||
public class WidgetCell extends LinearLayout implements OnLayoutChangeListener {
|
||||
|
||||
private static final String TAG = "PagedViewWidget";
|
||||
private static final String TAG = "WidgetCell";
|
||||
private static final boolean DEBUG = false;
|
||||
|
||||
// Temporary preset width and height of the image to keep them aligned.
|
||||
@@ -120,7 +120,16 @@ public class WidgetCell extends LinearLayout implements OnLayoutChangeListener {
|
||||
Log.d(TAG, String.format("[tag=%s] onDetachedFromWindow", getTagToString()));
|
||||
}
|
||||
super.onDetachedFromWindow();
|
||||
deletePreview(true);
|
||||
deletePreview(false);
|
||||
}
|
||||
|
||||
public void reset() {
|
||||
ImageView image = (ImageView) findViewById(R.id.widget_preview);
|
||||
final TextView name = (TextView) findViewById(R.id.widget_name);
|
||||
final TextView dims = (TextView) findViewById(R.id.widget_dims);
|
||||
image.setImageDrawable(null);
|
||||
name.setText(null);
|
||||
dims.setText(null);
|
||||
}
|
||||
|
||||
public void deletePreview(boolean recycleImage) {
|
||||
|
||||
Reference in New Issue
Block a user