Hi @wonka1234
Add two galleries to your PowerApps screen: "compact_view" and "browsegallery1".
In the OnSelect event of your button, add the following code:
If(isCompactView,
UpdateContext({isCompactView: false}),
UpdateContext({isCompactView: true})
)
This code checks the current state of the toggle variable. If it is true, it sets it to false, and vice versa.
Set the Visible property of the "compact_view" gallery to isCompactView and the Visible property of the "browsegallery1" gallery to !isCompactView. This will make the "compact_view" gallery visible when isCompactView is true and make the "browsegallery1" gallery visible when isCompactView is false.
By toggling the OnSelect button, the state of the toggle variable isCompactView will change, which in turn will control the visibility of the galleries.
Thanks!
If my response has been helpful in resolving your issue, I kindly request that you consider clicking "Accept as solution" and "giving it a thumbs up" as a token of appreciation.