Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

ScrollableView views disappear on android

$
0
0

Hi, I'm having some trouble to understand this issue, it works fine in iOS.

  • The side $.menu (left scrollview) labels, selects the page for the $.container (right scrollableview);

  • Inside the $.container (right scrollableview), the childs of $.options (horizontal top view) are labels to select page for $.data (bottom scrollableview);

  • The user can't scroll any scrollable view, just change it content by clicking on the respective label;

index.xml

<Window>
    <ScrollView id='menu'> /*left side, vertical view to select page for $.container*/
        <Label class='button' id='play_btn'/>
        <Label class='button' id='results_btn'/>
        /* ... */
        <Label class='button' id='config_btn'/>
    </ScrollView>
    <ScrollableView id='container'> /*right side*/
        <View class='views' id='play'/>
        <View class='views' id='results'>
            <View id='options'> /*hotizontal view to select page for $.data*/
                <Label class='option' id='list_result_btn'/>
                <Label class='option' id='select_time_btn'/>
                <Label class='option' id='select_opponent_btn'/>
            </View>
            <ScrollableView id='data'>
                <View class='childs' id='list_result'/>
                <View class='childs' id='select_time'/>
                <View class='childs' id='select_opponent'/>
            </ScrollableView>
        </View>
        /* ... */
        <View class='views' id='config'/>
    </ScrollableView>
</Window>
app.js
'ScrollView':{
    backgroundColor:'#fff',
    scrollType:'vertical',
    layout:'vertical'
}
'ScrollableView':{
    backgroundColor:'#fff',
    scrollType:'horizontal',
    scrollingEnabled:false,
    showPagingControl:false,
    enableZoomControls:false
}
'#menu':{
    left:0,
    width:Alloy.CFG.Left /* +/- 20% of device width */
}
'#container':{
    right:0,
    width:Alloy.CFG.Right /* +/- 80% of device width */
}
'#options':{
    layout:'horizontal',
    top:0,
    height:40
}
'#data':{
    bottom:0,
    top:40
}
I'm on $.results view, and click on $.play_btn (to select $.play page), and click again on $.result_btn, after the $.container.setCurrentPage(1); call, when I see the $.data scrollable view again, all it's views disappears.

After the setCurrentPage function, I check the $.data.views.length and returns 0, but only the 2nd time that I open that $.container page.

This only appends on android.

I've tried to use cacheSize:4 on $.data but still the same.


Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>