draw the all apps fragment behind the status bar too

This commit is contained in:
tibbi
2022-08-15 23:15:15 +02:00
parent 5ef9c643c9
commit cb4fea8b1d
4 changed files with 14 additions and 5 deletions

View File

@ -7,11 +7,9 @@ import android.os.Bundle
import android.view.GestureDetector
import android.view.MotionEvent
import android.view.animation.DecelerateInterpolator
import android.widget.FrameLayout
import androidx.core.view.GestureDetectorCompat
import com.simplemobiletools.commons.extensions.appLaunched
import com.simplemobiletools.commons.extensions.realScreenSize
import com.simplemobiletools.commons.extensions.statusBarHeight
import com.simplemobiletools.launcher.BuildConfig
import com.simplemobiletools.launcher.R
import com.simplemobiletools.launcher.fragments.AllAppsFragment
@ -43,7 +41,6 @@ class MainActivity : SimpleActivity(), FlingListener {
override fun onResume() {
super.onResume()
(main_holder.layoutParams as FrameLayout.LayoutParams).topMargin = statusBarHeight
updateStatusbarColor(Color.TRANSPARENT)
(all_apps_fragment as AllAppsFragment).setupViews()
}

View File

@ -31,7 +31,8 @@ class AllAppsFragment(context: Context, attributeSet: AttributeSet) : RelativeLa
fun setupFragment(activity: MainActivity) {
this.activity = activity
getLaunchers()
setBackgroundColor(activity.getProperBackgroundColor())
background.applyColorFilter(activity.getProperBackgroundColor())
setPadding(0, activity.statusBarHeight, 0, 0)
all_apps_grid.setOnTouchListener { v, event ->
if (event.actionMasked == MotionEvent.ACTION_UP || event.actionMasked == MotionEvent.ACTION_CANCEL) {