How do I set the maximum length for a spinner's drop-down list?
问题 I have a spinner which currently obscures some text below the spinner when opened. I need to limit the maximum drop-down length of the spinner, either through java code or through XML, so that it does not obscure this text. The current design is the left example while the desired design is on the right. How do I go about limiting how far the spinner drops down to when opened? At present, it drops down to fill the entire portion of screen below it. 回答1: One way to achieve this is to use