Skip to content
This repository has been archived by the owner on Jan 28, 2024. It is now read-only.

Commit

Permalink
Extract hard-coded strings into resources
Browse files Browse the repository at this point in the history
Signed-off-by: gstraube <[email protected]>
  • Loading branch information
gstraube committed Jan 8, 2018
1 parent 52081c9 commit 7e25e4b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/src/main/java/com/github/cythara/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public boolean onOptionsItemSelected(MenuItem item) {
int checkedItem = useStandardNotation ? 0 : 1;

AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setTitle("Choose notation");
builder.setTitle(R.string.choose_notation);
builder.setSingleChoiceItems(R.array.notations, checkedItem,
new DialogInterface.OnClickListener() {
@Override
Expand Down Expand Up @@ -134,7 +134,7 @@ public void onRequestPermissionsResult(int requestCode, @NonNull String permissi
startRecording();
} else {
AlertDialog alertDialog = new AlertDialog.Builder(MainActivity.this).create();
alertDialog.setTitle("Permission required");
alertDialog.setTitle(R.string.permission_required);
alertDialog.setMessage("Microphone permission is required. App will be closed");
alertDialog.setButton(AlertDialog.BUTTON_NEUTRAL, "OK",
new DialogInterface.OnClickListener() {
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
<string name="app_name">Cythara</string>
<string name="privacy_policy">Show privacy policy</string>
<string name="set_notation">Set notation</string>
<string name="choose_notation">Choose notation</string>
<string name="permission_required">Permission required</string>
<string-array name="tunings">
<item>Guitar (standard)</item>
<item>Guitar (Drop D)</item>
Expand Down

0 comments on commit 7e25e4b

Please sign in to comment.