diff --git a/app/src/main/java/it/reyboz/bustorino/ActivityAbout.java b/app/src/main/java/it/reyboz/bustorino/ActivityAbout.java
deleted file mode 100644
--- a/app/src/main/java/it/reyboz/bustorino/ActivityAbout.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- BusTO - Arrival times for Turin public transports.
- Copyright (C) 2014 Valerio Bozzolan
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see .
- */
-package it.reyboz.bustorino;
-
-import android.content.Intent;
-import android.net.Uri;
-import android.util.Log;
-import androidx.appcompat.widget.Toolbar;
-import androidx.appcompat.app.AppCompatActivity;
-import android.text.Html;
-import android.text.Spanned;
-import android.text.method.LinkMovementMethod;
-import android.os.Bundle;
-import android.view.MenuItem;
-import android.view.View;
-import android.widget.Button;
-import android.widget.TextView;
-import android.widget.Toast;
-
-import it.reyboz.bustorino.backend.utils;
-import it.reyboz.bustorino.middleware.BarcodeScanUtils;
-
-public class ActivityAbout extends AppCompatActivity {
-
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.activity_about);
- Spanned htmlText = utils.convertHtml(getResources().getString(
- R.string.about_history));
- TextView aboutTextView = findViewById(R.id.aboutTextView);
- assert aboutTextView != null;
- aboutTextView.setText(htmlText);
- aboutTextView.setMovementMethod(LinkMovementMethod.getInstance());
-
- Toolbar mToolbar = findViewById(R.id.default_toolbar);
- setSupportActionBar(mToolbar);
- if (getSupportActionBar()!=null)
- getSupportActionBar().setDisplayHomeAsUpEnabled(true);
-
- TextView versionText = findViewById(R.id.versionTextView);
- Log.d("BusTO About", "The version text view is: "+versionText);
- versionText.setText(getResources().getText(R.string.app_version)+": "+BuildConfig.VERSION_NAME);
-
- Button openTelegramButton = findViewById(R.id.openTelegramButton);
- openTelegramButton.setOnClickListener(view -> {
-
- Intent trueIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("tg://resolve?domain=busto_fdroid"));
- if(BarcodeScanUtils.checkTargetPackageExists(this, trueIntent))
- startActivity(trueIntent);
- else{
- Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://t.me/busto_fdroid"));
- startActivity(intent);
- // Toast.makeText(this, "Install Telegram and retry", Toast.LENGTH_SHORT).show();
- }
-
- });
- }
-
- @Override
- public boolean onOptionsItemSelected(MenuItem item) {
- // Respond to the action bar's Up/Home button
- if (item.getItemId() == android.R.id.home) {//NavUtils.navigateUpFromSameTask(this);
- onBackPressed();
- return true;
- }
- return super.onOptionsItemSelected(item);
- }
-}
diff --git a/app/src/main/java/it/reyboz/bustorino/ActivityAbout.kt b/app/src/main/java/it/reyboz/bustorino/ActivityAbout.kt
new file mode 100644
--- /dev/null
+++ b/app/src/main/java/it/reyboz/bustorino/ActivityAbout.kt
@@ -0,0 +1,93 @@
+/*
+ BusTO - Arrival times for Turin public transports.
+ Copyright (C) 2014 Valerio Bozzolan
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+ */
+package it.reyboz.bustorino
+
+import android.content.Intent
+import android.net.Uri
+import android.os.Bundle
+import android.text.method.LinkMovementMethod
+import android.util.Log
+import android.view.MenuItem
+import android.view.View
+import android.widget.Button
+import android.widget.TextView
+import androidx.appcompat.app.AppCompatActivity
+import it.reyboz.bustorino.backend.utils
+import it.reyboz.bustorino.middleware.BarcodeScanUtils
+
+class ActivityAbout : AppCompatActivity() {
+ override fun onCreate(savedInstanceState: Bundle?) {
+ super.onCreate(savedInstanceState)
+ setContentView(R.layout.activity_about)
+ val htmlText = utils.convertHtml(
+ resources.getString(
+ R.string.about_history
+ )
+ )
+ val aboutTextView = checkNotNull(findViewById(R.id.aboutTextView))
+ aboutTextView.text = htmlText
+ aboutTextView.movementMethod = LinkMovementMethod.getInstance()
+
+ /*Toolbar mToolbar = findViewById(R.id.default_toolbar);
+ setSupportActionBar(mToolbar);
+
+ */
+ if (supportActionBar != null) supportActionBar!!.setDisplayHomeAsUpEnabled(true)
+
+ val versionText = findViewById(R.id.versionTextView)
+ Log.d("BusTO About", "The version text view is: $versionText")
+ versionText.text = resources.getText(R.string.app_version).toString() + ": " + BuildConfig.VERSION_NAME
+
+ val openTelegramButton = findViewById
Licenze
-
L\'app e il relativo codice sorgente sono distribuiti sotto la licenza GNU General Public License v3+.
- Ciò significa che puoi usare, studiare, migliorare e ricondividere quest\'app con qualunque mezzo e per qualsiasi scopo: a patto di mantenere sempre questi diritti a tua volta e di dare credito a Valerio Bozzolan.
+
L\'app e il relativo codice sorgente sono distribuiti sotto la licenza GNU General Public License v3 (https://www.gnu.org/licenses/gpl-3.0.html).
+ Ciò significa che puoi usare, studiare, migliorare e ricondividere quest\'app con qualunque mezzo e per qualsiasi scopo: a patto di mantenere sempre questi diritti a tua volta e di dare credito a Valerio Bozzolan e agli altri autori del codice dell\'app.