mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-16 07:10:29 +05:30
31 lines
1.0 KiB
Kotlin
31 lines
1.0 KiB
Kotlin
|
package com.github.libretube
|
||
|
|
||
|
import android.content.Intent
|
||
|
import android.os.Bundle
|
||
|
import androidx.appcompat.app.AppCompatActivity
|
||
|
import com.github.libretube.databinding.ActivityNointernetBinding
|
||
|
import com.github.libretube.util.ThemeHelper
|
||
|
import com.google.android.material.color.DynamicColors
|
||
|
|
||
|
class NoInternetActivity : AppCompatActivity() {
|
||
|
private lateinit var binding: ActivityNointernetBinding
|
||
|
|
||
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||
|
DynamicColors.applyToActivityIfAvailable(this)
|
||
|
super.onCreate(savedInstanceState)
|
||
|
binding = ActivityNointernetBinding.inflate(layoutInflater)
|
||
|
binding.retryButton.setOnClickListener {
|
||
|
ThemeHelper.restartMainActivity(this)
|
||
|
}
|
||
|
binding.noInternetSettingsImageView.setOnClickListener {
|
||
|
val intent = Intent(this, SettingsActivity::class.java)
|
||
|
startActivity(intent)
|
||
|
}
|
||
|
setContentView(binding.root)
|
||
|
}
|
||
|
|
||
|
override fun onBackPressed() {
|
||
|
finishAffinity()
|
||
|
super.onBackPressed()
|
||
|
}
|
||
|
}
|