Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Famm Android改善記

Famm Android改善記

2023/3/22 Ebisu.mobile #1
スライド内に一部動画が含まれているので、YouTubeの閲覧をおすすめします。

akatsuki174

March 22, 2023
Tweet

More Decks by akatsuki174

Other Decks in Programming

Transcript

  1. Famm Android


    ٕज़ෛ࠴ղফه
    Ebisu.mobile #1


    @akatsuki174

    View full-size slide

  2. ֓ཁ
    • Android൛FammͰͲΜͳٕज़ෛ࠴͕͋ΓɺͲΜͳ
    ۤ࿑͕͋ͬͨͷ͔Λ঺հ


    • ΈΜͳͷ໾ʹཱͨͳ͍͜ͱʢݹ͍Ҩ࢈͕ͳ͍͜ͱʣ
    Λف͍ͬͯΔΑ…

    View full-size slide

  3. • Android/iOS/FlutterΤϯδχΞ


    • 1ࣇͷ฼


    • εϓϥτΡʔϯ3͸΋Έ͡ɹɹ
    γϡʔλʔ

    View full-size slide

  4. ThreeTenABPͷ࡟আ

    View full-size slide

  5. ThreeTenABPͱ͸
    • Java8͔Βಋೖ͞ΕͨDate and Time APIΛAndroid
    Ͱར༻ՄೳͳΑ͏ʹόοΫϙʔτͨ͠΋ͷ


    • ৄ͘͠͸ͪ͜ΒΛͲ͏ͧ


    • https://techblog.timers-inc.com/entry/
    2016/06/27/121939

    View full-size slide

  6. ࠩ͠ସ͑࡞ۀ
    • جຊతʹ͸org.threeten.bpΛjava.timeʹ͢Δ͚ͩ
    ͰOK

    View full-size slide

  7. ViewPager->


    ViewPager2΁ͷҠߦ

    View full-size slide

  8. ViewPagerʢ2ʣͱ͸
    • JetpackϥΠϒϥϦͷதͷ̍ͭ


    • ը໘εϫΠϓͰϏϡʔ΍ϑϥάϝϯτΛ੾Γସ͑Δ
    ͜ͱ͕Ͱ͖Δ

    View full-size slide

  9. Nested Scroll͕ޮ͔ͳ͍໰୊
    • ViewPagerͷதͰViewPagerΛ࢖͍ͬͯΔͱ͜Ζ͕
    ͋ͬͨ


    • ViewPagerͰ͸໰୊ͳ͔͕ͬͨɺViewPager2ʹ͠
    ͨͱ͜Ζ਌ͷεΫϩʔϧ͕༏ઌ͞Εͯ͠·͍ɺࢠͷ
    εΫϩʔϧ͕Ͱ͖ͳ͘ͳͬͯ͠·ͬͨ

    View full-size slide

  10. Nested Scroll͕ޮ͔ͳ͍໰୊
    IUUQTEFWFMPQFSBOESPJEDPNEFWFMPQVJWJFXTBOJNBUJPOTWQNJHSBUJPO IMFOOFTUFE
    TDSPMMBCMFT

    View full-size slide

  11. IUUQTHJUIVCDPNBOESPJEWJFXTXJEHFUTTBNQMFTCMPCNBTUFS7JFX1BHFSBQQTSDNBJOKBWB
    BOESPJEYWJFXQBHFSJOUFHSBUJPOUFTUBQQ/FTUFE4DSPMMBCMF)PTULU

    View full-size slide

  12. ࣍View͕νϥݟͤͰ͖ͳ͍໰୊
    • ԣεΫϩʔϧ͕Ͱ͖ΔΑ͏ʹͨ͠Pager෦෼Ͱى͖
    ͨ໰୊


    • ࣍ͷView͕νϥݟ͑͢ΔUIʹ͍ͯͨ͠͸͕ͣɺ࣍
    ͷView͕ݟ͑ͳ͍ঢ়ଶʹͳ͍ͬͯͨ

    View full-size slide

  13. ͦͷଞमਖ਼
    • Listener΍Adapter΋ViewPager2ʹ߹͏Α͏ʹमਖ਼

    View full-size slide

  14. ExoPlayerͷΞοϓσʔτ


    ʢr2.2.0->2.18.2ʣ

    View full-size slide

  15. ExoPlayerͱ͸
    • AndroidͰಈը΍ԻָΛѻ͏ͨΊͷMediaPlayer


    • FammͰ͸ಈը࠶ੜͷͨΊʹಋೖ͍ͯ͠Δ

    View full-size slide

  16. ϋϚΓϙΠϯτ
    • ͱʹ͔͘API͕͜Ζ͜ΖมΘΔ


    • ϚΠφʔόʔδϣϯΞοϓσʔτͰ΋มΘΔ


    • 2.4.0͔ΒSeekBar->DefaultTimeBarʹมΘͬͨ

    View full-size slide

  17. ExoPlayer->Jetpack Media3
    ΁ͷҠߦ


    ʢதࢭʣ

    View full-size slide

  18. Jetpack Media3ͱ͸
    • ಈըɺԻָ༻ͷϥΠϒϥϦ


    • ExoPlayer͕౷߹͞Ε͍ͯΔ


    • কདྷతʹ͸Media3΁ͷҠߦ͕ඞཁ

    View full-size slide

  19. IUUQTTQFBLFSEFDLDPNNJYJ@FOHJOFFSTOJBOOPEPOHIVB[BJTIFOHBQVSJOP[VPSJGBOH

    View full-size slide

  20. Ұ෦͏·͍͔͘ͳ͔ͬͨ
    • मਖ਼͕େ෯ʹඞཁͳՕॴ͸ͳ͘ɺجຊతʹ͸͏·͘
    ͍ͬͨ


    • ͕ɺҰ෦Ϙλϯλοϓʹ໰୊͕ൃੜͨ͠


    • ͷͪͷόʔδϣϯΞοϓͰมԽ͋Δ͔ͳ͊ͱࢥ͍
    ͍ͬͨΜอཹ

    View full-size slide

  21. IUUQTEFWFMPQFSBOESPJEDPNDPEFMBCTFYPQMBZFSJOUSP IMKB

    View full-size slide

  22. Glide->Coil΁ͷҠߦ


    ʢதࢭʣ

    View full-size slide

  23. Coilʹ͠Α͏ͱͨ͠
    • ͜Ε͔ΒJetpackComposeΛೖΕ͍͖͍ͯͨͷͰ
    Coilʹ͠Α͏ͱࢥͬͨ


    • ͕ɺCoil൛GlideFaceDetectionTransformationɹ
    ʢإͷҐஔΛத৺ʹBitmapΛੜ੒͢Δ
    Transformationʣ͕ݟ͔ͭΒͣɺͻͱ·ͣGlideΛ
    ࢖͍ଓ͚Δ͜ͱʹ

    View full-size slide

  24. ͱʹ͔͘Ξοϓσʔτ
    • όʔδϣϯ൪߸Λม͑Δ͚ͩͰOKͳϥΠϒϥϦ΋
    ؚΊͯͱʹ͔͘ݹ͍ϥΠϒϥϦΛΞοϓσʔτͨ͠


    • Kotlin΋JetpackComposeͷͨΊʹΞοϓσʔτ

    View full-size slide

  25. ༨ஊɿDependabot
    • Ξοϓσʔτ͕ೖ͍ͬͯΔϥΠϒϥϦ͕͋ͬͨΒࣗ
    ಈͰPRΛ࡞ͬͯ͘ΕΔ΍ͭ


    • GitHub্Ͱϙνϙν͢Δ͚ͩͰઃఆͰ͖Δ


    • νϟϯε͕͋Ε͹ೖΕͯΈ͔ͨͬͨ

    View full-size slide