Peter, thanks a bunch. Here's code snippet:
// d is a dialog
Spinner spin = (Spinner) d.findViewById(R.id.searchCriteria);
spin.setOnItemSelectedListener(new OnItemSelectedListener() {
  public void onItemSelected(AdapterView<?> parent, View view, int
position, long id) {
    // hide selection text
    ((TextView)view).setText(null);
    // if you want you can change background here
  }
  public void onNothingSelected(AdapterView<?> parent) {}
});


On Aug 4, 2:13 am, peter <[email protected]> wrote:
> set your Sipinner "onItemSelectedLisnter"
> and implement the inteface method :
> onItemClick(AdapterView<?> arg0, View arg1, int arg2,long arg3)
> the parameter of "arg1" is your selected view, and you could pick
> textview form it.
> then set the backgroud color as your like of textview
>
> On Aug 4, 1:10 pm, "droidin.net" <[email protected]> wrote:
>
> > I'm trying to use Spinner as a button with selection pop-up. Basically
> > I want an icon and when user clicks it - the popup list is displayed
> > and user can make a selection.
> > The Spinner happily accepts icon image as drawable background.
> > Unfortunately when I select a value the text overlays the background.
> > Is it possible to set selection text color as a transparent? Or maybe
> > there's a better way?
>
> > Thanks,
>
> > Bo
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to