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 <[email protected]> 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 <[email protected]> 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 [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

