add licences

This commit is contained in:
tibbi
2016-06-02 17:08:43 +02:00
parent be9c365268
commit e493c51857
6 changed files with 108 additions and 4 deletions

View File

@@ -0,0 +1,33 @@
package com.simplemobiletools.notes;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import butterknife.ButterKnife;
import butterknife.OnClick;
public class LicenseActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_license);
ButterKnife.bind(this);
}
@OnClick(R.id.license_butterknife_title)
public void butterKnifeClicked() {
openUrl(getResources().getString(R.string.butterknife_url));
}
@OnClick(R.id.license_ambilwarna_title)
public void ambilwarnaClicked() {
openUrl(getResources().getString(R.string.ambilwarna_url));
}
private void openUrl(String url) {
final Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
startActivity(browserIntent);
}
}