Slide 1

Slide 1 text

%SPJE,BJHJΞϓϦͷ λΠϜςʔϒϧΛࢧ͑Δٕज़ !.PZVSV"J[BXB

Slide 2

Slide 2 text

MoyuruAizawa Moyuru Aizawa
 Software engineer of CATS Div. CyberAgent Inc. 
 Previously at Pairs Div. Eureka Inc.

Slide 3

Slide 3 text

%SPJE,BJHJDPOGFSFODFBQQ

Slide 4

Slide 4 text

%SPJE,BJHJDPOGFSFODFBQQ

Slide 5

Slide 5 text

5JNFUBCMF-BZPVUBMQIB3FMFBTFE

Slide 6

Slide 6 text

‣ 5JNFUBCMFΛදࣔ͢ΔͨΊͷ-BZPVU.BOBHFS ‣ ࣌ࠁΛදࣔ͢ΔͨΊͷ*UFN%FDPSBUJPO ‣ ΧϥϜ໊Λදࣔ͢ΔͨΊͷ*UFN%FDPSBUJPO ‣ ݱࡏ࣌ࠁΛදࣔ͢ΔͨΊͷ7JFXPS*UFN%FDPSBUJPO ࣮૷༧ఆ 5JNFUBCMF-BZPVU

Slide 7

Slide 7 text

‣ 3FDZDMFS7JFXͱ͸ ‣ -BZPVU.BOBHFSͱ͸ ‣ -BZPVU.BOBHFS͕΍͍ͬͯΔ͜ͱ ‣ 5JNFUBCMF-BZPVU.BOBHFSͷ࣮૷ "HFOEB

Slide 8

Slide 8 text

3FDZDMFS7JFXͱ͸

Slide 9

Slide 9 text

‣ ଟྔͷΞΠςϜΛදࣔ͢Δͷʹదͨ͠7JFX(SPVQ ‣ ը໘ʹදࣔ͞ΕΔ෼͚ͩΞΠςϜΛඳը͢Δ ‣ ֦ுੑ͕ߴ͍ ‣ %FDPSBUJPO ‣ "OJNBUJPO ‣ ʜ 3FDZDMFS7JFXͱ͸

Slide 10

Slide 10 text

‣ "EBQUFS ‣ -BZPVU.BOBHFS ‣ *UFN%FDPSBUJPO ‣ *UFN"OJNBUPS ‣ *UFN5PVDI)FMQFS ‣ 4OBQ)FMQFS ‣ 3FDZDMFE7JFX1PPM ‣ %JGG6UJM 3FDZDMFS7JFXͱ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JNBUJPOT ‣ ʜ 5JNFUBCMF-BZPVUʹ࣮૷༧ఆͷ΋ͷ ༏ઌ౓௿

Slide 24

Slide 24 text

-BZPVU.BOBHFSͷ࣮૷͸େม ΞϓϦͷཁ݅ʹ͋ΘͤͯػೳΛݶఆ͢Ε͹ଟগ͸ָʹͳΔ
 ͦΕͰ΋׳Ε͍ͯͳ͚Ε͹݁ߏ͔͔࣌ؒΔ͔΋

Slide 25

Slide 25 text

-BZPVU.BOBHFS͕΍͍ͬͯΔ͜ͱ

Slide 26

Slide 26 text

‣ PO-BZPVU$IJMESFO ‣ QFSJPETͷ৘ใऩू ‣ JOJUJBMMBZPVU ‣ TDSPMM7FSUJDBMMZ#ZTDSPMM)PSJ[POUBMMZ#Z ‣ DIJMEWJFXTͷҠಈ ‣ ݟ͑ͳ͘ͳͬͨDIJMEWJFXΛSFNPWF ‣ ۭ͖εϖʔεʹDIJMEWJFXΛBEE -BZPVU.BOBHFS͕΍͍ͬͯΔ͜ͱ ͬ͘͟Γ

Slide 27

Slide 27 text

PO-BZPVU$IJMESFO ‣ ϨΠΞ΢τͷॳظԽ ‣ ը໘ʹදࣔ͞ΕΔ෼͚ͩWJFXΛ഑ஔ ͍ͯ͘͠

Slide 28

Slide 28 text

PO-BZPVU$IJMESFO ‣ ϨΠΞ΢τͷॳظԽ ‣ ը໘ʹදࣔ͞ΕΔ෼͚ͩWJFXΛ഑ஔ ͍ͯ͘͠

Slide 29

Slide 29 text

TDSPMM7FSUJDBMMZ#Z ‣ WJFXΛεϥΠυͤ͞Δ ‣ ݟ͑ͳ͘ͳͬͨWJFXΛফ͢ ‣ ۭ͖εϖʔεʹWJFXΛ௥Ճ͢Δ

Slide 30

Slide 30 text

TDSPMM7FSUJDBMMZ#Z ‣ WJFXΛεϥΠυͤ͞Δ ‣ ݟ͑ͳ͘ͳͬͨWJFXΛফ͢ ‣ ۭ͖εϖʔεʹWJFXΛ௥Ճ͢Δ

Slide 31

Slide 31 text

TDSPMM7FSUJDBMMZ#Z ‣ WJFXΛεϥΠυͤ͞Δ ‣ ݟ͑ͳ͘ͳͬͨWJFXΛফ͢ ‣ ۭ͖εϖʔεʹWJFXΛ௥Ճ͢Δ

Slide 32

Slide 32 text

TDSPMM7FSUJDBMMZ#Z ‣ WJFXΛεϥΠυͤ͞Δ ‣ ݟ͑ͳ͘ͳͬͨWJFXΛফ͢ ‣ ۭ͖εϖʔεʹWJFXΛ௥Ճ͢Δ

Slide 33

Slide 33 text

TDSPMM)PSJ[POUBMMZ#Z ‣ WJFXΛεϥΠυͤ͞Δ ‣ ݟ͑ͳ͘ͳͬͨWJFXΛফ͢ ‣ ۭ͖εϖʔεʹWJFXΛ௥Ճ͢Δ

Slide 34

Slide 34 text

TDSPMM)PSJ[POUBMMZ#Z ‣ WJFXΛεϥΠυͤ͞Δ ‣ ݟ͑ͳ͘ͳͬͨWJFXΛফ͢ ‣ ۭ͖εϖʔεʹWJFXΛ௥Ճ͢Δ

Slide 35

Slide 35 text

TDSPMM)PSJ[POUBMMZ#Z ‣ WJFXΛεϥΠυͤ͞Δ ‣ ݟ͑ͳ͘ͳͬͨWJFXΛফ͢ ‣ ۭ͖εϖʔεʹWJFXΛ௥Ճ͢Δ

Slide 36

Slide 36 text

TDSPMM)PSJ[POUBMMZ#Z ‣ WJFXΛεϥΠυͤ͞Δ ‣ ݟ͑ͳ͘ͳͬͨWJFXΛফ͢ ‣ ۭ͖εϖʔεʹWJFXΛ௥Ճ͢Δ

Slide 37

Slide 37 text

5JNFUBCMF-BZPVU.BOBHFSͷ࣮૷

Slide 38

Slide 38 text

5JNFUBCMF-BZPVU.BOBHFSͷ࣮૷ PO-BZPVU$IJMESFO

Slide 39

Slide 39 text

(0 until itemCount).forEach { val periodInfo = periodLookUp(it) val column = columns.getOrPut(periodInfo.columnNumber) { ArrayList() } val period = Period( TimeUnit.MILLISECONDS.toMinutes(periodInfo.startUnixMillis).toInt(), TimeUnit.MILLISECONDS.toMinutes(periodInfo.endUnixMillis).toInt(), periodInfo.columnNumber, adapterPosition = it, positionInColumn = column.size ) periods.add(period) column.add(period) if (it == 0) { firstStartUnixMin = period.startUnixMin lastEndUnixMin = period.endUnixMin } else { firstStartUnixMin = min(period.startUnixMin, firstStartUnixMin) lastEndUnixMin = max(period.endUnixMin, lastEndUnixMin) } } ֤QFSJPEͷ৘ใऩू

Slide 40

Slide 40 text

(0 until itemCount).forEach { val periodInfo = periodLookUp(it) val column = columns.getOrPut(periodInfo.columnNumber) { ArrayList() } val period = Period( TimeUnit.MILLISECONDS.toMinutes(periodInfo.startUnixMillis).toInt(), TimeUnit.MILLISECONDS.toMinutes(periodInfo.endUnixMillis).toInt(), periodInfo.columnNumber, adapterPosition = it, positionInColumn = column.size ) periods.add(period) column.add(period) if (it == 0) { firstStartUnixMin = period.startUnixMin lastEndUnixMin = period.endUnixMin } else { firstStartUnixMin = min(period.startUnixMin, firstStartUnixMin) lastEndUnixMin = max(period.endUnixMin, lastEndUnixMin) } } ֤QFSJPEͷ৘ใऩू

Slide 41

Slide 41 text

(0 until itemCount).forEach { val periodInfo = periodLookUp(it) val column = columns.getOrPut(periodInfo.columnNumber) { ArrayList() } val period = Period( TimeUnit.MILLISECONDS.toMinutes(periodInfo.startUnixMillis).toInt(), TimeUnit.MILLISECONDS.toMinutes(periodInfo.endUnixMillis).toInt(), periodInfo.columnNumber, adapterPosition = it, positionInColumn = column.size ) periods.add(period) column.add(period) if (it == 0) { firstStartUnixMin = period.startUnixMin lastEndUnixMin = period.endUnixMin } else { firstStartUnixMin = min(period.startUnixMin, firstStartUnixMin) lastEndUnixMin = max(period.endUnixMin, lastEndUnixMin) } } ֤QFSJPEͷ৘ใऩू

Slide 42

Slide 42 text

anchor.leftColumn = 0 val columnCount = columns.size() val offsetY = parentTop var offsetX = parentLeft for (columnNumber in 0 until columnCount) { offsetX += addColumn( columns[columnNumber].first(), offsetX, offsetY, true, recycler) anchor.rightColumn = columnNumber if (offsetX > parentRight) break } *OJUJBMMBZPVU

Slide 43

Slide 43 text

val range = startPeriod.positionInColumn until column.size for (i in range) { val period = column[i] val (width, height) = addPeriod(period, direction, offsetX, offsetY, recycler) offsetY += height columnWidth = width if (i == startPeriod.positionInColumn) anchor.top.put(columnNum, period.adapterPosition) anchor.bottom.put(columnNum, period.adapterPosition) if (offsetY > parentBottom) break } *OJUJBMMBZPVU

Slide 44

Slide 44 text

val range = startPeriod.positionInColumn until column.size for (i in range) { val period = column[i] val (width, height) = addPeriod(period, direction, offsetX, offsetY, recycler) offsetY += height columnWidth = width if (i == startPeriod.positionInColumn) anchor.top.put(columnNum, period.adapterPosition) anchor.bottom.put(columnNum, period.adapterPosition) if (offsetY > parentBottom) break } *OJUJBMMBZPVU

Slide 45

Slide 45 text

anchor.leftColumn = 0 val columnCount = columns.size() val offsetY = parentTop var offsetX = parentLeft for (columnNumber in 0 until columnCount) { offsetX += addColumn( columns[columnNumber].first(), offsetX, offsetY, true, recycler) anchor.rightColumn = columnNumber if (offsetX > parentRight) break } *OJUJBMMBZPVU

Slide 46

Slide 46 text

5JNFUBCMF-BZPVU.BOBHFSͷ࣮૷ TDSPMM7FSUJDBMMZ#Z

Slide 47

Slide 47 text

val bottomView = findBottomView() ?: return 0 val period = periods.getOrNull(bottomView.adapterPosition) ?: return 0 val bottom = getDecoratedBottom(bottomView) if (period.endUnixMin == lastEndUnixMin) if (bottom == parentBottom) 0 else min(dy, bottom - parentBottom) else dy εΫϩʔϧྔͷܭࢉ

Slide 48

Slide 48 text

val bottomView = findBottomView() ?: return 0 val period = periods.getOrNull(bottomView.adapterPosition) ?: return 0 val bottom = getDecoratedBottom(bottomView) if (period.endUnixMin == lastEndUnixMin) if (bottom == parentBottom) 0 else min(dy, bottom - parentBottom) else dy εΫϩʔϧྔͷܭࢉ

Slide 49

Slide 49 text

val bottomView = findBottomView() ?: return 0 val period = periods.getOrNull(bottomView.adapterPosition) ?: return 0 val bottom = getDecoratedBottom(bottomView) if (period.endUnixMin == lastEndUnixMin) if (bottom == parentBottom) 0 else min(dy, bottom - parentBottom) else dy εΫϩʔϧྔͷܭࢉ

Slide 50

Slide 50 text

val bottomView = findBottomView() ?: return 0 val period = periods.getOrNull(bottomView.adapterPosition) ?: return 0 val bottom = getDecoratedBottom(bottomView) if (period.endUnixMin == lastEndUnixMin) if (bottom == parentBottom) 0 else min(dy, bottom - parentBottom) else dy εΫϩʔϧྔͷܭࢉ

Slide 51

Slide 51 text

override fun scrollVerticallyBy( dy: Int, recycler: Recycler, state: State ): Int { if (dy == 0) return 0 val actualDy = calculateVerticallyScrollAmount(dy) if (actualDy == 0) return 0 offsetChildrenVertical(-actualDy) … } $IJMEWJFXTͷҠಈ

Slide 52

Slide 52 text

override fun scrollVerticallyBy( dy: Int, recycler: Recycler, state: State ): Int { if (dy == 0) return 0 val actualDy = calculateVerticallyScrollAmount(dy) if (actualDy == 0) return 0 offsetChildrenVertical(-actualDy) … } $IJMEWJFXTͷҠಈ

Slide 53

Slide 53 text

(anchor.leftColumn..anchor.rightColumn) .forEach { columnNum -> val column = columns[columnNum] val top = periods[anchor.top[columnNum]] val bottom = periods[anchor.bottom[columnNum]] column.subList( top.positionInColumn, bottom.positionInColumn ).forEach { val view = findViewByPosition(it.adapterPosition)?: return if (getDecoratedBottom(view) >= parentTop) return removeAndRecycleView(view, recycler) val belowPosition = column[it.positionInColumn + 1] .adapterPosition anchor.top.put(columnNum, belowPosition) } } ը໘͔ΒͰͨDIJMEWJFXͷ࡟আ

Slide 54

Slide 54 text

(anchor.leftColumn..anchor.rightColumn) .forEach { columnNum -> val column = columns[columnNum] val top = periods[anchor.top[columnNum]] val bottom = periods[anchor.bottom[columnNum]] column.subList( top.positionInColumn, bottom.positionInColumn ).forEach { val view = findViewByPosition(it.adapterPosition)?: return if (getDecoratedBottom(view) >= parentTop) return removeAndRecycleView(view, recycler) val belowPosition = column[it.positionInColumn + 1] .adapterPosition anchor.top.put(columnNum, belowPosition) } } ը໘͔ΒͰͨDIJMEWJFXͷ࡟আ

Slide 55

Slide 55 text

(anchor.leftColumn..anchor.rightColumn) .forEach { columnNum -> val column = columns[columnNum] val top = periods[anchor.top[columnNum]] val bottom = periods[anchor.bottom[columnNum]] column.subList( top.positionInColumn, bottom.positionInColumn ).forEach { val view = findViewByPosition(it.adapterPosition)?: return if (getDecoratedBottom(view) >= parentTop) return removeAndRecycleView(view, recycler) val belowPosition = column[it.positionInColumn + 1] .adapterPosition anchor.top.put(columnNum, belowPosition) } } ը໘͔ΒͰͨDIJMEWJFXͷ࡟আ

Slide 56

Slide 56 text

(anchor.leftColumn..anchor.rightColumn) .forEach { columnNum -> val column = columns[columnNum] val top = periods[anchor.top[columnNum]] val bottom = periods[anchor.bottom[columnNum]] column.subList( top.positionInColumn, bottom.positionInColumn ).forEach { val view = findViewByPosition(it.adapterPosition)?: return if (getDecoratedBottom(view) >= parentTop) return removeAndRecycleView(view, recycler) val belowPosition = column[it.positionInColumn + 1] .adapterPosition anchor.top.put(columnNum, belowPosition) } } ը໘͔ΒͰͨDIJMEWJFXͷ࡟আ

Slide 57

Slide 57 text

(anchor.leftColumn..anchor.rightColumn) .forEach { columnNum -> val column = columns[columnNum] val top = periods[anchor.top[columnNum]] val bottom = periods[anchor.bottom[columnNum]] column.subList( top.positionInColumn, bottom.positionInColumn ).forEach { val view = findViewByPosition(it.adapterPosition)?: return if (getDecoratedBottom(view) >= parentTop) return removeAndRecycleView(view, recycler) val belowPosition = column[it.positionInColumn + 1] .adapterPosition anchor.top.put(columnNum, belowPosition) } } ը໘͔ΒͰͨDIJMEWJFXͷ࡟আ

Slide 58

Slide 58 text

anchor.bottom.forEach { columnNum, position -> val view = findViewByPosition(position) ?: return@forEach val bottom = getDecoratedBottom(view) if (bottom < parentBottom) { val left = getDecoratedLeft(view) val period = periods.getOrNull(position) ?: return@forEach val nextPeriod = columns.get(columnNum) .getOrNull(period.positionInColumn + 1) ?: return@forEach addPeriodsToColumn(nextPeriod, left, bottom, true, recycler) } } ۭ͖εϖʔεʹWJFXΛ௥Ճ

Slide 59

Slide 59 text

anchor.bottom.forEach { columnNum, position -> val view = findViewByPosition(position) ?: return@forEach val bottom = getDecoratedBottom(view) if (bottom < parentBottom) { val left = getDecoratedLeft(view) val period = periods.getOrNull(position) ?: return@forEach val nextPeriod = columns.get(columnNum) .getOrNull(period.positionInColumn + 1) ?: return@forEach addPeriodsToColumn(nextPeriod, left, bottom, true, recycler) } } ۭ͖εϖʔεʹWJFXΛ௥Ճ

Slide 60

Slide 60 text

anchor.bottom.forEach { columnNum, position -> val view = findViewByPosition(position) ?: return@forEach val bottom = getDecoratedBottom(view) if (bottom < parentBottom) { val left = getDecoratedLeft(view) val period = periods.getOrNull(position) ?: return@forEach val nextPeriod = columns.get(columnNum) .getOrNull(period.positionInColumn + 1) ?: return@forEach addPeriodsToColumn(nextPeriod, left, bottom, true, recycler) } } ۭ͖εϖʔεʹWJFXΛ௥Ճ

Slide 61

Slide 61 text

anchor.bottom.forEach { columnNum, position -> val view = findViewByPosition(position) ?: return@forEach val bottom = getDecoratedBottom(view) if (bottom < parentBottom) { val left = getDecoratedLeft(view) val period = periods.getOrNull(position) ?: return@forEach val nextPeriod = columns.get(columnNum) .getOrNull(period.positionInColumn + 1) ?: return@forEach addPeriodsToColumn(nextPeriod, left, bottom, true, recycler) } } ۭ͖εϖʔεʹWJFXΛ௥Ճ

Slide 62

Slide 62 text

5JNFUBCMF-BZPVU.BOBHFSͷ࣮૷ ͜Μͳײ͡ʹͻͨ͢ΒੵΈ໦Λ͍ͯ͘͠ɻ

Slide 63

Slide 63 text

·ͱΊ

Slide 64

Slide 64 text

‣ 3FDZDMFS7JFX͍ͧ͢͝ ‣ -BZPVU.BOBHFS͍ͧ͢͝ ‣ -BZPVU.BOBHFSେมͩͧ ‣ ΞϓϦͷཁ݅ʹΑͬͯ͸ଟগΒͩͧ͘ ·ͱΊ