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) {

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@+id/bottom_sheet_background">
<shape android:shape="rectangle">
<corners
android:topLeftRadius="@dimen/material_button_corner_radius"
android:topRightRadius="@dimen/material_button_corner_radius" />
</shape>
</item>
</layer-list>

View File

@ -3,7 +3,8 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/all_apps_holder"
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="wrap_content"
android:background="@drawable/all_apps_background">
<com.qtalk.recyclerviewfastscroller.RecyclerViewFastScroller
android:id="@+id/all_apps_fastscroller"