17 package eu.intermodalics.tango_ros_streamer.activities;
19 import android.content.Intent;
20 import android.content.pm.PackageInfo;
21 import android.content.pm.PackageManager;
22 import android.net.Uri;
23 import android.os.Bundle;
24 import android.support.v7.app.AppCompatActivity;
25 import android.support.v7.widget.Toolbar;
26 import android.text.method.LinkMovementMethod;
27 import android.util.Log;
28 import android.view.View;
29 import android.widget.Button;
30 import android.widget.ImageButton;
31 import android.widget.TextView;
38 protected void onCreate(Bundle savedInstanceState) {
39 super.onCreate(savedInstanceState);
40 setContentView(R.layout.about_activity);
41 Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
42 setSupportActionBar(toolbar);
45 TextView textViewRosjava = (TextView) findViewById(R.id.text_rosjava_about);
46 textViewRosjava.setMovementMethod(LinkMovementMethod.getInstance());
48 TextView textViewVersion = (TextView) findViewById(R.id.text_version);
50 PackageInfo packageInfo = getPackageManager().getPackageInfo(getPackageName(), 0);
51 textViewVersion.setText(packageInfo.versionName);
52 }
catch (PackageManager.NameNotFoundException ex) {
53 Log.e(TAG, ex.getMessage());
56 Button onlineDocButton = (Button) findViewById(R.id.online_doc_about);
57 onlineDocButton.setOnClickListener(
new View.OnClickListener() {
59 public void onClick(View view) {
60 Uri uri = Uri.parse(getString(R.string.wiki_address));
61 Intent intent =
new Intent(Intent.ACTION_VIEW, uri);
62 startActivity(intent);
66 Button rateAppButton = (Button) findViewById(R.id.rate_app_about);
67 rateAppButton.setOnClickListener(
new View.OnClickListener() {
69 public void onClick(View view) {
74 Button githubButton = (Button) findViewById(R.id.source_code_about);
75 githubButton.setOnClickListener(
new View.OnClickListener() {
77 public void onClick(View view) {
78 Uri uri = Uri.parse(getString(R.string.github_address));
79 Intent intent =
new Intent(Intent.ACTION_VIEW, uri);
80 startActivity(intent);
84 ImageButton intermodalicsWebsiteButton = (ImageButton) findViewById(R.id.logo_intermodalics_about);
85 intermodalicsWebsiteButton.setOnClickListener(
new View.OnClickListener() {
87 public void onClick(View view) {
88 Uri uri = Uri.parse(getString(R.string.intermodalics_website_address));
89 Intent intent =
new Intent(Intent.ACTION_VIEW, uri);
90 startActivity(intent);
94 ImageButton ekumenWebsiteButton = (ImageButton) findViewById(R.id.logo_ekumen_about);
95 ekumenWebsiteButton.setOnClickListener(
new View.OnClickListener() {
97 public void onClick(View view) {
98 Uri uri = Uri.parse(getString(R.string.ekumen_website_address));
99 Intent intent =
new Intent(Intent.ACTION_VIEW, uri);
100 startActivity(intent);
104 ImageButton tangoWebsiteButton = (ImageButton) findViewById(R.id.logo_tango_about);
105 tangoWebsiteButton.setOnClickListener(
new View.OnClickListener() {
107 public void onClick(View view) {
108 Uri uri = Uri.parse(getString(R.string.tango_website_address));
109 Intent intent =
new Intent(Intent.ACTION_VIEW, uri);
110 startActivity(intent);
114 ImageButton rosWebsiteButton = (ImageButton) findViewById(R.id.logo_ros_about);
115 rosWebsiteButton.setOnClickListener(
new View.OnClickListener() {
117 public void onClick(View view) {
118 Uri uri = Uri.parse(getString(R.string.ros_website_address));
119 Intent intent =
new Intent(Intent.ACTION_VIEW, uri);
120 startActivity(intent);
126 Intent intent =
new Intent(Intent.ACTION_VIEW, Uri.parse(
"market://details?id=" +
this.getPackageName()));
127 this.startActivity(intent);
void startRateAppActivity()
void onCreate(Bundle savedInstanceState)