Skip to content

Commit

Permalink
Simplify Drag&Drop implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
Rob Orgiu committed Jan 7, 2025
1 parent 8f75786 commit 31c4f05
Show file tree
Hide file tree
Showing 4 changed files with 88 additions and 89 deletions.
100 changes: 50 additions & 50 deletions app-nia-catalog/dependencies/releaseRuntimeClasspath.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,24 @@ androidx.activity:activity-compose:1.9.3
androidx.activity:activity-ktx:1.9.3
androidx.activity:activity:1.9.3
androidx.annotation:annotation-experimental:1.4.1
androidx.annotation:annotation-jvm:1.8.1
androidx.annotation:annotation:1.8.1
androidx.annotation:annotation-jvm:1.9.1
androidx.annotation:annotation:1.9.1
androidx.appcompat:appcompat-resources:1.6.1
androidx.arch.core:core-common:2.2.0
androidx.arch.core:core-runtime:2.2.0
androidx.autofill:autofill:1.0.0
androidx.browser:browser:1.8.0
androidx.collection:collection-jvm:1.4.4
androidx.collection:collection-ktx:1.4.4
androidx.collection:collection:1.4.4
androidx.compose.animation:animation-android:1.7.6
androidx.compose.animation:animation-core-android:1.7.6
androidx.compose.animation:animation-core:1.7.6
androidx.compose.animation:animation:1.7.6
androidx.compose.foundation:foundation-android:1.7.6
androidx.compose.foundation:foundation-layout-android:1.7.6
androidx.compose.foundation:foundation-layout:1.7.6
androidx.compose.foundation:foundation:1.7.6
androidx.collection:collection-jvm:1.5.0-alpha06
androidx.collection:collection-ktx:1.5.0-alpha06
androidx.collection:collection:1.5.0-alpha06
androidx.compose.animation:animation-android:1.8.0-alpha06
androidx.compose.animation:animation-core-android:1.8.0-alpha06
androidx.compose.animation:animation-core:1.8.0-alpha06
androidx.compose.animation:animation:1.8.0-alpha06
androidx.compose.foundation:foundation-android:1.8.0-alpha06
androidx.compose.foundation:foundation-layout-android:1.8.0-alpha06
androidx.compose.foundation:foundation-layout:1.8.0-alpha06
androidx.compose.foundation:foundation:1.8.0-alpha06
androidx.compose.material3.adaptive:adaptive-android:1.0.0
androidx.compose.material3.adaptive:adaptive:1.0.0
androidx.compose.material3:material3-adaptive-navigation-suite-android:1.3.1
Expand All @@ -32,55 +32,55 @@ androidx.compose.material:material-icons-extended-android:1.7.6
androidx.compose.material:material-icons-extended:1.7.6
androidx.compose.material:material-ripple-android:1.7.6
androidx.compose.material:material-ripple:1.7.6
androidx.compose.runtime:runtime-android:1.7.6
androidx.compose.runtime:runtime-saveable-android:1.7.6
androidx.compose.runtime:runtime-saveable:1.7.6
androidx.compose.runtime:runtime:1.7.6
androidx.compose.ui:ui-android:1.7.6
androidx.compose.ui:ui-geometry-android:1.7.6
androidx.compose.ui:ui-geometry:1.7.6
androidx.compose.ui:ui-graphics-android:1.7.6
androidx.compose.ui:ui-graphics:1.7.6
androidx.compose.ui:ui-text-android:1.7.6
androidx.compose.ui:ui-text:1.7.6
androidx.compose.ui:ui-tooling-preview-android:1.7.6
androidx.compose.ui:ui-tooling-preview:1.7.6
androidx.compose.ui:ui-unit-android:1.7.6
androidx.compose.ui:ui-unit:1.7.6
androidx.compose.ui:ui-util-android:1.7.6
androidx.compose.ui:ui-util:1.7.6
androidx.compose.ui:ui:1.7.6
androidx.compose.runtime:runtime-android:1.8.0-alpha06
androidx.compose.runtime:runtime-saveable-android:1.8.0-alpha06
androidx.compose.runtime:runtime-saveable:1.8.0-alpha06
androidx.compose.runtime:runtime:1.8.0-alpha06
androidx.compose.ui:ui-android:1.8.0-alpha06
androidx.compose.ui:ui-geometry-android:1.8.0-alpha06
androidx.compose.ui:ui-geometry:1.8.0-alpha06
androidx.compose.ui:ui-graphics-android:1.8.0-alpha06
androidx.compose.ui:ui-graphics:1.8.0-alpha06
androidx.compose.ui:ui-text-android:1.8.0-alpha06
androidx.compose.ui:ui-text:1.8.0-alpha06
androidx.compose.ui:ui-tooling-preview-android:1.8.0-alpha06
androidx.compose.ui:ui-tooling-preview:1.8.0-alpha06
androidx.compose.ui:ui-unit-android:1.8.0-alpha06
androidx.compose.ui:ui-unit:1.8.0-alpha06
androidx.compose.ui:ui-util-android:1.8.0-alpha06
androidx.compose.ui:ui-util:1.8.0-alpha06
androidx.compose.ui:ui:1.8.0-alpha06
androidx.compose:compose-bom:2024.12.01
androidx.concurrent:concurrent-futures:1.1.0
androidx.core:core-ktx:1.13.1
androidx.core:core:1.13.1
androidx.customview:customview-poolingcontainer:1.0.0
androidx.customview:customview:1.0.0
androidx.emoji2:emoji2:1.3.0
androidx.emoji2:emoji2:1.4.0
androidx.exifinterface:exifinterface:1.3.7
androidx.fragment:fragment:1.5.1
androidx.graphics:graphics-path:1.0.1
androidx.interpolator:interpolator:1.0.0
androidx.lifecycle:lifecycle-common-java8:2.8.3
androidx.lifecycle:lifecycle-common-jvm:2.8.3
androidx.lifecycle:lifecycle-common:2.8.3
androidx.lifecycle:lifecycle-livedata-core-ktx:2.8.3
androidx.lifecycle:lifecycle-livedata-core:2.8.3
androidx.lifecycle:lifecycle-livedata:2.8.3
androidx.lifecycle:lifecycle-process:2.8.3
androidx.lifecycle:lifecycle-runtime-android:2.8.3
androidx.lifecycle:lifecycle-runtime-compose-android:2.8.3
androidx.lifecycle:lifecycle-runtime-compose:2.8.3
androidx.lifecycle:lifecycle-runtime-ktx-android:2.8.3
androidx.lifecycle:lifecycle-runtime-ktx:2.8.3
androidx.lifecycle:lifecycle-runtime:2.8.3
androidx.lifecycle:lifecycle-viewmodel-android:2.8.3
androidx.lifecycle:lifecycle-viewmodel-ktx:2.8.3
androidx.lifecycle:lifecycle-viewmodel-savedstate:2.8.3
androidx.lifecycle:lifecycle-viewmodel:2.8.3
androidx.lifecycle:lifecycle-common-java8:2.8.7
androidx.lifecycle:lifecycle-common-jvm:2.8.7
androidx.lifecycle:lifecycle-common:2.8.7
androidx.lifecycle:lifecycle-livedata-core-ktx:2.8.7
androidx.lifecycle:lifecycle-livedata-core:2.8.7
androidx.lifecycle:lifecycle-livedata:2.8.7
androidx.lifecycle:lifecycle-process:2.8.7
androidx.lifecycle:lifecycle-runtime-android:2.8.7
androidx.lifecycle:lifecycle-runtime-compose-android:2.8.7
androidx.lifecycle:lifecycle-runtime-compose:2.8.7
androidx.lifecycle:lifecycle-runtime-ktx-android:2.8.7
androidx.lifecycle:lifecycle-runtime-ktx:2.8.7
androidx.lifecycle:lifecycle-runtime:2.8.7
androidx.lifecycle:lifecycle-viewmodel-android:2.8.7
androidx.lifecycle:lifecycle-viewmodel-ktx:2.8.7
androidx.lifecycle:lifecycle-viewmodel-savedstate:2.8.7
androidx.lifecycle:lifecycle-viewmodel:2.8.7
androidx.loader:loader:1.0.0
androidx.metrics:metrics-performance:1.0.0-beta01
androidx.profileinstaller:profileinstaller:1.3.1
androidx.profileinstaller:profileinstaller:1.4.0
androidx.savedstate:savedstate-ktx:1.2.1
androidx.savedstate:savedstate:1.2.1
androidx.startup:startup-runtime:1.1.1
Expand Down
68 changes: 34 additions & 34 deletions app/dependencies/prodReleaseRuntimeClasspath.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,25 @@ androidx.activity:activity-compose:1.9.3
androidx.activity:activity-ktx:1.9.3
androidx.activity:activity:1.9.3
androidx.annotation:annotation-experimental:1.4.1
androidx.annotation:annotation-jvm:1.8.1
androidx.annotation:annotation:1.8.1
androidx.annotation:annotation-jvm:1.9.1
androidx.annotation:annotation:1.9.1
androidx.appcompat:appcompat-resources:1.7.0
androidx.appcompat:appcompat:1.7.0
androidx.arch.core:core-common:2.2.0
androidx.arch.core:core-runtime:2.2.0
androidx.autofill:autofill:1.0.0
androidx.browser:browser:1.8.0
androidx.collection:collection-jvm:1.4.4
androidx.collection:collection-ktx:1.4.4
androidx.collection:collection:1.4.4
androidx.compose.animation:animation-android:1.7.6
androidx.compose.animation:animation-core-android:1.7.6
androidx.compose.animation:animation-core:1.7.6
androidx.compose.animation:animation:1.7.6
androidx.compose.foundation:foundation-android:1.7.6
androidx.compose.foundation:foundation-layout-android:1.7.6
androidx.compose.foundation:foundation-layout:1.7.6
androidx.compose.foundation:foundation:1.7.6
androidx.collection:collection-jvm:1.5.0-alpha06
androidx.collection:collection-ktx:1.5.0-alpha06
androidx.collection:collection:1.5.0-alpha06
androidx.compose.animation:animation-android:1.8.0-alpha06
androidx.compose.animation:animation-core-android:1.8.0-alpha06
androidx.compose.animation:animation-core:1.8.0-alpha06
androidx.compose.animation:animation:1.8.0-alpha06
androidx.compose.foundation:foundation-android:1.8.0-alpha06
androidx.compose.foundation:foundation-layout-android:1.8.0-alpha06
androidx.compose.foundation:foundation-layout:1.8.0-alpha06
androidx.compose.foundation:foundation:1.8.0-alpha06
androidx.compose.material3.adaptive:adaptive-android:1.0.0
androidx.compose.material3.adaptive:adaptive-layout-android:1.0.0
androidx.compose.material3.adaptive:adaptive-layout:1.0.0
Expand All @@ -39,25 +39,25 @@ androidx.compose.material:material-icons-extended-android:1.7.6
androidx.compose.material:material-icons-extended:1.7.6
androidx.compose.material:material-ripple-android:1.7.6
androidx.compose.material:material-ripple:1.7.6
androidx.compose.runtime:runtime-android:1.7.6
androidx.compose.runtime:runtime-saveable-android:1.7.6
androidx.compose.runtime:runtime-saveable:1.7.6
androidx.compose.runtime:runtime-tracing:1.7.6
androidx.compose.runtime:runtime:1.7.6
androidx.compose.ui:ui-android:1.7.6
androidx.compose.ui:ui-geometry-android:1.7.6
androidx.compose.ui:ui-geometry:1.7.6
androidx.compose.ui:ui-graphics-android:1.7.6
androidx.compose.ui:ui-graphics:1.7.6
androidx.compose.ui:ui-text-android:1.7.6
androidx.compose.ui:ui-text:1.7.6
androidx.compose.ui:ui-tooling-preview-android:1.7.6
androidx.compose.ui:ui-tooling-preview:1.7.6
androidx.compose.ui:ui-unit-android:1.7.6
androidx.compose.ui:ui-unit:1.7.6
androidx.compose.ui:ui-util-android:1.7.6
androidx.compose.ui:ui-util:1.7.6
androidx.compose.ui:ui:1.7.6
androidx.compose.runtime:runtime-android:1.8.0-alpha06
androidx.compose.runtime:runtime-saveable-android:1.8.0-alpha06
androidx.compose.runtime:runtime-saveable:1.8.0-alpha06
androidx.compose.runtime:runtime-tracing:1.8.0-alpha06
androidx.compose.runtime:runtime:1.8.0-alpha06
androidx.compose.ui:ui-android:1.8.0-alpha06
androidx.compose.ui:ui-geometry-android:1.8.0-alpha06
androidx.compose.ui:ui-geometry:1.8.0-alpha06
androidx.compose.ui:ui-graphics-android:1.8.0-alpha06
androidx.compose.ui:ui-graphics:1.8.0-alpha06
androidx.compose.ui:ui-text-android:1.8.0-alpha06
androidx.compose.ui:ui-text:1.8.0-alpha06
androidx.compose.ui:ui-tooling-preview-android:1.8.0-alpha06
androidx.compose.ui:ui-tooling-preview:1.8.0-alpha06
androidx.compose.ui:ui-unit-android:1.8.0-alpha06
androidx.compose.ui:ui-unit:1.8.0-alpha06
androidx.compose.ui:ui-util-android:1.8.0-alpha06
androidx.compose.ui:ui-util:1.8.0-alpha06
androidx.compose.ui:ui:1.8.0-alpha06
androidx.compose:compose-bom:2024.12.01
androidx.concurrent:concurrent-futures-ktx:1.1.0
androidx.concurrent:concurrent-futures:1.1.0
Expand All @@ -79,8 +79,8 @@ androidx.datastore:datastore-preferences:1.1.1
androidx.datastore:datastore:1.1.1
androidx.documentfile:documentfile:1.0.0
androidx.drawerlayout:drawerlayout:1.0.0
androidx.emoji2:emoji2-views-helper:1.3.0
androidx.emoji2:emoji2:1.3.0
androidx.emoji2:emoji2-views-helper:1.4.0
androidx.emoji2:emoji2:1.4.0
androidx.exifinterface:exifinterface:1.3.7
androidx.fragment:fragment:1.5.4
androidx.graphics:graphics-path:1.0.1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,16 +138,14 @@ fun NewsResourceCardExpanded(
userNewsResource.title,
modifier = Modifier
.fillMaxWidth((.8f))
.dragAndDropSource {
startTransfer(
.dragAndDropSource { _ ->
DragAndDropTransferData(
ClipData.newPlainText(
sharingLabel,
sharingContent,
),
flags = dragAndDropFlags,
),
)
)
},
)
Spacer(modifier = Modifier.weight(1f))
Expand Down
3 changes: 2 additions & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ room = "2.6.1"
secrets = "2.0.1"
truth = "1.4.4"
turbine = "1.2.0"
composeFoundation = "1.8.0-alpha06"

[bundles]
androidx-compose-ui-test = ["androidx-compose-ui-test", "androidx-compose-ui-testManifest"]
Expand All @@ -69,7 +70,7 @@ androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version
androidx-benchmark-macro = { group = "androidx.benchmark", name = "benchmark-macro-junit4", version.ref = "androidxMacroBenchmark" }
androidx-browser = { group = "androidx.browser", name = "browser", version.ref = "androidxBrowser" }
androidx-compose-bom = { group = "androidx.compose", name = "compose-bom", version.ref = "androidxComposeBom" }
androidx-compose-foundation = { group = "androidx.compose.foundation", name = "foundation" }
androidx-compose-foundation = { group = "androidx.compose.foundation", name = "foundation", version.ref = "composeFoundation" }
androidx-compose-foundation-layout = { group = "androidx.compose.foundation", name = "foundation-layout" }
androidx-compose-material-iconsExtended = { group = "androidx.compose.material", name = "material-icons-extended" }
androidx-compose-material3 = { group = "androidx.compose.material3", name = "material3" }
Expand Down

0 comments on commit 31c4f05

Please sign in to comment.