mirror of
https://github.com/SimpleMobileTools/Simple-Launcher.git
synced 2025-05-23 05:44:16 +02:00
draw the all apps fragment behind the status bar too
This commit is contained in:
parent
5ef9c643c9
commit
cb4fea8b1d
@ -7,11 +7,9 @@ import android.os.Bundle
|
|||||||
import android.view.GestureDetector
|
import android.view.GestureDetector
|
||||||
import android.view.MotionEvent
|
import android.view.MotionEvent
|
||||||
import android.view.animation.DecelerateInterpolator
|
import android.view.animation.DecelerateInterpolator
|
||||||
import android.widget.FrameLayout
|
|
||||||
import androidx.core.view.GestureDetectorCompat
|
import androidx.core.view.GestureDetectorCompat
|
||||||
import com.simplemobiletools.commons.extensions.appLaunched
|
import com.simplemobiletools.commons.extensions.appLaunched
|
||||||
import com.simplemobiletools.commons.extensions.realScreenSize
|
import com.simplemobiletools.commons.extensions.realScreenSize
|
||||||
import com.simplemobiletools.commons.extensions.statusBarHeight
|
|
||||||
import com.simplemobiletools.launcher.BuildConfig
|
import com.simplemobiletools.launcher.BuildConfig
|
||||||
import com.simplemobiletools.launcher.R
|
import com.simplemobiletools.launcher.R
|
||||||
import com.simplemobiletools.launcher.fragments.AllAppsFragment
|
import com.simplemobiletools.launcher.fragments.AllAppsFragment
|
||||||
@ -43,7 +41,6 @@ class MainActivity : SimpleActivity(), FlingListener {
|
|||||||
|
|
||||||
override fun onResume() {
|
override fun onResume() {
|
||||||
super.onResume()
|
super.onResume()
|
||||||
(main_holder.layoutParams as FrameLayout.LayoutParams).topMargin = statusBarHeight
|
|
||||||
updateStatusbarColor(Color.TRANSPARENT)
|
updateStatusbarColor(Color.TRANSPARENT)
|
||||||
(all_apps_fragment as AllAppsFragment).setupViews()
|
(all_apps_fragment as AllAppsFragment).setupViews()
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,8 @@ class AllAppsFragment(context: Context, attributeSet: AttributeSet) : RelativeLa
|
|||||||
fun setupFragment(activity: MainActivity) {
|
fun setupFragment(activity: MainActivity) {
|
||||||
this.activity = activity
|
this.activity = activity
|
||||||
getLaunchers()
|
getLaunchers()
|
||||||
setBackgroundColor(activity.getProperBackgroundColor())
|
background.applyColorFilter(activity.getProperBackgroundColor())
|
||||||
|
setPadding(0, activity.statusBarHeight, 0, 0)
|
||||||
|
|
||||||
all_apps_grid.setOnTouchListener { v, event ->
|
all_apps_grid.setOnTouchListener { v, event ->
|
||||||
if (event.actionMasked == MotionEvent.ACTION_UP || event.actionMasked == MotionEvent.ACTION_CANCEL) {
|
if (event.actionMasked == MotionEvent.ACTION_UP || event.actionMasked == MotionEvent.ACTION_CANCEL) {
|
||||||
|
10
app/src/main/res/drawable/all_apps_background.xml
Normal file
10
app/src/main/res/drawable/all_apps_background.xml
Normal 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>
|
@ -3,7 +3,8 @@
|
|||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:id="@+id/all_apps_holder"
|
android:id="@+id/all_apps_holder"
|
||||||
android:layout_width="match_parent"
|
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
|
<com.qtalk.recyclerviewfastscroller.RecyclerViewFastScroller
|
||||||
android:id="@+id/all_apps_fastscroller"
|
android:id="@+id/all_apps_fastscroller"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user