-1

I have been trying to create dynamically pages but they lag too much. I tried doing like here: https://code.google.com/p/viewpagerexample/source/browse/trunk/AwesomePager/src/com/geekyouup/paug/awesomepager/AwesomePagerActivity.java

or here: dynamically add and remove view to viewpager

They both basically do same thing and they both get extremely laggy with my view.

Here is what I want to do, and what I get:

enter image description here enter image description here

Also I get "the application may be doing too much work on its main thread" warning. Is there any way I can make this optimized? And for reference, how is this kind of view called?

Community
  • 1
  • 1
Filip Luchianenco
  • 6,912
  • 9
  • 41
  • 63

1 Answers1

2

Also I get "the application may be doing too much work on its main thread" warning.

That would be why it is lagging.

Is there any way I can make this optimized?

You are welcome to enable StrictMode, and you are welcome to use tools like Traceview to determine where you are spending your time on the main application thread.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491