439 Views
February 28, 20
スライド概要
2020年1月30日(木)に、ヤフー大阪オフィスで「Mix Leap Study #57 - iOS & Android勉強会」を開催しました。
「PayPayフリマ」「Yahoo!天気」のAndroidアプリ、そして社内の研究開発から生まれたGPS不要の屋内ナビゲーション手法「SCAN」のiOSアプリを開発する3組のエンジニア・デザイナーが、その開発ノウハウを語りました。
イベントの詳細については、下記connpassページをご覧ください。
https://yahoo-osaka.connpass.com/event/159924/
2023年10月からSpeaker Deckに移行しました。最新情報はこちらをご覧ください。 https://speakerdeck.com/lycorptech_jp
Mix Leap Study #57 iOS & Android Android Copyright© 2020 Yahoo Japan Corporation. All Rights Reserved.
OHMAE Ryosuke) • • Qiita: @ryo_mm2d • Github: https://github.com/ohmae/ • • • DroidKaigi 2020 • Android Copyright© 2020 Yahoo Japan Corporation. All Rights Reserved. Yahoo!
Android Yahoo! Copyright© 2020 Yahoo Japan Corporation. All Rights Reserved.
Copyright© 2020 Yahoo Japan Corporation. All Rights Reserved.
Let’s Install https://play.google.com/store/apps/details?id=jp.co.yahoo.android.weather.type1 Copyright© 2020 Yahoo Japan Corporation. All Rights Reserved.
Android Let’s Install https://play.google.com/store/apps/details?id=jp.co.yah oo.android.weather.type1 Copyright© 2020 Yahoo Japan Corporation. All Rights Reserved. iOS https://apps.apple.com/jp/app/id521974902
Android Yahoo! Copyright© 2020 Yahoo Japan Corporation. All Rights Reserved.
Copyright© 2020 Yahoo Japan Corporation. All Rights Reserved.
•8 →17 • •1 48 • • • • Copyright© 2020 Yahoo Japan Corporation. All Rights Reserved. →72
Copyright© 2020 Yahoo Japan Corporation. All Rights Reserved.
• • • • • • Copyright© 2020 Yahoo Japan Corporation. All Rights Reserved.
Copyright© 2020 Yahoo Japan Corporation. All Rights Reserved.
• • • • Copyright© 2020 Yahoo Japan Corporation. All Rights Reserved.
• • • Copyright© 2020 Yahoo Japan Corporation. All Rights Reserved.
Copyright© 2020 Yahoo Japan Corporation. All Rights Reserved.
• • • • Copyright© 2020 Yahoo Japan Corporation. All Rights Reserved.
• • • • Copyright© 2020 Yahoo Japan Corporation. All Rights Reserved.
• • • • X Copyright© 2020 Yahoo Japan Corporation. All Rights Reserved.
View Copyright© 2020 Yahoo Japan Corporation. All Rights Reserved.
Android • onTouchEvent() • View :true • onInterceptTouchEvent() • ViewGroup • • dispatchTouchEvent() • Copyright© 2020 Yahoo Japan Corporation. All Rights Reserved. :true
Android ViewGroup ViewGroup ① intercept View ② intercept Copyright© 2020 Yahoo Japan Corporation. All Rights Reserved. touch dispatch dispatch dispatch ④ touch ⑤ touch ③ true
Android • View • • ViewGroup • Copyright© 2020 Yahoo Japan Corporation. All Rights Reserved.
• • • Copyright© 2020 Yahoo Japan Corporation. All Rights Reserved.
• • • • Copyright© 2020 Yahoo Japan Corporation. All Rights Reserved.
• • • • • Copyright© 2020 Yahoo Japan Corporation. All Rights Reserved.
• • → Copyright© 2020 Yahoo Japan Corporation. All Rights Reserved.
Copyright© 2020 Yahoo Japan Corporation. All Rights Reserved.
Copyright© 2020 Yahoo Japan Corporation. All Rights Reserved.
private val touchSlop: Float = ViewConfiguration.get(context).scaledTouchSlop.toFloat()
override fun onInterceptTouchEvent(event: MotionEvent): Boolean {
when (event.action) {
MotionEvent.ACTION_DOWN -> {
ViewPager
startX = event.x
Intercept
findParentViewPager(parent)
?.requestDisallowInterceptTouchEvent(true)
}
X
MotionEvent.ACTION_MOVE -> {
val dx = event.x - startX
if (abs(dx) >= touchSlop) {
parent.requestDisallowInterceptTouchEvent(true)
listener?.invoke(dx < 0)
return true
Intercept
}
}
}
return false
}
Copyright© 2020 Yahoo Japan Corporation. All Rights Reserved.
• • • • Yahoo! Copyright© 2020 Yahoo Japan Corporation. All Rights Reserved.
Yahoo! Copyright© 2020 Yahoo Japan Corporation. All Rights Reserved.