1

I'm playing around with Android spinners. I'm not 100% sure if I can get the behavior I want using a spinner, but it's the most obvious choice that comes to mind.

I need something of a dropdown view, the title of which says "x of y selected". The options in the dropdown would look like:
-All
-None
-Special items only

On clicking one of the dropdown items, the title is reconfigured such that 'x' changes.

It would be ideal to use a spinner, but somehow, it seems that android puts in the first value of the spinner to always be the first values in the list of strings you pass it, and I clearly don't want the title item to be shown in the dropdown list for my case.

Another approach that I came across was to perhaps use a button with a popup with these items in the popup.

Would that be a better approach, or can I actually achieve the behavior using a spinner, or is there another view that would better serve my purpose?

nitrobuster
  • 321
  • 3
  • 18

1 Answers1

0

I'm going to redirect to this post, after a lot of searching I found what I was looking for:

How to hide one item in an Android Spinner

The answer by Aebsubis, and make sure to set the text view height to 0. I'll update this answer with more code, once I'm done with tweaking it for my purposes.

Community
  • 1
  • 1
nitrobuster
  • 321
  • 3
  • 18