2014-01-24 7 views
2

저는 Sencha Touch 2로 안드로이드 애플리케이션을 개발했습니다. 현재 날씨와 일기 예보는 html 타입으로 작성되었습니다. 시간별 예측이 가로 스크롤 가능한 패널에 표시되기를 원하므로 DataView 유형 (http://docs.sencha.com/touch/2.3.0/#!/api/Ext.dataview.DataView)을 사용해야했습니다.Sencha Touch 2 : 데이터 뷰가 안드로이드 에뮬레이터에 표시되지 않습니다.

안타깝게도 Android 에뮬레이터에서는 작동하지 않습니다. 에뮬레이터와 크롬의 차이점을 보려면 아래 스크린 샷을 살펴보십시오. 또한 ADT 및 크롬 콘솔 로그에 오류가 표시되지 않았습니다. 여기

http://i.stack.imgur.com/Mxzrt.png

내 소스 코드입니다, 이러한 항목은 회전 목마의 카드 내부에 있습니다. 제 문제를 읽어 주셔서 감사합니다.

items: [{ 
      height: '50%', 
      html: tplCurr.apply(obj) 
     }, { 
      height: '10%', 
      xtype: 'dataview', 
      cls: 'hourly-container', 
      scrollable: { 
       direction: 'horizontal', 
       directionLock : true 
      }, 
      inline: { wrap: false }, 
      data: obj.hourly, 
      itemTpl: tplHourly 
     }, { 
      height: '40%', 
      xtype: 'panel', 
      cls: 'daily-container', 
      fullscreen: true, 
      scrollable: { 
       direction: 'vertical', 
       directionLock : true 
      }, 
      items: dayItems 
     }] 
+0

상위 컨테이너의 코드 또는 적어도 레이아웃 속성을 게시 할 수 있다면 도움이 될 것입니다. 레이아웃에 'vbox'를 사용하고 있습니까? 높이 대신에 각 컨테이너에서 flex 속성을 사용해보십시오 (예 : flex : 5, flex : 1, flex : 4) –

답변

0

이 좀보십시오,

layout:{ 
    type:'vertical' 
}, 
items: [{ 
      flex:4, 
      html: tplCurr.apply(obj) 
     }, { 
      flex:1, 
      xtype: 'dataview', 
      cls: 'hourly-container', 

      scrollable: { 
       direction: 'horizontal', 
       directionLock : true 
      }, 
      inline: { wrap: false }, 
      data: obj.hourly, 
      itemTpl: tplHourly 
     }, { 
      flex:2, 
      xtype: 'panel', 
      cls: 'daily-container', 
      fullscreen: true, 
      scrollable: { 
       direction: 'vertical', 
       directionLock : true 
      }, 
      items: dayItems 
     }] 
+0

당신이 무엇을하고 있는지, 무엇을 수정했는지에 대해 간략하게 설명 할 수 있습니다. –