0

I have a xml layout that contains almost 60 TextViews, 30 EditText, 60 CheckBoxes and some background xml shapes for form designing. Now my Activity is taking 2-3 seconds to load on lollipop with 2 GB RAM. So far I didn't have implemented anything in JAVA file.

Is there any way to load it faster? Or any mechanism that will cache the form etc? Need your suggestions, What would be the best way to load it faster?

kamranbhatti585
  • 232
  • 2
  • 16

1 Answers1

0

Let's say that you have json file that based your application form

[ { "type":"text", "name":"name" }, { "type":"checkBox", "name":"Men" }, { "type":"checkBox", "name":"Women" }, { "type":"checkBox", "name":"Have Child?" } ]

You need to create adapter that support two ViewType read this blog post, it will help you to figure out https://medium.com/@ruut_j/a-recyclerview-with-multiple-item-types-bce7fbd1d30e

armanso
  • 144
  • 3
  • 9