Slide 1

Slide 1 text

Korea Android ࣻ೟ਵ۽ UI ਃҳࢎ೦ ݅઒ೞӝ MoonHwi Han super.init(version=6)

Slide 2

Slide 2 text

ࣻ೟… જইೞदաਃ? 저는 별로…

Slide 3

Slide 3 text

ࣻ೟… જইೞदաਃ?

Slide 4

Slide 4 text

ࣻ೟… જইೞदաਃ?

Slide 5

Slide 5 text

ࣻ೟… જইೞदաਃ?

Slide 6

Slide 6 text

Androidীח?

Slide 7

Slide 7 text

ࣻ೟ਸ ੉ਊೠ ҃೷ ઺, Ҋ١೟Ү ࣻ೟ਵ۽ ࢚ഐ੘ਊਸ ٜ݅ ࣻ ੓׮.

Slide 8

Slide 8 text

࢖пೣࣻ۽ ௼ӝ ઁযೞӝ Korea Android super.init(version=6)

Slide 9

Slide 9 text

ਗ Ӓܻӝ “지도 위에 반경을 그리는 기능을 만들어주세요”

Slide 10

Slide 10 text

ਗ Ӓܻӝ

Slide 11

Slide 11 text

ਗ Ӓܻӝ

Slide 12

Slide 12 text

ਗ Ӓܻӝ MotionEvent.ACTION_MOVE -> { val dragPosX = it.x val dragPosY = it.y }

Slide 13

Slide 13 text

ਗ Ӓܻӝ 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

Slide 14

Slide 14 text

ਗ Ӓܻӝ circle.radius = radMeter

Slide 15

Slide 15 text

ਗ Ӓܻӝ 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 }

Slide 16

Slide 16 text

ਗ Ӓܻӝ

Slide 17

Slide 17 text

ਗ Ӓܻӝ ߈૑ܴ rਸ 500m۽ ઁೠ

Slide 18

Slide 18 text

ਗ Ӓܻӝ indicatorח (x, y)о ইצ (x’, y’)ܳ ٮۄоঠ ೠ׮.

Slide 19

Slide 19 text

ਗ Ӓܻӝ

Slide 20

Slide 20 text

ਗ Ӓܻӝ

Slide 21

Slide 21 text

ਗ Ӓܻӝ

Slide 22

Slide 22 text

ਗ Ӓܻӝ val degree = atan2(dy, dx)

Slide 23

Slide 23 text

ਗ Ӓܻӝ

Slide 24

Slide 24 text

ਗ Ӓܻӝ val x = radiusLimitPx * cos(degree) * -1 val y = radiusLimitPx * sin(degree) * -1

Slide 25

Slide 25 text

ਗ Ӓܻӝ 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 }

Slide 26

Slide 26 text

ਗ Ӓܻӝ if (radPx > radiusLimitPx) { //пب ҳೞӝ val degree = atan2(dy, dx) val x = radiusLimitPx * cos(degree) * -1 val y = radiusLimitPx * sin(degree) * -1

Slide 27

Slide 27 text

ਗ Ӓܻӝ 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

Slide 28

Slide 28 text

ਗ Ӓܻӝ else { circleMarker.position = naverMap.projection.fromScreenLocation(PointF(it.x, it.y)) circle.radius = circle.center.distanceTo(circleMarker.position) }

Slide 29

Slide 29 text

ਗ Ӓܻӝ

Slide 30

Slide 30 text

ਗ Ӓܻӝ

Slide 31

Slide 31 text

࢖пೣࣻ & Vector۽ ഥ੹ೞӝ Korea Android super.init(version=6)

Slide 32

Slide 32 text

੉޷૑ ഥ੹ “이미지를 핸들로 회전할 수 있게 해 주세요”

Slide 33

Slide 33 text

੉޷૑ ഥ੹

Slide 34

Slide 34 text

੉޷૑ ഥ੹

Slide 35

Slide 35 text

੉޷૑ ഥ੹

Slide 36

Slide 36 text

੉޷૑ ഥ੹

Slide 37

Slide 37 text

੉޷૑ ഥ੹

Slide 38

Slide 38 text

੉޷૑ ഥ੹ ઁ 2 ௏ࢎੋ ߨ஗

Slide 39

Slide 39 text

੉޷૑ ഥ੹

Slide 40

Slide 40 text

੉޷૑ ഥ੹

Slide 41

Slide 41 text

੉޷૑ ഥ੹ fun Offset.distanceTo(offset: Offset): Float = sqrt((this.x - offset.x).pow(2) + (this.y - offset.y).pow(2))

Slide 42

Slide 42 text

੉޷૑ ഥ੹ 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)

Slide 43

Slide 43 text

੉޷૑ ഥ੹ val currDegree = Math.toDegrees(acos(cosA).toDouble()).toFloat()

Slide 44

Slide 44 text

੉޷૑ ഥ੹

Slide 45

Slide 45 text

੉޷૑ ഥ੹

Slide 46

Slide 46 text

੉޷૑ ഥ੹ ҳೠ пبח ೦࢚ নࣻ ߑೱ੉ হ਺

Slide 47

Slide 47 text

੉޷૑ ഥ੹

Slide 48

Slide 48 text

߭ఠ੄ ৻੸

Slide 49

Slide 49 text

߭ఠ੄ ৻੸

Slide 50

Slide 50 text

߭ఠ੄ ৻੸

Slide 51

Slide 51 text

߭ఠ੄ ৻੸ 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

Slide 52

Slide 52 text

߭ఠ੄ ৻੸ degree = Degree(degree.value + if (product < 0) +currDegree else -currDegree)

Slide 53

Slide 53 text

߭ఠ੄ ৻੸

Slide 54

Slide 54 text

݃஖ݴ Korea Android super.init(version=6)

Slide 55

Slide 55 text

ࣻ೟… જই૑࣑աਃ? 저는 별로…

Slide 56

Slide 56 text

ࣻ೟… જই૑࣑աਃ? ࣻ೟җ ஘ೡࣻ۾ ҳഅ੄ ಩੉ ևয૘פ׮.

Slide 57

Slide 57 text

хࢎ೤פ׮

Slide 58

Slide 58 text

No content