diff --git a/app/src/main/java/it/reyboz/bustorino/ActivityAbout.kt b/app/src/main/java/it/reyboz/bustorino/ActivityAbout.kt index 4fd327c..51980a1 100644 --- a/app/src/main/java/it/reyboz/bustorino/ActivityAbout.kt +++ b/app/src/main/java/it/reyboz/bustorino/ActivityAbout.kt @@ -1,137 +1,141 @@ /* 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.view.ViewGroup.MarginLayoutParams import android.widget.Button import android.widget.TextView import androidx.appcompat.app.AppCompatActivity import androidx.appcompat.widget.Toolbar import androidx.core.view.OnApplyWindowInsetsListener import androidx.core.view.ViewCompat import androidx.core.view.WindowInsetsCompat import androidx.core.view.updatePadding 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) //TOP TEXT VIEW val topTextView = checkNotNull(findViewById(R.id.topTextView)) val telegramTextView= checkNotNull(findViewById(R.id.telegramTextView)) val howTextView = checkNotNull(findViewById(R.id.howDoesItWorkTextView)) val bottomTextView= checkNotNull(findViewById(R.id.bottomAboutTextView)) val textviews = arrayOf(topTextView, telegramTextView,howTextView,bottomTextView) val stringsForTextViews = arrayOf(R.string.about_history_top, R.string.about_channel, R.string.about_how, R.string.about_history_bottom) for (i in 0 until 4) { val htmlText = utils.convertHtml( resources.getString( stringsForTextViews[i] ) ) //val aboutTextView = checkNotNull(findViewById(R.id.aboutTextView)) val textView = textviews[i] textView.text = htmlText textView.movementMethod = LinkMovementMethod.getInstance() } /*Toolbar mToolbar = findViewById(R.id.default_toolbar); setSupportActionBar(mToolbar); */ val mToolbar = findViewById(R.id.default_toolbar) setSupportActionBar(mToolbar) if (supportActionBar != null) supportActionBar!!.setDisplayHomeAsUpEnabled(true) val versionTextView = findViewById(R.id.versionTextView) Log.d("BusTO About", "The version text view is: $versionTextView") versionTextView.text = resources.getText(R.string.app_version).toString() + ": " + BuildConfig.VERSION_NAME val openTelegramButton = findViewById