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
requirements with math
Search
Moony-H
March 15, 2025
Programming
0
280
requirements with math
Google Developer Group Korea Super.init(V6) Presentation
Moony-H
March 15, 2025
Tweet
Share
Other Decks in Programming
See All in Programming
SREチームのタスク優先度と向き合う Road to SRE NEXT@札幌
nealle
0
100
Swift Testingのモチベを上げたい
stoticdev
2
230
Boos Performance and Developer Productivity with Jakarta EE 11
ivargrimstad
0
1.1k
AI Agentを利用したAndroid開発について
yuchan2215
0
150
Amazon Bedrockマルチエージェントコラボレーションを諦めてLangGraphに入門してみた
akihisaikeda
1
190
Modern Angular with Signals and Signal StoreNew Rules for Your Architecture @bastacon 2025 in Frankfurt
manfredsteyer
PRO
0
170
‘무차별 LGTM~👍’만 외치던 우리가 ‘고봉밥 코드 리뷰’를?
hannah0731
0
250
技術好きなエンジニアが "リーダーへの進化" によって得たものと失ったもの
pospome
4
830
TCAを用いたAmebaのリアーキテクチャ
dazy
0
260
신입 안드로이드 개발자의 AI 스타트업 생존기 (+ Native C++ Code를 Android에서 사용해보기)
dygames
0
250
エンジニアに許された特別な時間の終わり
watany
82
68k
Webフレームワークとともに利用するWeb components / JSConf.jp おかわり
spring_raining
1
170
Featured
See All Featured
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
KATA
mclloyd
29
14k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
22
2.5k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
Git: the NoSQL Database
bkeepers
PRO
429
65k
GraphQLとの向き合い方2022年版
quramy
44
14k
Building Your Own Lightsaber
phodgson
104
6.3k
Docker and Python
trallard
44
3.3k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
27
1.6k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
33
2.8k
Reflections from 52 weeks, 52 projects
jeffersonlam
349
20k
Agile that works and the tools we love
rasmusluckow
328
21k
Transcript
Korea Android ࣻਵ۽ UI ਃҳࢎ೦ ݅ೞӝ MoonHwi Han super.init(version=6)
ࣻ… જইೞदաਃ? 저는 별로…
ࣻ… જইೞदաਃ?
ࣻ… જইೞदաਃ?
ࣻ… જইೞदաਃ?
Androidীח?
ࣻਸ ਊೠ ҃ , Ҋ١Ү ࣻਵ۽ ࢚ഐਊਸ ٜ݅ ࣻ .
пೣࣻ۽ ӝ ઁযೞӝ Korea Android super.init(version=6)
ਗ Ӓܻӝ “지도 위에 반경을 그리는 기능을 만들어주세요”
ਗ Ӓܻӝ
ਗ Ӓܻӝ
ਗ Ӓܻӝ MotionEvent.ACTION_MOVE -> { val dragPosX = it.x val
dragPosY = it.y }
ਗ Ӓܻӝ val dx = (circleCenterPos.x - dragPosX).toDouble() val dy
= (circleCenterPos.y - dragPosY).toDouble() val radPx = sqrt(dx.pow(2.0) + dy.pow(2.0)) val radMeter = radPx * naverMap.projection.metersPerPixel
ਗ Ӓܻӝ circle.radius = radMeter
ਗ Ӓܻӝ MotionEvent.ACTION_MOVE -> { val dragPosX = it.x val
dragPosY = it.y val dx = (circleCenterPos.x - dragPosX).toDouble() val dy = (circleCenterPos.y - dragPosY).toDouble() val radPx = sqrt(dx.pow(2.0) + dy.pow(2.0)) val radMeter = radPx * naverMap.projection.metersPerPixel circle.radius = if (radMeter > 500) 500.0 else radMeter }
ਗ Ӓܻӝ
ਗ Ӓܻӝ ߈ܴ rਸ 500m۽ ઁೠ
ਗ Ӓܻӝ indicatorח (x, y)о ইצ (x’, y’)ܳ ٮۄоঠ ೠ.
ਗ Ӓܻӝ
ਗ Ӓܻӝ
ਗ Ӓܻӝ
ਗ Ӓܻӝ val degree = atan2(dy, dx)
ਗ Ӓܻӝ
ਗ Ӓܻӝ val x = radiusLimitPx * cos(degree) * -1
val y = radiusLimitPx * sin(degree) * -1
ਗ Ӓܻӝ MotionEvent.ACTION_MOVE -> { val dragPosX = it.x val
dragPosY = it.y val dx = (circleCenterPos.x - dragPosX).toDouble() val dy = (circleCenterPos.y - dragPosY).toDouble() val radPx = sqrt(dx.pow(2.0) + dy.pow(2.0)) val radMeter = radPx * naverMap.projection.metersPerPixel }
ਗ Ӓܻӝ if (radPx > radiusLimitPx) { //пب ҳೞӝ val
degree = atan2(dy, dx) val x = radiusLimitPx * cos(degree) * -1 val y = radiusLimitPx * sin(degree) * -1
ਗ Ӓܻӝ val circleCenterPx = naverMap.projection.toScreenLocation(circle.center) val latLng = naverMap.projection.fromScreenLocation(
PointF( x.toFloat() + circleCenterPx.x, y.toFloat() + circleCenterPx.y ) ) indicator.position = latLng circle.radius = radiusLimit
ਗ Ӓܻӝ else { circleMarker.position = naverMap.projection.fromScreenLocation(PointF(it.x, it.y)) circle.radius =
circle.center.distanceTo(circleMarker.position) }
ਗ Ӓܻӝ
ਗ Ӓܻӝ
пೣࣻ & Vector۽ ഥೞӝ Korea Android super.init(version=6)
ഥ “이미지를 핸들로 회전할 수 있게 해 주세요”
ഥ
ഥ
ഥ
ഥ
ഥ
ഥ ઁ 2 ࢎੋ ߨ
ഥ
ഥ
ഥ fun Offset.distanceTo(offset: Offset): Float = sqrt((this.x - offset.x).pow(2)
+ (this.y - offset.y).pow(2))
ഥ val a = touchPos.distanceTo(prevPos) val b = prevPos.distanceTo(imagePos)
val c = imagePos.distanceTo(touchPos) val cosA = (b.pow(2) + c.pow(2) - a.pow(2)) / (2 * b * c)
ഥ val currDegree = Math.toDegrees(acos(cosA).toDouble()).toFloat()
ഥ
ഥ
ഥ ҳೠ пبח ೦࢚ নࣻ ߑೱ হ
ഥ
߭ఠ ৻
߭ఠ ৻
߭ఠ ৻
߭ఠ ৻ fun Offset.toVectorOffset(offset: Offset) = Offset(offset.x - this.x, offset.y
- this.y) fun Offset.crossProduct(offset: Offset) = this.x * offset.y - this.y * offset.x
߭ఠ ৻ degree = Degree(degree.value + if (product < 0)
+currDegree else -currDegree)
߭ఠ ৻
݃ݴ Korea Android super.init(version=6)
ࣻ… જই࣑աਃ? 저는 별로…
ࣻ… જই࣑աਃ? ࣻҗ ೡࣻ۾ ҳഅ ևযפ.
хࢎפ
None