Fixed
Status Update
Comments
cl...@google.com <cl...@google.com>
ma...@google.com <ma...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 23a7d960caf43390a554700d3c56ada189a9d10e
Author: Louis Pullen-Freilich <lpf@google.com>
Date: Mon Aug 10 15:11:36 2020
IconButton / IconToggleButton API scrub
Test: ./gradlew updateApi
Bug: b/161809385
Bug: b/161807956
Relnote: "Adds enabled parameter to IconButton, and reorders parameters in IconToggleButton"
Change-Id: I0a9419b1a631cadad451395302ad87b7f9214f96
M ui/ui-material/api/current.txt
M ui/ui-material/api/public_plus_experimental_current.txt
M ui/ui-material/api/restricted_current.txt
M ui/ui-material/src/commonMain/kotlin/androidx/compose/material/IconButton.kt
https://android-review.googlesource.com/1394868
Branch: androidx-master-dev
commit 23a7d960caf43390a554700d3c56ada189a9d10e
Author: Louis Pullen-Freilich <lpf@google.com>
Date: Mon Aug 10 15:11:36 2020
IconButton / IconToggleButton API scrub
Test: ./gradlew updateApi
Bug:
Bug:
Relnote: "Adds enabled parameter to IconButton, and reorders parameters in IconToggleButton"
Change-Id: I0a9419b1a631cadad451395302ad87b7f9214f96
M ui/ui-material/api/current.txt
M ui/ui-material/api/public_plus_experimental_current.txt
M ui/ui-material/api/restricted_current.txt
M ui/ui-material/src/commonMain/kotlin/androidx/compose/material/IconButton.kt
ap...@google.com <ap...@google.com> #3
Project: platform/frameworks/support
Branch: androidx-master-dev
commit e4894d0b99ea6360cc84bc2bc55d6f602e3b8b63
Author: Calin Tataru <calintat@google.com>
Date: Mon Jul 27 10:53:31 2020
Refactor stateDraggable and rename to swipeable
This CL does the following things:
* Rename Modifier.stateDraggable to Modifier.swipeable.
* Make swipeable public and mark it as ExperimentalMaterialApi.
* Introduce the concept of SwipeableState which holds the current state
of the swipeable as well as the animated float, and provides methods for
updating the state and subscribing to more granular in-movement updates.
* Rename DrawerState to DrawerValue, and introduce a new DrawerState
class which is a subclass of SwipeableState<DrawerValue> and provides
more contextual methods such as isOpen or open(). Same for BottomDrawer.
Bug: 148023068
Test: Ran DrawerTest, ScaffoldTest and SwitchTest
Relnote: "Modifier.stateDraggable was completely reworked and renamed
to Modifier.swipeable. A new SwipeableState class was introduced, and
DrawerState and BottomDrawerState were refactored to inherit from it.
[Modal/Bottom]DrawerLayout no longer take an onStateChange parameter."
Change-Id: I7233229dfc9c04a4615f4c1cc29e604b97edd1df
M compose/compose-runtime/compose-runtime-benchmark/src/androidTest/java/androidx/compose/runtime/HotReloadIntegrationTests.kt
M ui/ui-material/api/current.txt
M ui/ui-material/api/public_plus_experimental_current.txt
M ui/ui-material/api/restricted_current.txt
M ui/ui-material/samples/src/main/java/androidx/compose/material/samples/DrawerSamples.kt
M ui/ui-material/samples/src/main/java/androidx/compose/material/samples/ScaffoldSamples.kt
A ui/ui-material/samples/src/main/java/androidx/compose/material/samples/SwipeableSamples.kt
M ui/ui-material/src/androidAndroidTest/kotlin/androidx/compose/material/DrawerScreenshotTest.kt
M ui/ui-material/src/androidAndroidTest/kotlin/androidx/compose/material/DrawerTest.kt
M ui/ui-material/src/androidAndroidTest/kotlin/androidx/compose/material/ScaffoldTest.kt
M ui/ui-material/src/commonMain/kotlin/androidx/compose/material/Drawer.kt
M ui/ui-material/src/commonMain/kotlin/androidx/compose/material/Scaffold.kt
A ui/ui-material/src/commonMain/kotlin/androidx/compose/material/Swipeable.kt
M ui/ui-material/src/commonMain/kotlin/androidx/compose/material/Switch.kt
D ui/ui-material/src/commonMain/kotlin/androidx/compose/material/internal/StateDraggable.kt
https://android-review.googlesource.com/1362598
Branch: androidx-master-dev
commit e4894d0b99ea6360cc84bc2bc55d6f602e3b8b63
Author: Calin Tataru <calintat@google.com>
Date: Mon Jul 27 10:53:31 2020
Refactor stateDraggable and rename to swipeable
This CL does the following things:
* Rename Modifier.stateDraggable to Modifier.swipeable.
* Make swipeable public and mark it as ExperimentalMaterialApi.
* Introduce the concept of SwipeableState which holds the current state
of the swipeable as well as the animated float, and provides methods for
updating the state and subscribing to more granular in-movement updates.
* Rename DrawerState to DrawerValue, and introduce a new DrawerState
class which is a subclass of SwipeableState<DrawerValue> and provides
more contextual methods such as isOpen or open(). Same for BottomDrawer.
Bug: 148023068
Test: Ran DrawerTest, ScaffoldTest and SwitchTest
Relnote: "Modifier.stateDraggable was completely reworked and renamed
to Modifier.swipeable. A new SwipeableState class was introduced, and
DrawerState and BottomDrawerState were refactored to inherit from it.
[Modal/Bottom]DrawerLayout no longer take an onStateChange parameter."
Change-Id: I7233229dfc9c04a4615f4c1cc29e604b97edd1df
M compose/compose-runtime/compose-runtime-benchmark/src/androidTest/java/androidx/compose/runtime/HotReloadIntegrationTests.kt
M ui/ui-material/api/current.txt
M ui/ui-material/api/public_plus_experimental_current.txt
M ui/ui-material/api/restricted_current.txt
M ui/ui-material/samples/src/main/java/androidx/compose/material/samples/DrawerSamples.kt
M ui/ui-material/samples/src/main/java/androidx/compose/material/samples/ScaffoldSamples.kt
A ui/ui-material/samples/src/main/java/androidx/compose/material/samples/SwipeableSamples.kt
M ui/ui-material/src/androidAndroidTest/kotlin/androidx/compose/material/DrawerScreenshotTest.kt
M ui/ui-material/src/androidAndroidTest/kotlin/androidx/compose/material/DrawerTest.kt
M ui/ui-material/src/androidAndroidTest/kotlin/androidx/compose/material/ScaffoldTest.kt
M ui/ui-material/src/commonMain/kotlin/androidx/compose/material/Drawer.kt
M ui/ui-material/src/commonMain/kotlin/androidx/compose/material/Scaffold.kt
A ui/ui-material/src/commonMain/kotlin/androidx/compose/material/Swipeable.kt
M ui/ui-material/src/commonMain/kotlin/androidx/compose/material/Switch.kt
D ui/ui-material/src/commonMain/kotlin/androidx/compose/material/internal/StateDraggable.kt
ap...@google.com <ap...@google.com> #4
Project: platform/frameworks/support
Branch: androidx-master-dev
commit e4894d0b99ea6360cc84bc2bc55d6f602e3b8b63
Author: Calin Tataru <calintat@google.com>
Date: Mon Jul 27 10:53:31 2020
Refactor stateDraggable and rename to swipeable
This CL does the following things:
* Rename Modifier.stateDraggable to Modifier.swipeable.
* Make swipeable public and mark it as ExperimentalMaterialApi.
* Introduce the concept of SwipeableState which holds the current state
of the swipeable as well as the animated float, and provides methods for
updating the state and subscribing to more granular in-movement updates.
* Rename DrawerState to DrawerValue, and introduce a new DrawerState
class which is a subclass of SwipeableState<DrawerValue> and provides
more contextual methods such as isOpen or open(). Same for BottomDrawer.
Bug: 148023068
Test: Ran DrawerTest, ScaffoldTest and SwitchTest
Relnote: "Modifier.stateDraggable was completely reworked and renamed
to Modifier.swipeable. A new SwipeableState class was introduced, and
DrawerState and BottomDrawerState were refactored to inherit from it.
[Modal/Bottom]DrawerLayout no longer take an onStateChange parameter."
Change-Id: I7233229dfc9c04a4615f4c1cc29e604b97edd1df
M compose/compose-runtime/compose-runtime-benchmark/src/androidTest/java/androidx/compose/runtime/HotReloadIntegrationTests.kt
M ui/ui-material/api/current.txt
M ui/ui-material/api/public_plus_experimental_current.txt
M ui/ui-material/api/restricted_current.txt
M ui/ui-material/samples/src/main/java/androidx/compose/material/samples/DrawerSamples.kt
M ui/ui-material/samples/src/main/java/androidx/compose/material/samples/ScaffoldSamples.kt
A ui/ui-material/samples/src/main/java/androidx/compose/material/samples/SwipeableSamples.kt
M ui/ui-material/src/androidAndroidTest/kotlin/androidx/compose/material/DrawerScreenshotTest.kt
M ui/ui-material/src/androidAndroidTest/kotlin/androidx/compose/material/DrawerTest.kt
M ui/ui-material/src/androidAndroidTest/kotlin/androidx/compose/material/ScaffoldTest.kt
M ui/ui-material/src/commonMain/kotlin/androidx/compose/material/Drawer.kt
M ui/ui-material/src/commonMain/kotlin/androidx/compose/material/Scaffold.kt
A ui/ui-material/src/commonMain/kotlin/androidx/compose/material/Swipeable.kt
M ui/ui-material/src/commonMain/kotlin/androidx/compose/material/Switch.kt
D ui/ui-material/src/commonMain/kotlin/androidx/compose/material/internal/StateDraggable.kt
https://android-review.googlesource.com/1362598
Branch: androidx-master-dev
commit e4894d0b99ea6360cc84bc2bc55d6f602e3b8b63
Author: Calin Tataru <calintat@google.com>
Date: Mon Jul 27 10:53:31 2020
Refactor stateDraggable and rename to swipeable
This CL does the following things:
* Rename Modifier.stateDraggable to Modifier.swipeable.
* Make swipeable public and mark it as ExperimentalMaterialApi.
* Introduce the concept of SwipeableState which holds the current state
of the swipeable as well as the animated float, and provides methods for
updating the state and subscribing to more granular in-movement updates.
* Rename DrawerState to DrawerValue, and introduce a new DrawerState
class which is a subclass of SwipeableState<DrawerValue> and provides
more contextual methods such as isOpen or open(). Same for BottomDrawer.
Bug: 148023068
Test: Ran DrawerTest, ScaffoldTest and SwitchTest
Relnote: "Modifier.stateDraggable was completely reworked and renamed
to Modifier.swipeable. A new SwipeableState class was introduced, and
DrawerState and BottomDrawerState were refactored to inherit from it.
[Modal/Bottom]DrawerLayout no longer take an onStateChange parameter."
Change-Id: I7233229dfc9c04a4615f4c1cc29e604b97edd1df
M compose/compose-runtime/compose-runtime-benchmark/src/androidTest/java/androidx/compose/runtime/HotReloadIntegrationTests.kt
M ui/ui-material/api/current.txt
M ui/ui-material/api/public_plus_experimental_current.txt
M ui/ui-material/api/restricted_current.txt
M ui/ui-material/samples/src/main/java/androidx/compose/material/samples/DrawerSamples.kt
M ui/ui-material/samples/src/main/java/androidx/compose/material/samples/ScaffoldSamples.kt
A ui/ui-material/samples/src/main/java/androidx/compose/material/samples/SwipeableSamples.kt
M ui/ui-material/src/androidAndroidTest/kotlin/androidx/compose/material/DrawerScreenshotTest.kt
M ui/ui-material/src/androidAndroidTest/kotlin/androidx/compose/material/DrawerTest.kt
M ui/ui-material/src/androidAndroidTest/kotlin/androidx/compose/material/ScaffoldTest.kt
M ui/ui-material/src/commonMain/kotlin/androidx/compose/material/Drawer.kt
M ui/ui-material/src/commonMain/kotlin/androidx/compose/material/Scaffold.kt
A ui/ui-material/src/commonMain/kotlin/androidx/compose/material/Swipeable.kt
M ui/ui-material/src/commonMain/kotlin/androidx/compose/material/Switch.kt
D ui/ui-material/src/commonMain/kotlin/androidx/compose/material/internal/StateDraggable.kt
ap...@google.com <ap...@google.com> #5
Project: platform/frameworks/support
Branch: androidx-master-dev
commit e4894d0b99ea6360cc84bc2bc55d6f602e3b8b63
Author: Calin Tataru <calintat@google.com>
Date: Mon Jul 27 10:53:31 2020
Refactor stateDraggable and rename to swipeable
This CL does the following things:
* Rename Modifier.stateDraggable to Modifier.swipeable.
* Make swipeable public and mark it as ExperimentalMaterialApi.
* Introduce the concept of SwipeableState which holds the current state
of the swipeable as well as the animated float, and provides methods for
updating the state and subscribing to more granular in-movement updates.
* Rename DrawerState to DrawerValue, and introduce a new DrawerState
class which is a subclass of SwipeableState<DrawerValue> and provides
more contextual methods such as isOpen or open(). Same for BottomDrawer.
Bug: 148023068
Test: Ran DrawerTest, ScaffoldTest and SwitchTest
Relnote: "Modifier.stateDraggable was completely reworked and renamed
to Modifier.swipeable. A new SwipeableState class was introduced, and
DrawerState and BottomDrawerState were refactored to inherit from it.
[Modal/Bottom]DrawerLayout no longer take an onStateChange parameter."
Change-Id: I7233229dfc9c04a4615f4c1cc29e604b97edd1df
M compose/compose-runtime/compose-runtime-benchmark/src/androidTest/java/androidx/compose/runtime/HotReloadIntegrationTests.kt
M ui/ui-material/api/current.txt
M ui/ui-material/api/public_plus_experimental_current.txt
M ui/ui-material/api/restricted_current.txt
M ui/ui-material/samples/src/main/java/androidx/compose/material/samples/DrawerSamples.kt
M ui/ui-material/samples/src/main/java/androidx/compose/material/samples/ScaffoldSamples.kt
A ui/ui-material/samples/src/main/java/androidx/compose/material/samples/SwipeableSamples.kt
M ui/ui-material/src/androidAndroidTest/kotlin/androidx/compose/material/DrawerScreenshotTest.kt
M ui/ui-material/src/androidAndroidTest/kotlin/androidx/compose/material/DrawerTest.kt
M ui/ui-material/src/androidAndroidTest/kotlin/androidx/compose/material/ScaffoldTest.kt
M ui/ui-material/src/commonMain/kotlin/androidx/compose/material/Drawer.kt
M ui/ui-material/src/commonMain/kotlin/androidx/compose/material/Scaffold.kt
A ui/ui-material/src/commonMain/kotlin/androidx/compose/material/Swipeable.kt
M ui/ui-material/src/commonMain/kotlin/androidx/compose/material/Switch.kt
D ui/ui-material/src/commonMain/kotlin/androidx/compose/material/internal/StateDraggable.kt
https://android-review.googlesource.com/1362598
Branch: androidx-master-dev
commit e4894d0b99ea6360cc84bc2bc55d6f602e3b8b63
Author: Calin Tataru <calintat@google.com>
Date: Mon Jul 27 10:53:31 2020
Refactor stateDraggable and rename to swipeable
This CL does the following things:
* Rename Modifier.stateDraggable to Modifier.swipeable.
* Make swipeable public and mark it as ExperimentalMaterialApi.
* Introduce the concept of SwipeableState which holds the current state
of the swipeable as well as the animated float, and provides methods for
updating the state and subscribing to more granular in-movement updates.
* Rename DrawerState to DrawerValue, and introduce a new DrawerState
class which is a subclass of SwipeableState<DrawerValue> and provides
more contextual methods such as isOpen or open(). Same for BottomDrawer.
Bug: 148023068
Test: Ran DrawerTest, ScaffoldTest and SwitchTest
Relnote: "Modifier.stateDraggable was completely reworked and renamed
to Modifier.swipeable. A new SwipeableState class was introduced, and
DrawerState and BottomDrawerState were refactored to inherit from it.
[Modal/Bottom]DrawerLayout no longer take an onStateChange parameter."
Change-Id: I7233229dfc9c04a4615f4c1cc29e604b97edd1df
M compose/compose-runtime/compose-runtime-benchmark/src/androidTest/java/androidx/compose/runtime/HotReloadIntegrationTests.kt
M ui/ui-material/api/current.txt
M ui/ui-material/api/public_plus_experimental_current.txt
M ui/ui-material/api/restricted_current.txt
M ui/ui-material/samples/src/main/java/androidx/compose/material/samples/DrawerSamples.kt
M ui/ui-material/samples/src/main/java/androidx/compose/material/samples/ScaffoldSamples.kt
A ui/ui-material/samples/src/main/java/androidx/compose/material/samples/SwipeableSamples.kt
M ui/ui-material/src/androidAndroidTest/kotlin/androidx/compose/material/DrawerScreenshotTest.kt
M ui/ui-material/src/androidAndroidTest/kotlin/androidx/compose/material/DrawerTest.kt
M ui/ui-material/src/androidAndroidTest/kotlin/androidx/compose/material/ScaffoldTest.kt
M ui/ui-material/src/commonMain/kotlin/androidx/compose/material/Drawer.kt
M ui/ui-material/src/commonMain/kotlin/androidx/compose/material/Scaffold.kt
A ui/ui-material/src/commonMain/kotlin/androidx/compose/material/Swipeable.kt
M ui/ui-material/src/commonMain/kotlin/androidx/compose/material/Switch.kt
D ui/ui-material/src/commonMain/kotlin/androidx/compose/material/internal/StateDraggable.kt
ap...@google.com <ap...@google.com> #6
Project: platform/frameworks/support
Branch: androidx-master-dev
commit e4894d0b99ea6360cc84bc2bc55d6f602e3b8b63
Author: Calin Tataru <calintat@google.com>
Date: Mon Jul 27 10:53:31 2020
Refactor stateDraggable and rename to swipeable
This CL does the following things:
* Rename Modifier.stateDraggable to Modifier.swipeable.
* Make swipeable public and mark it as ExperimentalMaterialApi.
* Introduce the concept of SwipeableState which holds the current state
of the swipeable as well as the animated float, and provides methods for
updating the state and subscribing to more granular in-movement updates.
* Rename DrawerState to DrawerValue, and introduce a new DrawerState
class which is a subclass of SwipeableState<DrawerValue> and provides
more contextual methods such as isOpen or open(). Same for BottomDrawer.
Bug: 148023068
Test: Ran DrawerTest, ScaffoldTest and SwitchTest
Relnote: "Modifier.stateDraggable was completely reworked and renamed
to Modifier.swipeable. A new SwipeableState class was introduced, and
DrawerState and BottomDrawerState were refactored to inherit from it.
[Modal/Bottom]DrawerLayout no longer take an onStateChange parameter."
Change-Id: I7233229dfc9c04a4615f4c1cc29e604b97edd1df
M compose/compose-runtime/compose-runtime-benchmark/src/androidTest/java/androidx/compose/runtime/HotReloadIntegrationTests.kt
M ui/ui-material/api/current.txt
M ui/ui-material/api/public_plus_experimental_current.txt
M ui/ui-material/api/restricted_current.txt
M ui/ui-material/samples/src/main/java/androidx/compose/material/samples/DrawerSamples.kt
M ui/ui-material/samples/src/main/java/androidx/compose/material/samples/ScaffoldSamples.kt
A ui/ui-material/samples/src/main/java/androidx/compose/material/samples/SwipeableSamples.kt
M ui/ui-material/src/androidAndroidTest/kotlin/androidx/compose/material/DrawerScreenshotTest.kt
M ui/ui-material/src/androidAndroidTest/kotlin/androidx/compose/material/DrawerTest.kt
M ui/ui-material/src/androidAndroidTest/kotlin/androidx/compose/material/ScaffoldTest.kt
M ui/ui-material/src/commonMain/kotlin/androidx/compose/material/Drawer.kt
M ui/ui-material/src/commonMain/kotlin/androidx/compose/material/Scaffold.kt
A ui/ui-material/src/commonMain/kotlin/androidx/compose/material/Swipeable.kt
M ui/ui-material/src/commonMain/kotlin/androidx/compose/material/Switch.kt
D ui/ui-material/src/commonMain/kotlin/androidx/compose/material/internal/StateDraggable.kt
https://android-review.googlesource.com/1362598
Branch: androidx-master-dev
commit e4894d0b99ea6360cc84bc2bc55d6f602e3b8b63
Author: Calin Tataru <calintat@google.com>
Date: Mon Jul 27 10:53:31 2020
Refactor stateDraggable and rename to swipeable
This CL does the following things:
* Rename Modifier.stateDraggable to Modifier.swipeable.
* Make swipeable public and mark it as ExperimentalMaterialApi.
* Introduce the concept of SwipeableState which holds the current state
of the swipeable as well as the animated float, and provides methods for
updating the state and subscribing to more granular in-movement updates.
* Rename DrawerState to DrawerValue, and introduce a new DrawerState
class which is a subclass of SwipeableState<DrawerValue> and provides
more contextual methods such as isOpen or open(). Same for BottomDrawer.
Bug: 148023068
Test: Ran DrawerTest, ScaffoldTest and SwitchTest
Relnote: "Modifier.stateDraggable was completely reworked and renamed
to Modifier.swipeable. A new SwipeableState class was introduced, and
DrawerState and BottomDrawerState were refactored to inherit from it.
[Modal/Bottom]DrawerLayout no longer take an onStateChange parameter."
Change-Id: I7233229dfc9c04a4615f4c1cc29e604b97edd1df
M compose/compose-runtime/compose-runtime-benchmark/src/androidTest/java/androidx/compose/runtime/HotReloadIntegrationTests.kt
M ui/ui-material/api/current.txt
M ui/ui-material/api/public_plus_experimental_current.txt
M ui/ui-material/api/restricted_current.txt
M ui/ui-material/samples/src/main/java/androidx/compose/material/samples/DrawerSamples.kt
M ui/ui-material/samples/src/main/java/androidx/compose/material/samples/ScaffoldSamples.kt
A ui/ui-material/samples/src/main/java/androidx/compose/material/samples/SwipeableSamples.kt
M ui/ui-material/src/androidAndroidTest/kotlin/androidx/compose/material/DrawerScreenshotTest.kt
M ui/ui-material/src/androidAndroidTest/kotlin/androidx/compose/material/DrawerTest.kt
M ui/ui-material/src/androidAndroidTest/kotlin/androidx/compose/material/ScaffoldTest.kt
M ui/ui-material/src/commonMain/kotlin/androidx/compose/material/Drawer.kt
M ui/ui-material/src/commonMain/kotlin/androidx/compose/material/Scaffold.kt
A ui/ui-material/src/commonMain/kotlin/androidx/compose/material/Swipeable.kt
M ui/ui-material/src/commonMain/kotlin/androidx/compose/material/Switch.kt
D ui/ui-material/src/commonMain/kotlin/androidx/compose/material/internal/StateDraggable.kt
ap...@google.com <ap...@google.com> #7
Project: platform/frameworks/support
Branch: androidx-master-dev
commit e4894d0b99ea6360cc84bc2bc55d6f602e3b8b63
Author: Calin Tataru <calintat@google.com>
Date: Mon Jul 27 10:53:31 2020
Refactor stateDraggable and rename to swipeable
This CL does the following things:
* Rename Modifier.stateDraggable to Modifier.swipeable.
* Make swipeable public and mark it as ExperimentalMaterialApi.
* Introduce the concept of SwipeableState which holds the current state
of the swipeable as well as the animated float, and provides methods for
updating the state and subscribing to more granular in-movement updates.
* Rename DrawerState to DrawerValue, and introduce a new DrawerState
class which is a subclass of SwipeableState<DrawerValue> and provides
more contextual methods such as isOpen or open(). Same for BottomDrawer.
Bug: 148023068
Test: Ran DrawerTest, ScaffoldTest and SwitchTest
Relnote: "Modifier.stateDraggable was completely reworked and renamed
to Modifier.swipeable. A new SwipeableState class was introduced, and
DrawerState and BottomDrawerState were refactored to inherit from it.
[Modal/Bottom]DrawerLayout no longer take an onStateChange parameter."
Change-Id: I7233229dfc9c04a4615f4c1cc29e604b97edd1df
M compose/compose-runtime/compose-runtime-benchmark/src/androidTest/java/androidx/compose/runtime/HotReloadIntegrationTests.kt
M ui/ui-material/api/current.txt
M ui/ui-material/api/public_plus_experimental_current.txt
M ui/ui-material/api/restricted_current.txt
M ui/ui-material/samples/src/main/java/androidx/compose/material/samples/DrawerSamples.kt
M ui/ui-material/samples/src/main/java/androidx/compose/material/samples/ScaffoldSamples.kt
A ui/ui-material/samples/src/main/java/androidx/compose/material/samples/SwipeableSamples.kt
M ui/ui-material/src/androidAndroidTest/kotlin/androidx/compose/material/DrawerScreenshotTest.kt
M ui/ui-material/src/androidAndroidTest/kotlin/androidx/compose/material/DrawerTest.kt
M ui/ui-material/src/androidAndroidTest/kotlin/androidx/compose/material/ScaffoldTest.kt
M ui/ui-material/src/commonMain/kotlin/androidx/compose/material/Drawer.kt
M ui/ui-material/src/commonMain/kotlin/androidx/compose/material/Scaffold.kt
A ui/ui-material/src/commonMain/kotlin/androidx/compose/material/Swipeable.kt
M ui/ui-material/src/commonMain/kotlin/androidx/compose/material/Switch.kt
D ui/ui-material/src/commonMain/kotlin/androidx/compose/material/internal/StateDraggable.kt
https://android-review.googlesource.com/1362598
Branch: androidx-master-dev
commit e4894d0b99ea6360cc84bc2bc55d6f602e3b8b63
Author: Calin Tataru <calintat@google.com>
Date: Mon Jul 27 10:53:31 2020
Refactor stateDraggable and rename to swipeable
This CL does the following things:
* Rename Modifier.stateDraggable to Modifier.swipeable.
* Make swipeable public and mark it as ExperimentalMaterialApi.
* Introduce the concept of SwipeableState which holds the current state
of the swipeable as well as the animated float, and provides methods for
updating the state and subscribing to more granular in-movement updates.
* Rename DrawerState to DrawerValue, and introduce a new DrawerState
class which is a subclass of SwipeableState<DrawerValue> and provides
more contextual methods such as isOpen or open(). Same for BottomDrawer.
Bug: 148023068
Test: Ran DrawerTest, ScaffoldTest and SwitchTest
Relnote: "Modifier.stateDraggable was completely reworked and renamed
to Modifier.swipeable. A new SwipeableState class was introduced, and
DrawerState and BottomDrawerState were refactored to inherit from it.
[Modal/Bottom]DrawerLayout no longer take an onStateChange parameter."
Change-Id: I7233229dfc9c04a4615f4c1cc29e604b97edd1df
M compose/compose-runtime/compose-runtime-benchmark/src/androidTest/java/androidx/compose/runtime/HotReloadIntegrationTests.kt
M ui/ui-material/api/current.txt
M ui/ui-material/api/public_plus_experimental_current.txt
M ui/ui-material/api/restricted_current.txt
M ui/ui-material/samples/src/main/java/androidx/compose/material/samples/DrawerSamples.kt
M ui/ui-material/samples/src/main/java/androidx/compose/material/samples/ScaffoldSamples.kt
A ui/ui-material/samples/src/main/java/androidx/compose/material/samples/SwipeableSamples.kt
M ui/ui-material/src/androidAndroidTest/kotlin/androidx/compose/material/DrawerScreenshotTest.kt
M ui/ui-material/src/androidAndroidTest/kotlin/androidx/compose/material/DrawerTest.kt
M ui/ui-material/src/androidAndroidTest/kotlin/androidx/compose/material/ScaffoldTest.kt
M ui/ui-material/src/commonMain/kotlin/androidx/compose/material/Drawer.kt
M ui/ui-material/src/commonMain/kotlin/androidx/compose/material/Scaffold.kt
A ui/ui-material/src/commonMain/kotlin/androidx/compose/material/Swipeable.kt
M ui/ui-material/src/commonMain/kotlin/androidx/compose/material/Switch.kt
D ui/ui-material/src/commonMain/kotlin/androidx/compose/material/internal/StateDraggable.kt
Description
Motivation: This is key to create rich transitions and be able to update content based on what's going to happen. For example, imagine that you have a Draggable composable whose content must be shown/hidden at a threshold.
E.g. You might have something like this as a state:
enum class HomeState {
HomeBottomBarCollapsed,
HomeBottomBarContentReveal,
HomeBottomBaExpanded
}
I'd be nice to know that the current state is HomeBottomBarContentReveal but is moving towards HomeBottomBaExpanded so that I can show the content. Otherwise, if the movement is the opposite, then hide it.