From 23d1639d44957d626b129b377747e430fb57b738 Mon Sep 17 00:00:00 2001 From: tibbi Date: Thu, 2 Jun 2016 20:24:54 +0200 Subject: [PATCH] small function change --- .../com/simplemobiletools/calendar/LicenseActivity.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/com/simplemobiletools/calendar/LicenseActivity.java b/app/src/main/java/com/simplemobiletools/calendar/LicenseActivity.java index 72ebaac01..43d05c4ff 100644 --- a/app/src/main/java/com/simplemobiletools/calendar/LicenseActivity.java +++ b/app/src/main/java/com/simplemobiletools/calendar/LicenseActivity.java @@ -18,20 +18,21 @@ public class LicenseActivity extends AppCompatActivity { @OnClick(R.id.license_butterknife_title) public void butterKnifeClicked() { - openUrl(getResources().getString(R.string.butterknife_url)); + openUrl(R.string.butterknife_url); } @OnClick(R.id.license_ambilwarna_title) public void ambilwarnaClicked() { - openUrl(getResources().getString(R.string.ambilwarna_url)); + openUrl(R.string.ambilwarna_url); } @OnClick(R.id.license_joda_title) public void jodaClicked() { - openUrl(getResources().getString(R.string.joda_url)); + openUrl(R.string.joda_url); } - private void openUrl(String url) { + private void openUrl(int id) { + final String url = getResources().getString(id); final Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url)); startActivity(browserIntent); }