AiForms.SettingsView
AiForms.SettingsView copied to clipboard
Possibility To Hide a Cell / Cell ReadOnly
First, this SettingsView is awesome, but is there a way to hide some cell without hiding all the section, also i wanted to have a readonly mode to be able to disable a cell without making it light gray. Thank you.
@AmauryBJ
Thank you for using this library.
For now, there aren't the functions you want. But I accept these as a request.
Please wait without expecting😃
It would be awesome to have a IsVisible-Property for each cell. My current project has some permissions for users and for now I'm helping me out with switching between multiple Sections. But this feels kind of nasty.
Added pull request https://github.com/muak/AiForms.SettingsView/pull/161 for this feature :-)
I tried the merged PR for this feature, but it does not work as expected. As you can see in the attached screenshot a CustomCell is not fully hidden when IsVisible is set to false. This applies at least to CustomCells, CommandCells and ButtonCells with iOS.
With Android the contents of a cell is fully hidden but if you look closely you can see that the dividing line has doubled in size because those borders collapse. Each hidden cell adds up to this line.
Thanks @gerricom for checking this out! I'll try to fix it when time is available. I also noticed the border issue... Maybe @muak can point me to the point where to fix this?
@muak I added PR #173 to fix the issue of borders on Android. However on iOS I cannot reproduce the issue reported by @gerricom.
It looks fine when I tested the following example on iPhone8/11 simulators (see below). @gerricom Maybe you can provide me an example that fails together?
<sv:EntryCell Title="Test" />
<sv:ButtonCell Title="Visible button" />
<sv:ButtonCell Title="Invisible button" IsVisible="False" />
<sv:CommandCell Title="Visible command" IsVisible="True" />
<sv:CommandCell Title="Invisible command" IsVisible="False" />
<sv:CustomCell>
<Label Text="Visible custom"></Label>
</sv:CustomCell>
<sv:CustomCell IsVisible="False">
<Label Text="Invisible custom"></Label>
</sv:CustomCell>
Output is:
Thanks so far! I had not yet the time to test this, but your screenshots are showing a glitch, too:
I will test this myself next week!
@akaegi I merged it. Thank you for your PR.
@gerricom Thank you for you report. I will confirm it.
Thanks @gerricom - seems I was really blindsighted when looking on the iPhone screen hoping that it is ok ;-) Will look back into it when time allows - but if one of you two can solve it I'd be more than happy.