small function change
This commit is contained in:
parent
99e7655e27
commit
765cac5fe1
|
@ -18,15 +18,16 @@ public class LicenseActivity extends AppCompatActivity {
|
||||||
|
|
||||||
@OnClick(R.id.license_butterknife_title)
|
@OnClick(R.id.license_butterknife_title)
|
||||||
public void butterKnifeClicked() {
|
public void butterKnifeClicked() {
|
||||||
openUrl(getResources().getString(R.string.butterknife_url));
|
openUrl(R.string.butterknife_url);
|
||||||
}
|
}
|
||||||
|
|
||||||
@OnClick(R.id.license_ambilwarna_title)
|
@OnClick(R.id.license_ambilwarna_title)
|
||||||
public void ambilwarnaClicked() {
|
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));
|
final Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
|
||||||
startActivity(browserIntent);
|
startActivity(browserIntent);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue