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

Android - new view not opening in the tab group

$
0
0
  • app: android mobile
  • sdk: 3.2.1.GA
  • os: osx mavericks
  • studio Titanium Studio, build: 3.2.1.201402041146
  • output: Samsung Galaxy Tab 3

In order to maintain a reference to my tab group, I added the tabs to my alloy config like this

Alloy.CFG = {
    "homeTab" : $.homeTab,
    "locationTab" : $.locationTab,
    "cuisineTab" : $.cuisineTab,
    "tabGroup" : $.index
};
Then I can use them anywhere in my app. So, when I want to open a view in the home tab, I simply use
$.signUpEmailButton.addEventListener('click', function(e) {
 
    return Alloy.CFG.homeTab.open(Alloy.createController('register').getView());
 
});
This worked beautifully on my last app (cross-platform) and it works as intended for ios on this app. But for some unknown reason, the register view opens outside of the tab group on my android device. There's nothing special about the view.

register.xml

<Alloy>
    <Window id="register">
        <View class="container">
        <Require src="header" type="view" />        
            <View id="buttonBar">
                <Button id="registerUserButton" class="buttons" title="User" />
                <Button id="registerVendorButton" class="buttons" title="Vendor" />
            </View>
            <View id="signUpForm">
                <Require id="registerUserForm" src="registerUser" type="view"/>
                <Require id="registerVendorForm" src="registerVendor" type="view"/>
            </View>
        </View>
    </Window>
</Alloy>
Can anyone offer any insight as to why this view would open outside the tab group? Could it be because window is the top-level element and not view?

Viewing all articles
Browse latest Browse all 8068

Trending Articles



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