fix: fix crashes on PreviewlessMediaGridStatusDisplayItem
This commit is contained in:
parent
31a7aa9d40
commit
51ef732d50
|
@ -138,9 +138,7 @@ public class PreviewlessMediaGridStatusDisplayItem extends StatusDisplayItem{
|
||||||
default -> throw new IllegalStateException("Unexpected value: "+att.type);
|
default -> throw new IllegalStateException("Unexpected value: "+att.type);
|
||||||
});
|
});
|
||||||
if(c.view.getLayoutParams()==null)
|
if(c.view.getLayoutParams()==null)
|
||||||
c.view.setLayoutParams(new PreviewlessMediaGridLayout.LayoutParams(item.tiledLayout.tiles[i]));
|
c.view.setLayoutParams(new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT));
|
||||||
else
|
|
||||||
((MediaGridLayout.LayoutParams) c.view.getLayoutParams()).tile=item.tiledLayout.tiles[i];
|
|
||||||
layout.addView(c.view);
|
layout.addView(c.view);
|
||||||
c.view.setOnClickListener(clickListener);
|
c.view.setOnClickListener(clickListener);
|
||||||
c.view.setTag(i);
|
c.view.setTag(i);
|
||||||
|
|
Loading…
Reference in New Issue