2
\$\begingroup\$

I'm creating some tutorial text that the user should be able to scroll.

Is there any way to make vertical scroll in AndEngine so that we can easily view all the content by scrolling up and down?

\$\endgroup\$
  • \$\begingroup\$ Unrelated to scroll bars, but it might be a good idea to try to be more brief in your tutorials. If the user is on the fence with your game, seeing a wall of text could put them on the wrong side. \$\endgroup\$ – MichaelHouse Sep 17 '14 at 14:19
  • \$\begingroup\$ Actually i wanted to keep longer text so it may not fit in the scene so i want to show scrollbar so user can easily view the text by scrolling down. \$\endgroup\$ – Sudeep Acharya Sep 17 '14 at 14:31
2
\$\begingroup\$

There is no built in functionality in AndEngine to create a scrollable text. You can render the text and make it scrollable yourself. But in your case it will be better if you utilize Android SDK and add a new "text layer" to your layout.

Basically you want to design the layout in a way where the AndEngine RenderSurfaceView will be rendered under another view (let's call it text view). You can then show or hide this text view as you please and use it to render text. You can use any kind of Android SDK GUI Elements there, including scrollable text.

See for example this tutorial.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.