0

I want to display an array of elements like a list inside a scrollView. It seems like people around here are not happy with putting ListViews inside ScrollViews, so I figured I might try and create my own list.

I have some entries (typically not more than 10 entries, entries are around a normal sentence in length) in an array that I want to iterate over, creating a TextView for each entry, so that each entry has it's own TextView. My concern is though that this may be bad practice, or that this kind of operation will simply slow down my application too much.

Am I being to concerned with performance here?

1
  • 1
    As long as the number of items and the item layout complexity stays low there shouldn't be a problem. Commented Jul 1, 2011 at 21:55

1 Answer 1

1

No you have not to be concerned.

ListView is written to display thousands of elements, by reusing widgets. It's fast to create 10 Widgets and the memory used is neglectable. If all elements fit on one screen your approach will be as fast as an ListView and the memory footprint will be the same.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.