From 8f1a09b7f6c37c82038a9c1a60cc84b110f1f136 Mon Sep 17 00:00:00 2001 From: tibbi Date: Thu, 2 Jun 2016 20:22:53 +0200 Subject: [PATCH] small function edit --- .../java/com/simplemobiletools/notes/LicenseActivity.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/com/simplemobiletools/notes/LicenseActivity.java b/app/src/main/java/com/simplemobiletools/notes/LicenseActivity.java index 7ad64adb..d2a4274a 100644 --- a/app/src/main/java/com/simplemobiletools/notes/LicenseActivity.java +++ b/app/src/main/java/com/simplemobiletools/notes/LicenseActivity.java @@ -18,15 +18,16 @@ 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); } - 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); }