summaryrefslogtreecommitdiff
path: root/app/src/main
diff options
context:
space:
mode:
authorTom Hennen <TomHennen@users.noreply.github.com>2015-08-29 08:20:20 -0400
committerTom Hennen <TomHennen@users.noreply.github.com>2015-08-29 08:20:20 -0400
commit0d212e1c0e6bf9c190920e33f48235a6bef14005 (patch)
tree67b76800335a748d7f23808be54b20d86c2ee749 /app/src/main
parent40842e66cb95d87b217eead073774c9439e94c91 (diff)
parent30d06f62d928304bc81b1040e2e39760edea8904 (diff)
downloadAntennaPod-0d212e1c0e6bf9c190920e33f48235a6bef14005.zip
Merge pull request #1142 from mfietz/issue/1139-option-label
Localize option label
Diffstat (limited to 'app/src/main')
-rw-r--r--app/src/main/java/de/danoeh/antennapod/activity/OpmlImportFromPathActivity.java27
1 files changed, 8 insertions, 19 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/activity/OpmlImportFromPathActivity.java b/app/src/main/java/de/danoeh/antennapod/activity/OpmlImportFromPathActivity.java
index 2ec987d1a..6e3991739 100644
--- a/app/src/main/java/de/danoeh/antennapod/activity/OpmlImportFromPathActivity.java
+++ b/app/src/main/java/de/danoeh/antennapod/activity/OpmlImportFromPathActivity.java
@@ -8,7 +8,6 @@ import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
-import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;
@@ -51,23 +50,13 @@ public class OpmlImportFromPathActivity extends OpmlImportBaseActivity {
final TextView txtvHeaderExplanation3 = (TextView) findViewById(R.id.txtvHeadingExplanation3);
Button butChooseFilesystem = (Button) findViewById(R.id.butChooseFileFromFilesystem);
- butChooseFilesystem.setOnClickListener(new OnClickListener() {
- @Override
- public void onClick(View v) {
- chooseFileFromFilesystem();
- }
-
- });
+ butChooseFilesystem.setOnClickListener(v -> chooseFileFromFilesystem());
Button butChooseExternal = (Button) findViewById(R.id.butChooseFileFromExternal);
- butChooseExternal.setOnClickListener(new OnClickListener() {
- @Override
- public void onClick(View v) {
- chooseFileFromExternal();
- }
- });
-
- int nextOption = 1;
+ butChooseExternal.setOnClickListener(v -> chooseFileFromExternal());
+
+ int nextOption = 1;
+ String optionLabel = getString(R.string.opml_import_option);
intentPickAction = new Intent(Intent.ACTION_PICK);
intentPickAction.setData(Uri.parse("file://"));
@@ -81,7 +70,7 @@ public class OpmlImportFromPathActivity extends OpmlImportBaseActivity {
}
}
if(txtvExplanation1.getVisibility() == View.VISIBLE) {
- txtvHeaderExplanation1.setText("Option " + nextOption);
+ txtvHeaderExplanation1.setText(String.format(optionLabel, nextOption));
nextOption++;
}
@@ -94,11 +83,11 @@ public class OpmlImportFromPathActivity extends OpmlImportBaseActivity {
findViewById(R.id.divider2).setVisibility(View.GONE);
butChooseExternal.setVisibility(View.GONE);
} else {
- txtvHeaderExplanation2.setText("Option " + nextOption);
+ txtvHeaderExplanation2.setText(String.format(optionLabel, nextOption));
nextOption++;
}
- txtvHeaderExplanation3.setText("Option " + nextOption);
+ txtvHeaderExplanation3.setText(String.format(optionLabel, nextOption));
}
@Override