Pro Yearly is on sale from $80 to $50! »

Encouragement of ListView

Encouragement of ListView

Introduction of Titanium 3.1 ListView

Dd17014e380450cfed5d55ff20fa3dfd?s=128

Ryutaro Miyashita

July 14, 2013
Tweet

Transcript

  1. 5JUBOJVN΋͘΋͘ձJO/*'5: -JTU7JFXͷεεϝ 5BCMF7JFXͱ͸Ұମͳʹ͕ҟͳΔͷ͔

  2. 3ZVUBSP.JZBTIJUB $IBU8PSL.PCJMF"QQ&OHJOFFS 5JUBOJVN.PCJMFϢʔβʔձॻه    SZVHPP@ SZVUBSPNJZBTIJUB SZVHPP 

    JNUIJOLFSOFU 5JUBOJVN΋͘΋͘ձJO/*'5:
  3. 5JUBOJVN΋͘΋͘ձJO/*'5: ࠓळɺϞόΠϧΞϓϦΛશ໘ϦχϡʔΞϧ 5JUBOJVN΋͘΋͘ձJO/*'5:

  4. ύϑΥʔϚϯε 5JUBOJVN΋͘΋͘ձJO/*'5: 5JUBOJVNΞϓϦͰ೰·͞ΕΔ՝୊ͷͭ

  5. 5J6*5BCMF7JFX 5JUBOJVN΋͘΋͘ձJO/*'5: ΈΜͳେ޷͖͍ͬͺ͍࢖͏

  6. ࣮͸ੑೳʷ 5JUBOJVN΋͘΋͘ձJO/*'5: ෼͔ͬͯΔͳ "OESPJEͳ 

  7. Ȓ 5JUBOJVN΋͘΋͘ձJO/*'5: ࢒೦ɺզʑͷ5JUBOJVN͸ऴΘͬͯ͠·ͬͨ

  8. 5JUBOJVN΋͘΋͘ձJO/*'5: ʘʘaaᵋ Т ʯʗʗ ͦΜͳ5JUBOJVNʹٹੈओ͕ ʘʘaaᵋ Т ʯʗʗ 5JUBOJVN΋͘΋͘ձJO/*'5: ͦΜͳ5JUBOJVNʹٹੈओ͕

  9. 5J6*-JTU7JFX 5JUBOJVN΋͘΋͘ձJO/*'5: 5JUBOJVNYʹݱΕͨ৽͍͠"1*

  10. -JTU7JFX͸୔ࢁͷSPXΛ࣋ͭ৔߹ੑೳ͕ྑ͍ 5JUBOJVN΋͘΋͘ձJO/*'5: “ListView is designed to perform better with a

    large number of rows.”
  11. Ξϓϩʔνͷҧ͍ 5JUBOJVN΋͘΋͘ձJO/*'5: -JTU7JFXͱ5BCMF7JFXͷҧ͍

  12. σʔλͱϏϡʔ 5JUBOJVN΋͘΋͘ձJO/*'5: -JTU7JFX͸σʔλࢦ޲5BCMF7JFX͸Ϗϡʔࢦ޲

  13. 5JUBOJVN΋͘΋͘ձJO/*'5:

  14. 5JUBOJVN΋͘΋͘ձJO/*'5: σʔλ Ϗϡʔ ৘ใͷҰཡ ԿΒ͔ͷը໘

  15. l-BCFM΍*NBHF7JFXΛஔ͍ͨ 5BCMF7JFX3PXΛ୔ࢁ࡞ͬͯ 5BCMF7JFXͰදࣔ͢Δz 5BCMF7JFXͷΞϓϩʔν 5JUBOJVN΋͘΋͘ձJO/*'5:

  16. l-BCFM΍*NBHF7JFXΛஔ͍ͨ 5BCMF7JFX3PXΛ୔ࢁ࡞ͬͯ 5BCMF7JFXͰදࣔ͢Δz 5BCMF7JFXͷΞϓϩʔν 5JUBOJVN΋͘΋͘ձJO/*'5: ύϑΥʔϚϯεͷϘτϧωοΫ

  17. l-JTU7JFXͷ্Ͱ -BCFM΍*NBHF7JFXΛ Ͳ͏දࣔ͢Δͷ͔Λ༧ΊܾΊ͓ͯ͘z -JTU7JFXͷΞϓϩʔν 5JUBOJVN΋͘΋͘ձJO/*'5:

  18. l-JTU7JFXͷ্Ͱ -BCFM΍*NBHF7JFXΛ Ͳ͏දࣔ͢Δͷ͔Λ༧ΊܾΊ͓ͯ͘z -JTU7JFXͷΞϓϩʔν ΞΠςϜςϯϓϨʔτ 5JUBOJVN΋͘΋͘ձJO/*'5:

  19. ίʔυΛݟͤΖ 5JUBOJVN΋͘΋͘ձJO/*'5: ͝΋ͬͱ΋

  20. var plain_template = { childTemplates: [{ type: "Ti.UI.Label", bindId: "myLabel",

    properties: { left: "10dp" }, events: { click: reportFunction } }] }; var list = Ti.UI.createListView({ templates: { plain: plain_template }, defaultItemTemplate: "plain" }); 5JUBOJVN΋͘΋͘ձJO/*'5: ςϯϓϨʔτͷઃఆ
  21. var data = []; [1,2,3,4,5].forEach(function (idx) { data.push({ myLabel: {

    text: "Row #" + idx }, properties: { itemId: "item" + idx } }); }); var section = Ti.UI.createListSection({ items: data }); list.sections = [section]; 5JUBOJVN΋͘΋͘ձJO/*'5: ςϯϓϨʔτΛ࢖ͬͯΞΠςϜΛ࡞Δ
  22. 5JUBOJVN΋͘΋͘ձJO/*'5: list.addEventListener( "itemclick", function (e) { // Get clicked item

    reference var item = e.section.getItemAt(e.itemIndex); console.log(item.properties.itemId); // Replace clicked item e.section.UpdateItemAt(e.itemIndex, item); } ); -JTU7JFXͷΠϕϯτϋϯυϦϯά
  23. -JTU7JFXͱ͸ ܾΊͨͱ͓ΓͷܗͰσʔλΛදࣔͤ͞ΔͨΊͷ΋ͷ 5JUBOJVN΋͘΋͘ձJO/*'5:

  24. ύϑΥʔϚϯε͸ ͦΕͰɺ5BCMF7JFXΑΓ΋ੑೳ͸ྑ͍ͷ͔Ͷ 5JUBOJVN΋͘΋͘ձJO/*'5:

  25. 5JUBOJVN΋͘΋͘ձJO/*'5: 3PXT-JTU5BCMF 3PXΛ༻ҙ͢Δ࣌ؒಈ࡞ͷػහੑ .Z5BTL 3FOEFSJOHUJNFBU&QPDI NT *NBHF7JFX -BCFM -BCFM 5BCMF7JFX3PX

  26. 5JUBOJVN΋͘΋͘ձJO/*'5: )5$%FTJSF4 "OESPJE Y 4OBQESBHPO()[ .#3". (PPHMF/FYVT4 ˺

  27. 5JUBOJVN΋͘΋͘ձJO/*'5:

  28. NT Y NT Y 1SFQBSF 1SFQBSF 5JUBOJVN΋͘΋͘ձJO/*'5:

  29.  5JUBOJVN΋͘΋͘ձJO/*'5: ੌ͍ 5JUBOJVN΋͘΋͘ձJO/*'5: ੌ͍ "OESPJEͰ΋௒଎͍ "OESPJEͰ΋௒଎͍ 

  30. -JTU7JFX 5BCMF7JFX ˚ "OESPJE   Y J1IPOF 4JNVMBUPS 

     Y J1IPOF   Y ୯Ґ<NT> 5JUBOJVN΋͘΋͘ձJO/*'5:
  31.   5JUBOJVN΋͘΋͘ձJO/*'5: J04΋ޮՌൈ܈ J04"OESPJEڞʹ଎͍ J04΋ޮՌൈ܈ 5JUBOJVN΋͘΋͘ձJO/*'5: J04"OESPJEڞʹ଎͍

  32. ࢖ͬͨίʔυ 5JUBOJVN΋͘΋͘ձJO/*'5: IUUQTHJUIVCDPNSZVHPP5JUBOJVN-JTU7JFX4BNQMF 

  33. 5JUBOJVN΋͘΋͘ձJO/*'5: ʘʘaaᵋ Т ʯʗʗ ͜ΕͰղܾͩ ʘʘaaᵋ Т ʯʗʗ 5JUBOJVN΋͘΋͘ձJO/*'5: ͜ΕͰղܾͩ

  34. éĕÕǤʌñʞìè 5JUBOJVN΋͘΋͘ձJO/*'5: ΋ͪΖΜɺ·ͩɺશ͕ͯղܾ͢ΔΘ͚Ͱ͸ͳ͍

  35. 5JUBOJVN΋͘΋͘ձJO/*'5: ࣮͸ɺ·ͩ·ͩ"1*͕଍Γͯͳ͍ “A complete list of implemented features is schedule

    for the next list version, which is planned for Release 3.2.0.”
  36. 5JUBOJVN΋͘΋͘ձJO/*'5: 1SPQT FEJUJOHFEJUBCMF TFQBSBUPS$PMPS4UZMF &WFOUT ESBHTUBSUESBHFOE TDSPMMTDSPMMFOE IFBEFS7JFXGPPUFS7JFX EFMFUFNPWF ʜ

    ʜ
  37. 5JUBOJVN 5JUBOJVN΋͘΋͘ձJO/*'5: Β͍͠ 8BJUJOH

  38. ·ͱΊ 5JUBOJVN΋͘΋͘ձJO/*'5: $PODMVTJPO

  39. -JTU7JFX͸଎͍ 5JUBOJVN΋͘΋͘ձJO/*'5: 5BCMF7JFXͷYY͙Β͍଎͍

  40. ͪΐͬͱ೉͍͠ 5JUBOJVN΋͘΋͘ձJO/*'5: 5BCMF7JFX΄Ͳͷॊೈੑ͸ແ͍

  41. ·࣮ͩ૷్த 5JUBOJVN΋͘΋͘ձJO/*'5: 5JUBOJVNͰҰ௨Γͷ࣮૷͕ऴΘΔΒ͍͠

  42. Ͱ΋଎͍ 5JUBOJVN΋͘΋͘ձJO/*'5: ෳࡶͳॲཧΛ࢖Θͳ͚Ε͹े෼ʹ࢖͑Δ

  43. ࢼ͢Ձ஋͋Γ 5JUBOJVN΋͘΋͘ձJO/*'5: 5BCMF7JFX͚͔ͩ͠࢖Θͳ͍ͷ͸໪ମͳ͍

  44. CODESTRONG ! 5JUBOJVN΋͘΋͘ձJO/*'5: