Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Cross App Drag and Drop
Search
funnelbit
March 30, 2016
Technology
0
660
Cross App Drag and Drop
funnelbit
March 30, 2016
Tweet
Share
More Decks by funnelbit
See All by funnelbit
Hatena Engineer Seminar #9
funnelbit
5
7.2k
droidkaigi-2017-renovation
funnelbit
10
10k
Dart
funnelbit
0
250
BottomBarAndSnackBar
funnelbit
0
470
Dagger2 Optional bindings
funnelbit
0
540
WearableRecyclerView
funnelbit
1
770
QucikSettingsTileAPI
funnelbit
0
350
Mobile Vision
funnelbit
0
440
AwarenessAPI
funnelbit
0
130
Other Decks in Technology
See All in Technology
TSKaigi 2024 の登壇から広がったコミュニティ活動について
tsukuha
0
160
Jetpack Composeで始めるServer Cache State
ogaclejapan
2
170
レンジャーシステムズ | 会社紹介(採用ピッチ)
rssytems
0
150
オプトインカメラ:UWB測位を応用したオプトイン型のカメラ計測
matthewlujp
0
170
re:Invent をおうちで楽しんでみた ~CloudWatch のオブザーバビリティ機能がスゴい!/ Enjoyed AWS re:Invent from Home and CloudWatch Observability Feature is Amazing!
yuj1osm
0
120
継続的にアウトカムを生み出し ビジネスにつなげる、 戦略と運営に対するタイミーのQUEST(探求)
zigorou
0
530
ハイテク休憩
sat
PRO
2
140
Oracle Cloud Infrastructure:2024年12月度サービス・アップデート
oracle4engineer
PRO
0
170
PHP ユーザのための OpenTelemetry 入門 / phpcon2024-opentelemetry
shin1x1
1
190
組織に自動テストを書く文化を根付かせる戦略(2024冬版) / Building Automated Test Culture 2024 Winter Edition
twada
PRO
13
3.7k
日本版とグローバル版のモバイルアプリ統合の開発の裏側と今後の展望
miichan
1
130
権威ドキュメントで振り返る2024 #年忘れセキュリティ2024
hirotomotaguchi
2
740
Featured
See All Featured
Fireside Chat
paigeccino
34
3.1k
The Pragmatic Product Professional
lauravandoore
32
6.3k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
29
2k
Writing Fast Ruby
sferik
628
61k
Side Projects
sachag
452
42k
Visualization
eitanlees
146
15k
It's Worth the Effort
3n
183
28k
Producing Creativity
orderedlist
PRO
341
39k
[RailsConf 2023] Rails as a piece of cake
palkan
53
5k
The Cult of Friendly URLs
andyhume
78
6.1k
How to Think Like a Performance Engineer
csswizardry
22
1.2k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.9k
Transcript
$SPTT"QQ%SBH "OE%SPQ JEGVOOFMCJU
ࣗݾհ w ଜɹྋ w ͯͳJEGVOOFMCJU w 5XJUUFSJEFYQFSPQFSP
None
"OESPJE ͯͳϒοΫϚʔΫ
"OESPJE/1SFWJFX ग़·ͨ͠Ͷ
.VMUJ8JOEPX4VQQPSU
ΞϓϦؒͷ %SBHˍ%SPQΛαϙʔτ w 7JFXΫϥε͕֦ு͞Εαϙʔτ͞Εͨ w ҟͳΔ8JOEPXؒΛ%SBHˍ%SPQͰ͖Δ w ͨͱ͑ͦΕ͕ผΞϓϦͰ͋ͬͯ
ΞϓϦؒͷ %SBHˍ%SPQΛαϙʔτ w ͍ํ͜Ε·Ͱͷ%SBHˍ%SPQͱ͋Μ·ΓมΘ Βͳ͍ w Χॴ৽͍͠ϞϊΛ͏
TUBSU%SBH"OE%SPQ w ESBHˍESPQͷૢ࡞͕։࢝͞ΕΔ w TUBSU%SBH ඇਪʹ textView.startDragAndDrop(clipData, new MyDragShadowBuilder(view), null,
View.DRAG_FLAG_GLOBAL);
DBODFM%SBH"OE%SPQ w %SBHΠϕϯτΛதஅͰ͖Δ w %SBHૢ࡞Λ։࢝ͨ͠ଆͷΈ͕ݺΔ textView.cancelDragAndDrop();
VQEBUF%SBH4IBEPX w %SBHதͷӨΛஔ͖͑Δ͜ͱ͕ग़དྷΔ w %SBHૢ࡞Λ։࢝ͨ͠ଆͷΈ͕ݺΔ textView.updateDragShadow( new MyDragShadowBuilder(view));
%3"(@'-"(@(-0#"- w 8JOEPXΛ͑ͯͷ%SBHΛࢦఆ͢Δͱ͖ʹ͏ View.DRAG_FLAG_GLOBAL; View.DRAG_FLAG_GLOBAL_URI_READ; View.DRAG_FLAG_GLOBAL_URI_WRITE; …
w BOESPJEWJFX%SPQ1FSNJTTJPOT w SFRVFTU%SPQ1FSNJTTJPOT %SPQ1FSNJTTJPOT
ૹΔଆ ClipData.Item item = new ClipData.Item("ςΩετ"); String[] mimeType =
new String[1]; mimeType[0] = ClipDescription.MIMETYPE_TEXT_PLANE; ClipData clipData = new ClipData( new ClipDescription("text", mimeType), item); textView.startDragAndDrop(clipData, new MyDragShadowBuilder(view), null, View.DRAG_FLAG_GLOBAL);
Β͏ଆ root.setOnDragListener(new View.OnDragListener() { @Override public boolean onDrag(View view, DragEvent
dragEvent) { if (dragEvent.getAction() == DragEvent.ACTION_DROP) { String item = dragEvent.getClipData().getItemAt(0).getUri(); Log.e("text", item.toString()); } return true; } });
σϞ
ॴײ w ؆୯ʹσʔλͤΕΔͷྑͦ͞͏ w ͨͩ͠.VMUJ8JOEPXͷ͍উखʹΑΔ w ߟ͑Δࣄ૿͑ͨ w Ͳͷ.*.&5:1&·ͰରԠ͢Δͷ͔ɺ͠ͳ͍߹Ͳ͏͢Δ ͷ͔
w %SBHதͷ6* w ͍ͭͰ%SBHΠϕϯτ͕ೖͬͯ͘Δͱҙࣝ͢Δ
͋Γ͕ͱ͏͍͟͝·͠ ͨ