mirror of
https://github.com/He4eT/yamf_launcher.git
synced 2026-05-05 01:47:24 +00:00
Fixed a major app menu duplication bug (upon changing to transparent bg from another after initial app launch)
This commit is contained in:
parent
71af6d7d49
commit
7f7a7f4286
2 changed files with 11 additions and 13 deletions
|
|
@ -28,8 +28,8 @@ class Animations () {
|
|||
}
|
||||
|
||||
fun showApps(binding: ActivityMainBinding) {
|
||||
binding.homeView.fadeOut()
|
||||
binding.appView.slideInFromBottom()
|
||||
binding.homeView.fadeOut()
|
||||
}
|
||||
|
||||
fun backgroundIn(activity: Activity, originalColor: Int, duration: Long = 100) {
|
||||
|
|
@ -95,7 +95,7 @@ class Animations () {
|
|||
.setDuration(duration)
|
||||
.setListener(object : AnimatorListenerAdapter() {
|
||||
override fun onAnimationEnd(animation: Animator) {
|
||||
visibility = View.INVISIBLE
|
||||
visibility = View.GONE
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
@ -122,7 +122,7 @@ class Animations () {
|
|||
.setDuration(duration)
|
||||
.setListener(object : AnimatorListenerAdapter() {
|
||||
override fun onAnimationEnd(animation: Animator) {
|
||||
visibility = View.INVISIBLE
|
||||
visibility = View.GONE
|
||||
}
|
||||
})}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -111,10 +111,8 @@ class MainActivity : AppCompatActivity(), SharedPreferences.OnSharedPreferenceCh
|
|||
|
||||
preferences.registerOnSharedPreferenceChangeListener(this)
|
||||
|
||||
window.setBackgroundDrawable(
|
||||
ColorDrawable(
|
||||
Color.parseColor(preferences.getString("bgColor", "#00000000"))
|
||||
)
|
||||
window.decorView.setBackgroundColor(
|
||||
Color.parseColor(preferences.getString("bgColor", "#00000000"))
|
||||
)
|
||||
|
||||
searchView = findViewById(R.id.searchView)
|
||||
|
|
@ -159,8 +157,8 @@ class MainActivity : AppCompatActivity(), SharedPreferences.OnSharedPreferenceCh
|
|||
}
|
||||
|
||||
binding.homeView.setOnTouchListener { _, event ->
|
||||
gestureDetector.onTouchEvent(event)
|
||||
super.onTouchEvent(event)
|
||||
gestureDetector.onTouchEvent(event)
|
||||
true // Return true if the touch event is handled
|
||||
}
|
||||
|
||||
|
|
@ -229,11 +227,10 @@ class MainActivity : AppCompatActivity(), SharedPreferences.OnSharedPreferenceCh
|
|||
}
|
||||
|
||||
"bgColor" -> {
|
||||
window.setBackgroundDrawable(
|
||||
ColorDrawable(
|
||||
window.setBackgroundDrawable(ColorDrawable(Color.parseColor("#00000000")))
|
||||
window.decorView.setBackgroundColor(
|
||||
Color.parseColor(preferences?.getString(key, "#00000000"))
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
"textColor" -> {
|
||||
|
|
@ -331,7 +328,8 @@ class MainActivity : AppCompatActivity(), SharedPreferences.OnSharedPreferenceCh
|
|||
@SuppressLint("NotifyDataSetChanged")
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
|
||||
binding.homeView.visibility = View.VISIBLE
|
||||
binding.appView.visibility = View.INVISIBLE
|
||||
adapter?.notifyDataSetChanged()
|
||||
}
|
||||
|
||||
|
|
@ -372,7 +370,7 @@ class MainActivity : AppCompatActivity(), SharedPreferences.OnSharedPreferenceCh
|
|||
startActivity(phoneIntent)
|
||||
}
|
||||
}
|
||||
return false
|
||||
return true
|
||||
}
|
||||
|
||||
override fun onLongPress(e: MotionEvent) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue