d1597ff2eeb78ce566d35e5b5442605a8baaaabf
[JavaForFun] /
1 package name.gumartinm.weather.information.activity;
2
3 import android.app.ActionBar;
4 import android.app.Activity;
5 import android.content.ComponentName;
6 import android.content.Intent;
7 import android.net.Uri;
8 import android.os.Bundle;
9 import android.view.View;
10
11 import name.gumartinm.weather.information.R;
12
13 public class AboutActivity extends Activity {
14
15     @Override
16     protected void onCreate(Bundle savedInstanceState) {
17         super.onCreate(savedInstanceState);
18         setContentView(R.layout.weather_about);
19     }
20
21     @Override
22     public void onResume() {
23         super.onResume();
24
25         final ActionBar actionBar = this.getActionBar();
26         actionBar.setTitle(this.getString(R.string.weather_about_action));
27     }
28
29     public void onClickLegalInformation(final View view) {
30         final Intent intent = new Intent("name.gumartinm.weather.information.WEATHERINFO")
31                 .setComponent(new ComponentName("name.gumartinm.weather.information",
32                         "name.gumartinm.weather.information.activity.LicensesActivity"));
33         this.startActivity(intent);
34     }
35
36     public void onClickSourceCode(final View view) {
37         final String url = this.getString(R.string.application_source_code_url);
38         startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(url)));
39     }
40
41     public void onClickRemoteData(final View view) {
42         final String url = this.getString(R.string.openweahtermap_url);
43         startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(url)));
44     }
45
46     public void onClickMyWeb(final View view) {
47         final String url = this.getString(R.string.my_url);
48         startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(url)));
49     }
50 }