fix: fix crashes on PreviewlessMediaGridStatusDisplayItem

This commit is contained in:
LucasGGamerM 2023-09-16 16:22:00 -03:00
parent 31a7aa9d40
commit 51ef732d50
1 changed files with 1 additions and 3 deletions

View File

@ -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);