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

Android Transition

takahirom
February 15, 2017

Android Transition

takahirom

February 15, 2017
Tweet

More Decks by takahirom

Other Decks in Programming

Transcript

  1. 5SBOTJUJPOהכ ˖ ًٔحز ˖ ֿ׸׾갹䓸׷הְ׹׿זوذٔ،ٕرؠ ؎ٝך،صً٦ءָّٝ㹋鄲דֹ׷
 ̔(PPHMFךوذٔ،ٕرؠ؎ٝך⿫罋 㹋鄲ך1MBJEד׮׋ֻׁ׿ⵃ欽ׁ׸גְ׷ ˖ "1*-FWFM

    "OESPJE  ˖ 4VQQPSU-JCSBSZד׮⢪ִ׷״ֲחז׏׋ך ד"1*-FWFM  תד⢪ִ׷
 植朐駈׶זְ堣腉ָⶴה㢳ְ (PPHMFͷ044 1MBJEΞϓϦΑΓ
  2. 5SBOTJUJPOך珏겲 ˖ ⽃♧ך5SBOTJUJPO ˖ 'BEF鷲僇䏝ך،صً٦ءָّٝדֹ׷ ˖ $IBOHF#PVOET7JFXך⹛ֹה7JFXך㣐ֹׁךٔ؟؎ؤ ˖ זוזו ˖

    5SBOTJUJPO4FUְֻ̔אַろ׭׵׸׷ ˖ "VUP5SBOTJUJPO⡦׮5SBOTJUJPO׾䭷㹀׃זְ儗ךرؿٕؓزך 5SBOTJUJPOկ$IBOHF#PVOETה'BEFָろת׸גְ׷ ˖ $VTUPN5SBOTJUJPO荈ⴓד㹀纏׃׋5SBOTJUJPO
  3. 5SBOTJUJPOך⡲䧭倯岀 ɾίʔυ͔Βੜ੒ final Transition transition = new ChangeBounds() .setDuration(350) .setInterpolator(new

    FastOutSlowInInterpolator()); ˖ YNMַ׵欰䧭 Transition transition = TransitionInflater .from(context) .inflateTransition(R.transition.change_bounds); // res/transition/change_bounds.xml <?xml version="1.0" encoding="utf-8"?> <changeBounds xmlns:android="http://schemas.android.com/apk/res/ android" android:duration="350" android:interpolator=“@android:interpolator/fast_out_slow_in" />
  4. 5SBOTJUJPO׾ؕأةو؎ؤ ˖ 5SBOTJUJPOBEE5BSHFU 7JFXװJEזו 
 ،صً٦ءّׅٝ׷7JFX׾せ⵸זודⵖꣲׅ׷ ˖ 5SBOTJUJPOTFU1BUI.PUJPOזו׾⢪ִל嘴ⰼ䕎ך،صً٦ءّٝ ׮〳腉 "1*-FWFM

     ˖ ،صً٦ءّٝ禸ך%VSBUJPOװ*OUFSQPMBUPSזו׮♧鸐׶⢪ִ׷ final Transition transition = new ChangeBounds() .setDuration(350) .setInterpolator(new FastOutSlowInInterpolator()); transition.setPathMotion(new ArcMotion());
  5. 4DFOF׾⢪ֲ // Transition࡞੒ final Transition transition = TransitionInflater .from(context) .inflateTransition(R.transition.transition_arc);

    // TransitionΛར༻ͯ͠scene2ʹભҠ TransitionManager.go(arcScene1, transition); 鼂獳儗ח5SBOTJUJPO׾䭷㹀דֹ׷
  6. 5SBOTJUJPO.BOBHFSCFHJO %FMBZFE5SBOTJUJPO ˖ ➬穈׫ ˖ CFHJO%FMBZFE5SBOTJUJPOًاحسָㄎל׸׋儗׾剑ⴱך4DFOFה׃ծ ˖ ٖ؎،ؐزך㢌刿ד7JFXSFRVFTU-BZPVU ָㄎל׸׷ ˖

    如ח0O1SF%SBX-JTUFOFSPO1SF%SBX ָㄎל׸׋儗׾如ך4DFOFהׅ׷䠬ׄד㹋鄲ׁ ׸גְ׷ 㹋ꥷחכ4DFOFכ⢪׻זְ 5SBOTJUJPO.BOBHFSCFHJO %FMBZFE5SBOTJUJPO TDFOF 0O1SF%SBX-JTUFOFS PO1SF%SBX WJFXTFU-BZPVU1BSBNT TDFOF "VUP5SBOTJUJPO
  7. 4IBSFE&MFNFOU5SBOTJUJPO ך➬穈׫  EFDPS7JFXOE/BNFE7JFXT TIBSFE&MFNFOUT דUSBOTJUJPO/BNFָאְ׋7JFX׾Ⰻג《׶⳿ׅ &OUFS5SBOTJUJPO$PPSEJOBUPS   植㖈ךٖ؎،ؐزך7JFXך⡘縧׾⥂㶷

    "DUJWJUZ5SBOTJUJPO$PPSEJOBUPS   "DUJWJUZ鼂獳ד床׏גֹ׋#VOEMFח״׶ծ⯋ךٖ؎،ؐزך⡘縧ד7JFXMBZPVU ׾ㄎן⳿ׅ "DUJWJUZ5SBOTJUJPO$PPSEJOBUPS   5SBOTJUJPO.BOBHFSCFHJO%FMBZFE5SBOTJUJPO ׾5SBOTJUJPO׾䭷㹀׃גㄎן⳿ׅ &OUFS5SBOTJUJPO$PPSEJOBUPS   ⯋ך⥂㶷׃גְֶ׋7JFXך⡘縧ד7JFXMBZPVU ׾ㄎן⳿ׅ "DUJWJUZ5SBOTJUJPO$PPSEJOBUPS 5SBOTJUJPO.BOBHFSCFH JO%FMBZFE5SBOTJUJPO TDFOF ભҠݩͷ7JFXͷҐஔ 0O1SF%SBX-JTUFOFS PO1SF%SBX WJFXMBZPVU MFGU  UPQ SJHIU CPUUPN TDFOF ભҠઌͷ7JFXͷҐஔ ࢦఆͨ͠5SBOTJUJPO WJFXMBZPVU MFGU  UPQ SJHIU CPUUPN [ݺ͹ΕͨଆͷActivityͷ಺෦ͷॲཧ(API Level 25ͷίʔυΑΓ)] ؒҧ͍ͬͯͨΒίϝϯτ͍ͩ͘͞
  8. ֿֿתדד⳿勻׷ֿה <?xml version="1.0" encoding="utf-8"?> <transitionSet xmlns:android="http://schemas.android.com/apk/res/and xmlns:app="http://schemas.android.com/apk/res-auto" android:duration="375" android:interpolator="@android:interpolator/fast_out_slow_in"> <changeBounds

    /> <fade android:duration="150" android:startDelay="75"> <targets> <target android:targetName="all_content_element_nonshare_te </targets> </fade> </transitionSet> 5SBOTJUJPOʹམͱ͠ࠐΊΔ
  9. ⿫罋项俱 ˖ "OJNBUJOH7JFXT6TJOH4DFOFTBOE5SBOTJUJPOTIUUQTEFWFMPQFSBOESPJEDPNUSBJOJOH USBOTJUJPOTJOEFYIUNM ˖ %FW#ZUFIUUQTXXXZPVUVCFDPNXBUDI GFBUVSFQMBZFS@FNCFEEFEW4)O+2B% ˖ ⹛ַׅ %FW'FTU,BOTBJ

    IUUQZBSBLJHJUIVCJPTMJEFTEFWGFTULBOTBJ JOEFYIUNM ˖ 5SBOTJUJPOTJOUIF"OESPJE4VQQPSU-JCSBSZIUUQTNFEJVNDPNHPPHMFEFWFMPQFST USBOTJUJPOTJOUIFBOESPJETVQQPSUMJCSBSZCDBEFGFTVIE ˖ BOESPJEVJUPPMLJUEFNPTIUUQTHJUIVCDPNHPPHMFBOESPJEVJUPPMLJUEFNPT ˖ 4VQQPSU-JCSBSZGPS5SBOTJUJPOT0WFSWJFXBOEDPNQBSJTPOXJUI5SBOTJUJPOT&WFSZXIFSF IUUQTNFEJVNDPN!BOELVMJLPWTVQQPSUMJCSBSZGPSUSBOTJUJPOTPWFSWJFXBOE DPNQBSJTPODCFDGDCVED[ONVZ