Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Problem Searching the Array in a Spinner
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Mark Phillips  
View profile  
 More options Nov 19 2012, 9:49 am
From: Mark Phillips <m...@phillipsmarketing.biz>
Date: Mon, 19 Nov 2012 07:44:45 -0700
Local: Mon, Nov 19 2012 9:44 am
Subject: Re: [android-developers] Re: Problem Searching the Array in a Spinner

The screen with the temperature spinner is an edit screen which is filled
at run time with the data the user entered in a previous session. The data
will eventually come from a cursor/sqlite database, but for now as I work
on the ui, I am simulating the app with sample data using string arrays and
simple array adapters. I have some helper methods in a static class that
provided the data in the form of arrays to the app (ie as a  standin for
the db backend until the db is stable). I guess I can wait to solve this
problem when I get to the cursor/sqlite integration phase, and just change
my sample data to hold the index instead of the actual string value.

The heart of my question is if there is another way to search the
arrayadapter for formatted strings.

Thanks,

Mark

On Mon, Nov 19, 2012 at 2:08 AM, skink <psk...@gmail.com> wrote:

> Mark Phillips wrote:
> > Any suggestions on how to set the value of the spinner index by searching
> > the strings in the spinner array?

> why would you do that?

> why not simply:

> // set C deg
> s.setSelection(0)
> // set F deg
> s.setSelection(1)
> // set K deg
> s.setSelection(2)

> pskink

> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscribe@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.