[go: nahoru, domu]

[Text Selection] Move SelectionContainer.

-- Move SelectionContainer and SelectionHandles to ui-foundation, to be
able to use Popup.

Test: ./gradlew test
Change-Id: Iaf3aa82b4e248e106838e307433374ca45c60ac9
diff --git a/ui/ui-framework/src/main/java/androidx/ui/core/selection/SelectionManager.kt b/ui/ui-framework/src/main/java/androidx/ui/core/selection/SelectionManager.kt
index d7edee4..4af3009 100644
--- a/ui/ui-framework/src/main/java/androidx/ui/core/selection/SelectionManager.kt
+++ b/ui/ui-framework/src/main/java/androidx/ui/core/selection/SelectionManager.kt
@@ -22,7 +22,10 @@
 import androidx.ui.core.gesture.DragObserver
 import androidx.ui.core.px
 
-internal class SelectionManager : SelectionRegistrar {
+/**
+ * A bridge class between user interaction to the text widgets for text selection.
+ */
+class SelectionManager : SelectionRegistrar {
     /**
      * The current selection.
      */
@@ -185,5 +188,7 @@
     }
 }
 
-/** Ambient of SelectionRegistrar for SelectionManager. */
-internal val SelectionRegistrarAmbient = Ambient.of<SelectionRegistrar> { SelectionManager() }
+/**
+ * Ambient of SelectionRegistrar for SelectionManager.
+ */
+val SelectionRegistrarAmbient = Ambient.of<SelectionRegistrar> { SelectionManager() }