Skip to content

Commit

Permalink
update maybe works yes it maybe works :D
Browse files Browse the repository at this point in the history
  • Loading branch information
DeluxPanda authored and DeluxPanda committed Jan 25, 2024
1 parent 8bfad0a commit bb137ad
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
20 changes: 10 additions & 10 deletions app/src/main/java/se/deluxerpanda/smssender/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -148,19 +148,18 @@ protected void onCreate(Bundle savedInstanceState) {
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setTitle(getResources().getString(R.string.sms_repeates_titel));
builder.setMessage(getResources().getString(R.string.sms_repeates_Text));
builder.setPositiveButton("OK!", new DialogInterface.OnClickListener() {
builder.setPositiveButton(getResources().getString(R.string.text_ok), new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
}
});
builder.show();
}

} else {
// Inside your activity or fragment
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setTitle("\uD83D\uDEA8 You cannot go back in time \uD83D\uDEA8");
builder.setMessage("This time has passed. Choose different time");
builder.setPositiveButton("OK", new DialogInterface.OnClickListener() {
builder.setTitle(getResources().getString(R.string.sms_time_travel_titel));
builder.setMessage(getResources().getString(R.string.sms_time_travel_Text));
builder.setPositiveButton(getResources().getString(R.string.text_ok), new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
}
});
Expand All @@ -169,9 +168,10 @@ public void onClick(DialogInterface dialog, int which) {
} else {
// Inside your activity or fragment
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setTitle("\uD83D\uDEA8 Max characters reached \uD83D\uDEA8");
builder.setMessage("The maximum character limit is 160"+ "\n not "+message.length());
builder.setPositiveButton("OK", new DialogInterface.OnClickListener() {
builder.setTitle(getResources().getString(R.string.sms_Max_characters_titel));
builder.setMessage(getResources().getString(R.string.sms_Max_characters_Text)+ "\n"+
getResources().getString(R.string.sms_Max_characters_Text_int)+" "+message.length());
builder.setPositiveButton(getResources().getString(R.string.text_ok), new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
}
});
Expand All @@ -183,7 +183,7 @@ public void onClick(DialogInterface dialog, int which) {
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setTitle("\uD83D\uDEA8 Number and message are required \uD83D\uDEA8");
builder.setMessage("Please provide both phone number and message.");
builder.setPositiveButton("OK", new DialogInterface.OnClickListener() {
builder.setPositiveButton(getResources().getString(R.string.text_ok), new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
}
});
Expand All @@ -194,7 +194,7 @@ public void onClick(DialogInterface dialog, int which) {
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setTitle("\uD83D\uDEA8 The app don't have permission \uD83D\uDEA8");
builder.setMessage("You must allow the app to send SMS");
builder.setPositiveButton("OK", new DialogInterface.OnClickListener() {
builder.setPositiveButton(getResources().getString(R.string.text_ok), new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
requestPermission();
}
Expand Down
5 changes: 5 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@
<string name="message_sent">sent to:</string>
<string name="sms_repeates_titel">🚨 how often should the message repeates 🚨</string>
<string name="sms_repeates_Text">You must choose how often the message should be repeated</string>
<string name="sms_time_travel_titel">🚨 You cannot go back in time 🚨</string>
<string name="sms_time_travel_Text">This time has passed. Choose different time</string>
<string name="sms_Max_characters_titel">🚨 Max characters reached 🚨</string>
<string name="sms_Max_characters_Text">The maximum character limit is 160</string>
<string name="sms_Max_characters_Text_int">not</string>
<string name="text_ok">Ok</string>
<string name="text_Cancel">Cancel</string>
</resources>

0 comments on commit bb137ad

Please sign in to comment.