Use ressource instead of string

This commit is contained in:
Mathieu Maret 2011-10-30 01:57:40 +02:00
parent f83001f0ba
commit 4bd0390444
3 changed files with 8 additions and 4 deletions

View File

@ -29,4 +29,5 @@
<string name="message_sent">Message(s) envoyé(s)</string>
<string name="enter_number">Entrez un numero ou utilisez l\'icone de contact</string>
<string name="warning_many_message">Vous etes sur le point d\'envoyer plus de 50 messages d\'un coup. Comme cela peut produire une erreur android qui ferait planter l\'application, les messages vont etre envoyés par paquet de 50 avec une pause entre chaque paquet. Voulez vous continuer ?</string>
<string name="more_message">Prêt pour 50 messages de plus?</string>
</resources>

View File

@ -29,4 +29,5 @@
<string name="message_sent">Message(s) sent</string>
<string name="enter_number">Enter a phone number or use the contact icon</string>
<string name="warning_many_message">You are about to sent more than 50 Messages. As it may produce an Android error that may crash the application, they will be send by chunk of 50 with a pause between each chunk. Do you want to continue ?</string>
</resources>
<string name="more_message">Are you ready for 50 more messages?</string>
</resources>

View File

@ -41,7 +41,7 @@ public class MultiSmsSender extends Activity {
public static final int ACTIVITY_EDIT = 0;
public static final int ACTIVITY_ADD_GROUP = 1;
public static final int ACTIVITY_DELIVERY = 2;
private static final int SENDING_DIALOG_KEY = 0;
private static final int INSERT_ID = Menu.FIRST;
public static final int MANY_MESSAGE = 50;
@ -52,6 +52,7 @@ public class MultiSmsSender extends Activity {
private static final int DIALOG_MANYMESSAGE = 3;
private static final int DIALOG_STARTWAIT = 4;
private static final int DIALOG_PROGRESS_CANCEL = 5;
private static final int SENDING_DIALOG_KEY = 6;
public static final String PARAM_NUMBERS_LIST = "param number list";
public static final String PARAM_FLUSH = "param flush";
@ -111,8 +112,9 @@ public class MultiSmsSender extends Activity {
break;
}
case DIALOG_MANYMESSAGE:{
new AlertDialog.Builder(MultiSmsSender.this)
.setMessage("You are about to sent more than 50 Messages. As it may produce Android error that may crash the app, they will be send by chunk of 50 with a pause between each chunk")
.setMessage(getResources().getString(R.string.warning_many_message))
.setCancelable(false)
.setPositiveButton(getResources().getString(R.string.ok), new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
@ -148,7 +150,7 @@ public class MultiSmsSender extends Activity {
dialog.dismiss();
}
}).setMessage("You are ready to continue for 50 more messages?").show();
}).setMessage(getResources().getString(R.string.more_message)).show();
break;
}