Merge "Fix thumbnail views not rotating w/ orientation" into ub-launcher3-qt-dev
This commit is contained in:
commit
40689ca9ab
|
@ -44,6 +44,7 @@ public final class TaskItemView extends LinearLayout {
|
||||||
private final Drawable mDefaultThumbnail;
|
private final Drawable mDefaultThumbnail;
|
||||||
private final TaskLayerDrawable mIconDrawable;
|
private final TaskLayerDrawable mIconDrawable;
|
||||||
private final TaskLayerDrawable mThumbnailDrawable;
|
private final TaskLayerDrawable mThumbnailDrawable;
|
||||||
|
private View mTaskIconThumbnailView;
|
||||||
private TextView mLabelView;
|
private TextView mLabelView;
|
||||||
private ImageView mIconView;
|
private ImageView mIconView;
|
||||||
private ImageView mThumbnailView;
|
private ImageView mThumbnailView;
|
||||||
|
@ -79,6 +80,7 @@ public final class TaskItemView extends LinearLayout {
|
||||||
protected void onFinishInflate() {
|
protected void onFinishInflate() {
|
||||||
super.onFinishInflate();
|
super.onFinishInflate();
|
||||||
mLabelView = findViewById(R.id.task_label);
|
mLabelView = findViewById(R.id.task_label);
|
||||||
|
mTaskIconThumbnailView = findViewById(R.id.task_icon_and_thumbnail);
|
||||||
mThumbnailView = findViewById(R.id.task_thumbnail);
|
mThumbnailView = findViewById(R.id.task_thumbnail);
|
||||||
mIconView = findViewById(R.id.task_icon);
|
mIconView = findViewById(R.id.task_icon);
|
||||||
|
|
||||||
|
@ -186,5 +188,6 @@ public final class TaskItemView extends LinearLayout {
|
||||||
((ThumbnailDrawable) drawable).setRequestedOrientation(newConfig.orientation);
|
((ThumbnailDrawable) drawable).setRequestedOrientation(newConfig.orientation);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
mTaskIconThumbnailView.forceLayout();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,7 +56,6 @@ final class TaskThumbnailIconView extends ViewGroup {
|
||||||
int width = height;
|
int width = height;
|
||||||
setMeasuredDimension(width, height);
|
setMeasuredDimension(width, height);
|
||||||
|
|
||||||
|
|
||||||
int subItemSize = (int) (SUBITEM_FRAME_RATIO * height);
|
int subItemSize = (int) (SUBITEM_FRAME_RATIO * height);
|
||||||
if (mThumbnailView.getVisibility() != GONE) {
|
if (mThumbnailView.getVisibility() != GONE) {
|
||||||
boolean isPortrait =
|
boolean isPortrait =
|
||||||
|
|
Loading…
Reference in New Issue