From ed960d751c837747bf6e4b6a0728da72d3947dc5 Mon Sep 17 00:00:00 2001 From: Saul Henriquez Date: Tue, 8 Jun 2021 21:03:17 -0600 Subject: [PATCH] prepare for v0.8 release --- .../handlers/LauncherGestureHandlers.kt | 23 +++++++----- .../saggitt/omega/views/CenterFloatingView.kt | 37 +++++++++++++------ assets/changelog.htm | 14 +++++-- build.gradle | 2 +- 4 files changed, 50 insertions(+), 26 deletions(-) diff --git a/Omega/src/com/saggitt/omega/gestures/handlers/LauncherGestureHandlers.kt b/Omega/src/com/saggitt/omega/gestures/handlers/LauncherGestureHandlers.kt index f003e80a17..8c58baa8f8 100644 --- a/Omega/src/com/saggitt/omega/gestures/handlers/LauncherGestureHandlers.kt +++ b/Omega/src/com/saggitt/omega/gestures/handlers/LauncherGestureHandlers.kt @@ -100,6 +100,19 @@ class OpenWidgetsGestureHandler(context: Context, config: JSONObject?) : } } +@Keep +class OpenDashGestureHandler(context: Context, config: JSONObject?) : + GestureHandler(context, config) { + + override val displayName = context.getString(R.string.action_open_dash) + + override val requiresForeground = true + + override fun onGestureTrigger(controller: GestureController, view: View?) { + DashBottomSheet.show(controller.launcher, false) + } +} + @Keep class StartGlobalSearchGestureHandler(context: Context, config: JSONObject?) : GestureHandler(context, config) { @@ -315,16 +328,6 @@ class OpenSettingsGestureHandler(context: Context, config: JSONObject?) : } } -@Keep -class OpenDashGestureHandler(context: Context, config: JSONObject?) : - GestureHandler(context, config) { - - override val displayName = context.getString(R.string.action_open_dash) - override fun onGestureTrigger(controller: GestureController, view: View?) { - DashBottomSheet.show(controller.launcher, true) - } -} - @Keep class OpenOverviewGestureHandler(context: Context, config: JSONObject?) : GestureHandler(context, config) { diff --git a/Omega/src/com/saggitt/omega/views/CenterFloatingView.kt b/Omega/src/com/saggitt/omega/views/CenterFloatingView.kt index b810a9f4b0..20cc8baada 100644 --- a/Omega/src/com/saggitt/omega/views/CenterFloatingView.kt +++ b/Omega/src/com/saggitt/omega/views/CenterFloatingView.kt @@ -25,20 +25,30 @@ import android.view.View import android.view.ViewGroup import com.android.launcher3.Insettable import com.android.launcher3.Launcher +import com.android.launcher3.R import com.android.launcher3.R.layout import com.android.launcher3.anim.Interpolators +import com.android.launcher3.util.SystemUiController +import com.android.launcher3.util.Themes import com.android.launcher3.views.AbstractSlideInView class CenterFloatingView @JvmOverloads constructor( context: Context?, attrs: AttributeSet?, defStyleAttr: Int = 0 -) : - AbstractSlideInView(context, attrs, defStyleAttr), Insettable { +) : AbstractSlideInView(context, attrs, defStyleAttr), Insettable { private val mInsets: Rect private val mColorScrim: ColorScrim + + init { + setWillNotDraw(false) + mColorScrim = ColorScrim.createExtractedColorScrim(this) + mInsets = Rect() + mContent = this + } + fun show(view: View?, animate: Boolean) { - (findViewById(com.android.launcher3.R.id.sheet_contents) as ViewGroup).addView(view) + (findViewById(R.id.sheet_contents) as ViewGroup).addView(view) mLauncher.dragLayer.addView(this) mIsOpen = false animateOpen(animate) @@ -60,11 +70,20 @@ class CenterFloatingView @JvmOverloads constructor( return type and TYPE_SETTINGS_SHEET != 0 } + private fun setupNavBarColor() { + val isSheetDark = Themes.getAttrBoolean(mLauncher, R.attr.isMainColorDark) + mLauncher.systemUiController.updateUiState( + SystemUiController.UI_STATE_WIDGET_BOTTOM_SHEET, + if (isSheetDark) SystemUiController.FLAG_DARK_NAV else SystemUiController.FLAG_LIGHT_NAV + ) + } + private fun animateOpen(animate: Boolean) { if (mIsOpen || mOpenCloseAnimator.isRunning) { return } mIsOpen = true + setupNavBarColor() mOpenCloseAnimator.setValues( PropertyValuesHolder.ofFloat(TRANSLATION_SHIFT, TRANSLATION_SHIFT_OPENED) ) @@ -72,7 +91,10 @@ class CenterFloatingView @JvmOverloads constructor( if (!animate) { mOpenCloseAnimator.duration = 0 } - mOpenCloseAnimator.start() + post { + mOpenCloseAnimator.start() + mContent.animate().alpha(1f).duration = 150 + } } override fun handleClose(animate: Boolean) { @@ -92,11 +114,4 @@ class CenterFloatingView @JvmOverloads constructor( ) as CenterFloatingView } } - - init { - setWillNotDraw(false) - mColorScrim = ColorScrim.createExtractedColorScrim(this) - mInsets = Rect() - mContent = this - } } \ No newline at end of file diff --git a/assets/changelog.htm b/assets/changelog.htm index 607d5ba6fd..2a831d0712 100644 --- a/assets/changelog.htm +++ b/assets/changelog.htm @@ -8,14 +8,20 @@
-

v0.8.0 (Build 160)

-

Release date: 05-15-2021

+

v0.8.0 (Build 168)

+

Release date: 06-08-2021

    -
  • Add: Keep Empty screen preference
  • Merge android-11.0.0_r31
  • Add: Color selector for tabs
  • +
  • Add: additional dash controls
  • Add: Dash Customization
  • -
  • Add: Support quickswitch
  • +
  • Add: Support QuickSwitch
  • +
  • Add: FiveSecs KLWP
  • +
  • Add: Searx provider
  • +
  • Add: Sleep assistant
  • +
  • Add: Vertical List Apps (Experimental)
  • +
  • Fix: Dock size on long screens
  • +
  • Fix: Crash when opening Google Assistant

Back to the top

diff --git a/build.gradle b/build.gradle index 067c60634d..9368c42cfc 100644 --- a/build.gradle +++ b/build.gradle @@ -46,7 +46,7 @@ android { compileSdkVersion 30 def name = "0.8.0" - def code = 167 + def code = 168 defaultConfig { minSdkVersion 26