Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/microsoft/fluentui-android
Browse files Browse the repository at this point in the history
… into releaseVersion_0.0.25
  • Loading branch information
mishramayank1 committed Jan 19, 2022
2 parents f07c971 + 9c6d3ad commit d89ba69
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 55 deletions.
4 changes: 2 additions & 2 deletions FluentUI.Demo/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ android {
applicationId 'com.microsoft.fluentuidemo'
minSdkVersion 21
targetSdkVersion 30
versionCode 24
versionName '0.0.24'
versionCode 25
versionName '0.0.25'
}
buildTypes {
release {
Expand Down
56 changes: 28 additions & 28 deletions config.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,34 +11,34 @@
* and fluentui_drawer' current version is 0.0.2, both fluentui_listitem and
* fluentui_drawer and FluentUI should increment their respective version ids
*/
project.ext.fluentui_calendar_versionid='0.0.13'
project.ext.fluentui_core_versionid='0.0.13'
project.ext.fluentui_listitem_versionid='0.0.13'
project.ext.fluentui_tablayout_versionid='0.0.13'
project.ext.fluentui_drawer_versionid='0.0.13'
project.ext.fluentui_ccb_versionid='0.0.13'
project.ext.fluentui_others_versionid='0.0.13'
project.ext.fluentui_transients_versionid='0.0.13'
project.ext.fluentui_topappbars_versionid='0.0.13'
project.ext.fluentui_menus_versionid='0.0.13'
project.ext.fluentui_peoplepicker_versionid='0.0.13'
project.ext.fluentui_persona_versionid='0.0.13'
project.ext.fluentui_progress_versionid='0.0.13'
project.ext.FluentUI_versionid='0.0.24'
project.ext.fluentui_calendar_version_code=13
project.ext.fluentui_core_version_code=13
project.ext.fluentui_listitem_version_code=13
project.ext.fluentui_tablayout_version_code=13
project.ext.fluentui_drawer_version_code=13
project.ext.fluentui_ccb_version_code=13
project.ext.fluentui_others_version_code=13
project.ext.fluentui_transients_version_code=13
project.ext.fluentui_topappbars_version_code=13
project.ext.fluentui_menus_version_code=13
project.ext.fluentui_peoplepicker_version_code=13
project.ext.fluentui_persona_version_code=13
project.ext.fluentui_progress_version_code=13
project.ext.FluentUI_version_code=24
project.ext.fluentui_calendar_versionid='0.0.14'
project.ext.fluentui_core_versionid='0.0.14'
project.ext.fluentui_listitem_versionid='0.0.14'
project.ext.fluentui_tablayout_versionid='0.0.14'
project.ext.fluentui_drawer_versionid='0.0.14'
project.ext.fluentui_ccb_versionid='0.0.14'
project.ext.fluentui_others_versionid='0.0.14'
project.ext.fluentui_transients_versionid='0.0.14'
project.ext.fluentui_topappbars_versionid='0.0.14'
project.ext.fluentui_menus_versionid='0.0.14'
project.ext.fluentui_peoplepicker_versionid='0.0.14'
project.ext.fluentui_persona_versionid='0.0.14'
project.ext.fluentui_progress_versionid='0.0.14'
project.ext.FluentUI_versionid='0.0.25'
project.ext.fluentui_calendar_version_code=14
project.ext.fluentui_core_version_code=14
project.ext.fluentui_listitem_version_code=14
project.ext.fluentui_tablayout_version_code=14
project.ext.fluentui_drawer_version_code=14
project.ext.fluentui_ccb_version_code=14
project.ext.fluentui_others_version_code=14
project.ext.fluentui_transients_version_code=14
project.ext.fluentui_topappbars_version_code=14
project.ext.fluentui_menus_version_code=14
project.ext.fluentui_peoplepicker_version_code=14
project.ext.fluentui_persona_version_code=14
project.ext.fluentui_progress_version_code=14
project.ext.FluentUI_version_code=25
project.ext.license_type='MIT License'
project.ext.license_url='https://github.com/microsoft/fluentui-android/blob/master/LICENSE'
project.ext.github_url='https://github.com/microsoft/fluentui-android'
Expand Down
2 changes: 1 addition & 1 deletion fluentui-android-modular-build-universal-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@ steps:
vstsFeedPublish: 'Office'
vstsFeedPackagePublish: 'fluentuiandroid'
versionOption: 'custom'
versionPublish: '0.0.24'
versionPublish: '0.0.25'
packagePublishDescription: 'Fluent Universal Package'
publishedPackageVar: 'fluent package'
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,10 @@
package com.microsoft.fluentui.persistentbottomsheet

import android.content.Context
import android.graphics.Rect
import android.transition.ChangeBounds
import android.transition.TransitionManager
import android.util.AttributeSet
import android.view.KeyEvent
import android.view.MotionEvent
import android.view.View
import android.view.ViewGroup
import android.view.accessibility.AccessibilityEvent
Expand Down Expand Up @@ -80,9 +78,20 @@ class PersistentBottomSheet @JvmOverloads constructor(context: Context, attrs: A
override fun onStateChanged(bottomSheet: View, newState: Int) {
if (newState == BottomSheetBehavior.STATE_EXPANDED) {
persistentSheetBehavior.peekHeight = itemLayoutParam.defaultPeekHeight
persistentSheetBinding.persistentBottomSheetOutlined.isClickable = true
persistentSheetBinding.persistentBottomSheetOutlined.isFocusable = false
persistentSheetBinding.persistentBottomSheetOutlined.setOnClickListener {
persistentSheetBehavior.state = BottomSheetBehavior.STATE_COLLAPSED
}
}
if (newState == BottomSheetBehavior.STATE_COLLAPSED) {
else if (newState == BottomSheetBehavior.STATE_COLLAPSED) {
persistentSheetBinding.scrollContainer.smoothScrollTo(0, 0)
persistentSheetBinding.persistentBottomSheetOutlined.isFocusable = false
persistentSheetBinding.persistentBottomSheetOutlined.isClickable = false
}
else if(newState == BottomSheetBehavior.STATE_HIDDEN) {
persistentSheetBinding.persistentBottomSheetOutlined.isFocusable = false
persistentSheetBinding.persistentBottomSheetOutlined.isClickable = false
}
setDrawerHandleContentDescription(collapsedStateDrawerHandleContentDescription,expandedStateDrawerHandleContentDescription)
}
Expand Down Expand Up @@ -166,21 +175,6 @@ class PersistentBottomSheet @JvmOverloads constructor(context: Context, attrs: A
persistentSheetBehavior.peekHeight = newY
}

override fun onInterceptTouchEvent(ev: MotionEvent?): Boolean {
val viewRect = Rect()
persistentSheetBinding.persistentBottomSheet.getGlobalVisibleRect(viewRect)

if (persistentSheetBehavior.state == BottomSheetBehavior.STATE_EXPANDED) {
if (!viewRect.contains(ev!!.rawX.toInt(), ev.rawY.toInt())) {
persistentSheetBehavior.state = BottomSheetBehavior.STATE_COLLAPSED
shouldInterceptTouch = true
return true
}
}
shouldInterceptTouch = false
return super.onInterceptTouchEvent(ev)
}

override fun dispatchKeyEvent(event: KeyEvent?): Boolean {
if (event?.keyCode == KeyEvent.KEYCODE_ESCAPE) {
event.dispatch(this, null, null)
Expand All @@ -189,12 +183,6 @@ class PersistentBottomSheet @JvmOverloads constructor(context: Context, attrs: A
return super.dispatchKeyEvent(event)
}

override fun onTouchEvent(event: MotionEvent?): Boolean {
if (shouldInterceptTouch)
return true
return super.onTouchEvent(event)
}

internal fun getSheetBehavior(): BottomSheetBehavior<View> {
return persistentSheetBehavior
}
Expand Down

0 comments on commit d89ba69

Please sign in to comment.