json2view | Update native Android UI on the fly | Android library
kandi X-RAY | json2view Summary
kandi X-RAY | json2view Summary
Update native Android UI on the fly
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Initializes the sample
- Create the view
- Apply dynamic properties
- Apply dynamic properties for layout
- Convert value to boolean
- Convert dimension to pixel value
json2view Key Features
json2view Examples and Code Snippets
Community Discussions
Trending Discussions on json2view
QUESTION
We are currently working on project where a web user creates a survey which has cascading questions (cascading means questions that have few answers and depend on those answers rest of the questions changes) and then mobile users should get this survey in their android app. Sample JSON
structure we thought is as follows:
ANSWER
Answered 2018-Apr-30 at 03:24This may be too late, but here goes. This can be done in proteus
.
Philosophy: How would you do it in Native Android?
By creating a custom view, let call it SurveyView
which has 3 custom attributes
status
: initial conditioncascade
: the check conditionsurvey
: array of childSurveyView
So, in Native Android, there would be a method setStatus()
which will be called when an answer is selected. This will set the status
of the child survey views. The child will check the new status
against the condition set on them. If it matches, it is visible
else gone
.
After this simply register this as a custom view with proteus. There is a slightly more complicated way of doing this without a custom view (by using function bindings in like so.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install json2view
You can use json2view like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the json2view component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page