They're defined like they're defined -- if they were changed then a
lot of applications would be "broken", whether changing them "makes
sense" or not.

The only reason for using them (vs your own values) is to save
yourself the trouble of translating your own "yes/no" values should
you decide to support another language.

On Oct 14, 11:53 am, xZise <javaxz...@googlemail.com> wrote:
> I know that, but why there are constants named with "yes" and "no" but
> containing "ok" and "cancel"? Is it common to answer a yes/no question
> with ok/cancel? I hate this bad habit, because they sound not logical.
>
> Sincerely
> xZise
>
> On Oct 13, 8:19 pm, DanH <danhi...@ieee.org> wrote:
>
> > Define your own application-local R.string values.  How to define
> > string resources is one of the first things you should learn about
> > Android development.
>
> > On Oct 12, 3:23 pm, xZise <javaxz...@googlemail.com> wrote:
>
> > > Hello, I want to display a simple dialog to ask if somebody has done
> > > something.
>
> > > public class YesNoTest extends Activity {
> > >     /** Called when the activity is first created. */
> > >     @Override
> > >     public void onCreate(Bundle savedInstanceState) {
> > >         super.onCreate(savedInstanceState);
> > >         setContentView(R.layout.main);
>
> > >         final AlertDialog.Builder b = new AlertDialog.Builder(this);
> > >                 b.setIcon(android.R.drawable.ic_dialog_alert);
> > >                 b.setTitle("Hello World");
> > >                 b.setMessage("Did you done your homework?");
> > >                 b.setPositiveButton(android.R.string.yes, null);
> > >                 b.setNegativeButton(android.R.string.no, null);
> > >                 b.show();
> > >     }
>
> > > }
>
> > > Normally I would answer "Yes" or "No", but the dialog only shows "OK"
> > > and "Cancel". Is it easily possible to change it to "Yes"/"No" with
> > > localization?
>
> > > Sincerely
> > > xZise

-- 
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+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to