mirror of
https://github.com/He4eT/yamf_launcher.git
synced 2026-05-05 01:47:24 +00:00
Unfinished back button behaviour implemented
This commit is contained in:
parent
1f0a91e2df
commit
5f9a1d93be
1 changed files with 9 additions and 0 deletions
|
|
@ -16,6 +16,7 @@ import android.widget.EditText
|
|||
import android.widget.LinearLayout
|
||||
import android.widget.TextView
|
||||
import android.widget.Toast
|
||||
import androidx.activity.OnBackPressedCallback
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.core.content.res.ResourcesCompat
|
||||
import androidx.core.view.children
|
||||
|
|
@ -112,6 +113,14 @@ class MainActivity : AppCompatActivity(), AppMenuAdapter.OnItemClickListener, Ap
|
|||
searchView = findViewById(R.id.searchView)
|
||||
setupSearch()
|
||||
}
|
||||
|
||||
onBackPressedDispatcher.addCallback(this, object : OnBackPressedCallback(true) {
|
||||
override fun handleOnBackPressed() {
|
||||
binding.appView.visibility = View.GONE
|
||||
binding.homeView.visibility = View.VISIBLE
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
private fun setupSearch() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue