Slide 1

Slide 1 text

CONFIDENTIAL © DMM.com !LHNZTIJO QPUPUJQT 4VQQPSU-JCSBSZBMQIB SFDZDMFSWJFXTFMFDUJPO

Slide 2

Slide 2 text

© DMM.com X w LHNZTIJOఝٶ ͗͘Έ΍ w "OESPJEΤϯδχΞ w %..DPNϥϘ$50ࣨॴଐ w ೥݄͔Β ࣗݾ঺հ

Slide 3

Slide 3 text

© DMM.com X BHFOEB

Slide 4

Slide 4 text

© DMM.com X w SFDZDMFSWJFXTFMFDUJPOͱ͸ʁ w ࢖͍ํ w લ४උ w 4FMFDUJPO5SBDLFSΛ࡞Δ w બ୒ঢ়ଶΛ7JFXʹ൓ө͢Δ BHFOEB

Slide 5

Slide 5 text

© DMM.com X SFDZDMFSWJFXTFMFDUJPO ͱ͸ʁ

Slide 6

Slide 6 text

© DMM.com X TVQQPSUMJCSBSZBMQIB͔Β BMQIB͔Βಋೖ ΋ͪΖΜQSFWJFXͰ͢ ઌߦͯ͠ϦϦʔε͞Ε͍ͯΔBOESPJELUYͱಉ͡ ABOESPJEYAύοέʔδɻ ABOESPJEYA͸কདྷͷαϙʔτϥΠϒϥϦͰ࢖༻͞ΕΔ ύοέʔδͰ͢ɻ SFDZDMFSWJFXTFMFDUJPO͸ͦͷlকདྷͷαϙʔτϥΠϒϥ ϦzͷҰͭ

Slide 7

Slide 7 text

© DMM.com X ͲΜͳػೳʁ

Slide 8

Slide 8 text

© DMM.com X ࢖͍ํ

Slide 9

Slide 9 text

© DMM.com X લ४උ data class Book( val id: Long, val title: String, val subTitle: String ) ͜ͷ#PPLͷϦετΛෳ਺બ୒Ͱ͖ΔΑ͏ʹ͠·͢

Slide 10

Slide 10 text

© DMM.com X લ४උ 3FDZDMFS7JFXɺ7JFX)PMEFSɺ"EBQUFS͸Ұ୴௨ৗ௨Γ
 ͨͩɺTUBCMF*EΛ࢖͏Α͏ʹ͢Δ class BookAdapter( context: Context, private val bookList: List ) : RecyclerView.Adapter() { init { setHasStableIds(true) } : override fun getItemId(position: Int): Long = bookList[position].id : }

Slide 11

Slide 11 text

© DMM.com X લ४උ 3FDZDMFS7JFXɺ7JFX)PMEFSɺ"EBQUFS͸Ұ୴௨ৗ௨Γ
 ͨͩɺTUBCMF*EΛ࢖͏Α͏ʹ͢Δ class BookAdapter( context: Context, private val bookList: List ) : RecyclerView.Adapter() { init { setHasStableIds(true) } : override fun getItemId(position: Int): Long = bookList[position].id : }

Slide 12

Slide 12 text

© DMM.com X 4FMFDUJPO5SBDLFSΠϯελϯεΛ࡞Δ selectionTracker = SelectionTracker.Builder( "my-selection-id", binding.recyclerView, StableIdKeyProvider(binding.recyclerView), BookIdDetailsLookup(binding.recyclerView), StorageStrategy.createLongStorage()) .withOnItemActivatedListener { item, e -> Log.e("MainActivity", item.toString()) return@withOnItemActivatedListener true } .build()

Slide 13

Slide 13 text

© DMM.com X 4FMFDUJPO5SBDLFSΠϯελϯεΛ࡞Δ selectionTracker = SelectionTracker.Builder( "my-selection-id", binding.recyclerView, StableIdKeyProvider(binding.recyclerView), BookIdDetailsLookup(binding.recyclerView), StorageStrategy.createLongStorage()) .withOnItemActivatedListener { item, e -> Log.e("MainActivity", item.toString()) return@withOnItemActivatedListener true } .build() ୈҰҾ਺ɻϢχʔΫͳจࣈྻΛɻ #VOEMFʹೖΕΔ,FZͱͯ͠࢖ΘΕ·͢ɻ

Slide 14

Slide 14 text

© DMM.com X 4FMFDUJPO5SBDLFSΠϯελϯεΛ࡞Δ selectionTracker = SelectionTracker.Builder( "my-selection-id", binding.recyclerView, StableIdKeyProvider(binding.recyclerView), BookIdDetailsLookup(binding.recyclerView), StorageStrategy.createLongStorage()) .withOnItemActivatedListener { item, e -> Log.e("MainActivity", item.toString()) return@withOnItemActivatedListener true } .build() ୈೋҾ਺ɻ ֘౰ͷ3FDZDMFS7JFXΛࢦఆ͢Δɻ

Slide 15

Slide 15 text

© DMM.com X 4FMFDUJPO5SBDLFSΠϯελϯεΛ࡞Δ selectionTracker = SelectionTracker.Builder( "my-selection-id", binding.recyclerView, StableIdKeyProvider(binding.recyclerView), BookIdDetailsLookup(binding.recyclerView), StorageStrategy.createLongStorage()) .withOnItemActivatedListener { item, e -> Log.e("MainActivity", item.toString()) return@withOnItemActivatedListener true } .build() ୈࡾҾ਺ɻબ୒தͷΞΠςϜͱબ୒தͷLFZͷରԠΛղܾ͢ Δ*E,FZ1SPWJEFSΛࢦఆ͢Δɻࠓճͩͱ͋ΔTUBCMF*E CPPLJE ʹ͍ͨͯ͠ͲΕ͕ର৅ͷ#PPL͔ͷؔ܎Λղܾ͢Δɻ

Slide 16

Slide 16 text

© DMM.com X 4FMFDUJPO5SBDLFSΠϯελϯεΛ࡞Δ selectionTracker = SelectionTracker.Builder( "my-selection-id", binding.recyclerView, StableIdKeyProvider(binding.recyclerView), BookIdDetailsLookup(binding.recyclerView), StorageStrategy.createLongStorage()) .withOnItemActivatedListener { item, e -> Log.e("MainActivity", item.toString()) return@withOnItemActivatedListener true } .build() ୈ࢛Ҿ਺ɻ.PUJPO&WFOUΛ΋ͱʹࠓͲ͜ͷΞΠςϜΛબ୒ͯ͠ Δͷ͔Λղܾ͢ΔɻTUBCMF*E࢖༻࣌͸͚ͩࣗ͜͜࡞ɻ TUBCMF*Eඇ࢖༻࣌͸͚ͩ͜͜Ͱͳ͘*E,FZ1SPWJEFS΋ࣗ࡞͢Δɻ

Slide 17

Slide 17 text

© DMM.com X 4FMFDUJPO5SBDLFSΠϯελϯεΛ࡞Δ selectionTracker = SelectionTracker.Builder( "my-selection-id", binding.recyclerView, StableIdKeyProvider(binding.recyclerView), BookIdDetailsLookup(binding.recyclerView), StorageStrategy.createLongStorage()) .withOnItemActivatedListener { item, e -> Log.e("MainActivity", item.toString()) return@withOnItemActivatedListener true } .build() ୈޒҾ਺ɻ TBWFE4UBUFʹԿΛอ࣋͢Δͷ͔Λղܾ͢Δਓɻ *UFNΛ4FMFDUJPO΍#VOEMFʹม׵͢ΔϝιουΛ࣋ͭɻ

Slide 18

Slide 18 text

© DMM.com X 4FMFDUJPO5SBDLFSΠϯελϯεΛ࡞Δ selectionTracker = SelectionTracker.Builder( "my-selection-id", binding.recyclerView, StableIdKeyProvider(binding.recyclerView), BookIdDetailsLookup(binding.recyclerView), StorageStrategy.createLongStorage()) .withOnItemActivatedListener { item, e -> Log.e("MainActivity", item.toString()) return@withOnItemActivatedListener true } .build() ඞཁͩͬͨΒϦεφʔొ࿥ɻ

Slide 19

Slide 19 text

© DMM.com X #PPL*E%FUBJMT-PPLVQΛ࡞Δ class BookIdDetailsLookup( private val recyclerView: RecyclerView ) : ItemDetailsLookup() { override fun getItemDetails(e: MotionEvent): ItemDetails? = recyclerView.findChildViewUnder( e.x, e.y )?.let { (recyclerView.getChildViewHolder(it) as? BookViewHolder)?.getItemIdDetails() } } ୈࡾҾ਺ͩͬͨ#PPL*E%FUBJMT-PPLVQͷ࣮૷ɻ λονΠϕϯτͷ࠲ඪ͔Βɺ֘౰ͷΞΠςϜΛฦ͚ͩ͢ ͷγϯϓϧͳ࣮૷ɻ

Slide 20

Slide 20 text

© DMM.com X ͜͜·Ͱ࣮૷ͨ͠΋ͷΛݟͯΈΔ

Slide 21

Slide 21 text

© DMM.com X 7JFXʹબ୒ঢ়ଶ͔Ͳ͏͔Λ൓ө͢Δ class BookAdapter( context: Context, private val bookList: List ) : RecyclerView.Adapter() { ɿ override fun onBindViewHolder( holder: BookViewHolder, position: Int ) { val item = bookList[position] holder.bind( selectionChecker?.isSelected(item.id) ?: false, position, bookList[position] ) } } TFMFDUPSΛηοτ͓͍ͯͯ͠4FMFDUJPO5SBDLFSJT4FMFDUFEͷ݁ՌΛ 7JFXTFU"DUJWBUFEͰηοτ͢Δɻ

Slide 22

Slide 22 text

© DMM.com X 7JFXʹબ୒ঢ়ଶ͔Ͳ͏͔Λ൓ө͢Δ class BookAdapter( context: Context, private val bookList: List ) : RecyclerView.Adapter() { ɿ override fun onBindViewHolder( holder: BookViewHolder, position: Int ) { val item = bookList[position] holder.bind( selectionChecker?.isSelected(item.id) ?: false, position, bookList[position] ) } } TFMFDUPSΛηοτ͓͍ͯͯ͠4FMFDUJPO5SBDLFSJT4FMFDUFEͷ݁ՌΛ 7JFXTFU"DUJWBUFEͰηοτ͢Δɻ

Slide 23

Slide 23 text

© DMM.com X ׬੒ʂ

Slide 24

Slide 24 text

© DMM.com X ऴΘΓʹ

Slide 25

Slide 25 text

© DMM.com X ฐࣾϒϩάͰɺ΋͏গ͠ৄ͘͠঺հͯ͠·͢ IUUQTJOTJEFENNDPNFOUSZSFDZDMFSWJFXTFMFDUJPO

Slide 26

Slide 26 text

© DMM.com X αϯϓϧஔ͍ͯ·͢ɻ IUUQTHJUIVCDPNLHNZTIJOSFDZDMFSWJFXTFMFDUJPOTBNQMF ANBTUFSATUBCMFJEඇ࢖༻ϒϥϯν AVTF@TUBCMF@JEATUBCMFJE࢖༻ϒϥϯν

Slide 27

Slide 27 text

© DMM.com X ࠓि೔༵Կͯ͠·͔͢ʁ๩͍͠Ͱ͔͢ʁٕज़ॻయདྷͯ΋Β͍͍ͬͯͰ͔͢ʁ ؔ܎ͳ͍಺༰Ͱ͝ΊΜͳ͍͞ʂ ,6(*#",0ͱ͍͏αʔΫϧ໊Ͱग़ళ͠·͢ʂ͓࣌ؒ͋Ε͹ੋඇʂ IUUQTNPUJEBKBQBOIBUFOBCMPHDPNFOUSZ

Slide 28

Slide 28 text

͝੩ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠ɻ