title: Android: generate views dynamically from database
body: <p>My goal is to collect health and family related data through interview some patients. So I'll provide every information about every view or question in database. like view type (radio button,edit text ,spinner...), data type (text or number), data length, whether it has any media (image, audio, video) regarding this question. Questions might have a dependency (visibility or value) on other question. I have tried so far and what I got that for small number of questions its okay. But when its about 100 or 150 or more questions, performance is not good. Since I am running lots of sql query and refreshing view manually. I mean on event (onSelect, onChange, onChecked.....) I am saving data to db, changing other question's visibility, value. So far lots of requirement have been added to my app. Can you suggest me about coding structure , library so that I can improve the performance? What are the things that should be used in this app? I have attached some pictures so that you can get a idea.
  View Demo <a href="https://i.stack.imgur.com/ZCGuz.png" rel="nofollow noreferrer">https://i.stack.imgur.com/ZCGuz.png</a></p>
  
  <p>Dependency <a href="https://i.stack.imgur.com/j2nzj.png" rel="nofollow noreferrer">https://i.stack.imgur.com/j2nzj.png</a></p>
  
  <p>Required field validation <a href="https://i.stack.imgur.com/tFuOH.png" rel="nofollow noreferrer">https://i.stack.imgur.com/tFuOH.png</a></p>