Closed dalekunce closed 8 years ago
For more advanced logic of this nature, my thought is that we should move away from adding to the XForms XML and mucking about deeper in the JavaRosa XForms madness. We want to stay away from modifying pyxform if possible.
This should be a discussion item during kickoff week.
This is probably the most useful constraint.
When building this make sure that the hidden tags may have required constraints, and they (perhaps a name tag) are only required if the parent tag, like building=commercial
has been activated.
See https://github.com/AmericanRedCross/OpenMapKitAndroid/issues/17
Besides building=commercial
vs building=residential
, what are other skip logic examples?
cc/ @dalekunce @PaulUithol
Depends completely on what you're surveying :)
Could be values for amenity
, building
values indeed, waterway
(drainage, ditch, stream, river, etc) or any of a dozen others.
Cool, this will be configurable in a form-by-form basis, as well as a global basis.
Somehow I need to figure out how to make the FragmentStatePager adapter update when the list of tags to be shown changes. Not obvious.
This one is blocking me a bit right now. I'm thinking if I clean up TagEdit
a bit so that the List<TagEdit>
is not exposed to the TagSwipeActivity
, it'll make more sense. If TagSwipeActivity just calls a static method of TagEdit
or better yet, a container class for TagEdit
, I can just have it get the tag it's asking for and leave it at that. Then, I'll have to find the right mechanism to tell the TagSwipe
to refresh.
Though this UI is not super common, it's similar to tabs found in the play store. If I can find an example of dynamically changing the list of tabs and their corresponding fragments, the same thing would apply for TagSwipe
Alright, 15 commits later, done! This one was pretty complex to implement. I think I've caught all the bugs, but this is a place with a high potential of UI bugs. It took a lot of logic to get us there. Please reopen if you run into any problems.
Need skip logic for tags.
For example: Building=Commercial then ask for Name=* and amenity= Building=Residential then do not ask for Name=* or amenity=