• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Changing the tab's location on each view

Guest
Jul 14, 2011 Jul 14, 2011

Copy link to clipboard

Copied

Within my application I would like to have three clickable links at the bottom of my screen: NOw I can use the tab application method, using the following code etc:

 <s:ViewNavigator label="Home" width="100%" height="100%" 
                     firstView="views.Home"/>
    <s:ViewNavigator label="Details" width="100%" height="100%" 
                     firstView="views.DetailsHome"/>
    <s:ViewNavigator label="Settings" width="100%" height="100%" 
                     firstView="views.SettingsHome"/>

But my problem is that the tabs on the left and right will be labled next / previous and the middle one menu, know the middle one will always opent eh same view, where as the next and previous will always open a different view depending which view they are currentl on, but with the tabbed appliaction as far as I know has static views basically they all will open the same view no matter which view ou are on so does not work for me.

Is there away to overwrite the basic view these are calling in the firstview setion so that I can set the left and rights view to a different one on each view page?

As at the moment I have created three boxes, equally spaced and with a label and a click handler that mimics the bottom tabs so enabeling me to perform what I require, but if there is away to manipulate the tabs click event then I would like to use this as its cleaner etc I think, any ideas (if this makes sense) or stick to what I am doing?

Thanks Si

Views

508

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jul 15, 2011 Jul 15, 2011

Copy link to clipboard

Copied

I dont know if it will work or fit your needs, but you can add code in the firstView="" attribute. For exemple, firstView="{getNextView()}". getNextView would return a class

private function getNextView():Class
{       

      if (navigator.activeView.className == "DetailsHome")
           return views.Home;

     else return views.DetailsHome;
}

I dont think it's a "clean" solution, but it should allow you to do what you want to do

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jul 15, 2011 Jul 15, 2011

Copy link to clipboard

Copied

I tried my solution in a tab application and it doesnt work sorry

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jul 15, 2011 Jul 15, 2011

Copy link to clipboard

Copied

Thanks for the feedback might

give it ago later just in case

Thanks

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jul 15, 2011 Jul 15, 2011

Copy link to clipboard

Copied

LATEST

I thnk I have found my solution, a littl nifty spark component ' ViewMenItems';

<s:viewMenuItems>
     <s:ViewMenuItem label="Previous" click="" />
     <s:ViewMenuItem label="Menu" clcik="" />
     <s:ViewMenuItem label="Next" click="" />
</s:viewMenuItems>

When added to reveal this the user simply presses their menu button on their android device and it pops up, that good as it also means I get a little bit more room to play with.

Thanks

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines