mirror of
https://github.com/jrpie/Launcher.git
synced 2025-04-19 10:20:51 +02:00
Add Information and Links
This commit is contained in:
parent
5a2ff95c15
commit
6cb06b3095
2 changed files with 61 additions and 8 deletions
|
@ -6,7 +6,9 @@ import android.content.Intent
|
|||
import android.content.SharedPreferences
|
||||
import android.content.pm.PackageManager
|
||||
import android.content.pm.ResolveInfo
|
||||
import android.net.Uri
|
||||
import android.os.Bundle
|
||||
import android.text.Html
|
||||
import android.util.DisplayMetrics
|
||||
import android.view.KeyEvent
|
||||
import android.view.MotionEvent
|
||||
|
@ -17,6 +19,7 @@ import android.widget.Toast
|
|||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.core.view.MotionEventCompat
|
||||
import kotlinx.android.synthetic.main.activity_main.*
|
||||
import kotlinx.android.synthetic.main.activity_settings.*
|
||||
import kotlin.math.abs
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.*
|
||||
|
@ -66,6 +69,23 @@ class SettingsActivity : AppCompatActivity() {
|
|||
startActivityForResult(intent, 5000)
|
||||
}
|
||||
|
||||
fun openNewTabWindow(urls: String, context : Context) {
|
||||
val uris = Uri.parse(urls)
|
||||
val intents = Intent(Intent.ACTION_VIEW, uris)
|
||||
val b = Bundle()
|
||||
b.putBoolean("new_window", true)
|
||||
intents.putExtras(b)
|
||||
context.startActivity(intents)
|
||||
}
|
||||
|
||||
fun openFinnWebsite(view: View) {
|
||||
openNewTabWindow("https://www.finnmglas.com/", this)
|
||||
}
|
||||
|
||||
fun openGithubRepo(view: View) {
|
||||
openNewTabWindow("https://github.com/finnmglas/Launcher", this)
|
||||
}
|
||||
|
||||
@SuppressLint("SetTextI18n") // I do not care
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue