Simplify Drag&Drop implementation

pull/1837/head
Rob Orgiu 10 months ago
parent 4d80a9a8f0
commit e05afab096

@ -24,7 +24,6 @@ import androidx.compose.foundation.Canvas
import androidx.compose.foundation.ExperimentalFoundationApi
import androidx.compose.foundation.Image
import androidx.compose.foundation.draganddrop.dragAndDropSource
import androidx.compose.foundation.gestures.detectTapGestures
import androidx.compose.foundation.horizontalScroll
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
@ -140,18 +139,14 @@ fun NewsResourceCardExpanded(
modifier = Modifier
.fillMaxWidth((.8f))
.dragAndDropSource {
detectTapGestures(
onLongPress = {
startTransfer(
DragAndDropTransferData(
ClipData.newPlainText(
sharingLabel,
sharingContent,
),
flags = dragAndDropFlags,
),
)
},
startTransfer(
DragAndDropTransferData(
ClipData.newPlainText(
sharingLabel,
sharingContent,
),
flags = dragAndDropFlags,
),
)
},
)

@ -2,12 +2,12 @@
accompanist = "0.34.0"
androidDesugarJdkLibs = "2.0.4"
# AGP and tools should be updated together
androidGradlePlugin = "8.6.1"
androidGradlePlugin = "8.7.2"
androidTools = "31.7.2"
androidxActivity = "1.9.3"
androidxAppCompat = "1.7.0"
androidxBrowser = "1.8.0"
androidxComposeBom = "2024.09.00"
androidxComposeBom = "2024.11.00"
androidxComposeRuntimeTracing = "1.0.0-beta01"
androidxCore = "1.13.1"
androidxCoreSplashscreen = "1.0.1"

Loading…
Cancel
Save