Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Manuel Lehner
    @manumaticx

    Hi, currently discussing #20

    "NavigationWindow" - like centerView.

    As mentioned in the issue and here: https://github.com/manumaticx/Ti.DrawerLayout-Demo-Alloy-App#limitations
    ... it is currently not possible to make the DrawerLayout accessible from all windows / activities
    But you do can now open a kind of lightweight windows (essentially views) within the centerView if you use
    drawer.replaceCenterView(view, true);
    Internally this will add your view to the android backstack (wrapped in a fragment). That means, you can go back to the previous view with the android back button.
    Douglas Hennrich
    @DouglasHennrich
    Hmmm but in this case I need to make all the logic of others windows on the same .js file ? Or you thing I choose require them exporting an view to be replaced?
    Manuel Lehner
    @manumaticx
    @DouglasHennrich You could make just full-size views that are wrapped in windows on iOS or use Fokke's technique with a custom module like this:
    exports.createWindow = function(args) {
        return Ti.UI[OS_IOS ? 'createWindow' : 'createView'](args);
    };
    This creates windows on iOS and views on Android.
    Manuel Lehner
    @manumaticx
    Well I guess this is just how things work on Android with Titanium. Windows become Activities. If this fits your navigation design then just use windows (but with the limitation of the drawer being only available in the root window).
    Or you emulate a kind of NavigationWindow based on views - in that case you really have to care about your memory and stuff. This is way more complex imho.
    Martin
    @Hollerweger
    hey, is it possible to define the menu in menu.xml and use this module on Android and a TabGroup on iOs?
    Martin
    @Hollerweger
    I have committed a Demo Version with added Material Theme and tinted action bar and status bar using theme attributes working with Titanium SDK 4.0.0RC+: https://github.com/Hollerweger/Ti.DrawerLayout-Demo-Alloy-App
    Martin
    @Hollerweger
    @manumaticx Do you know a way to use the same menu as TabGroup on iOS and as NavigationDrawer with this module on Android?
    Manuel Lehner
    @manumaticx

    @Hollerweger Sorry for the late reply (gitter somehow didn't notify me about your messages).

    I think there is no ready solution for this. You would have to add an abstraction layer between the menu definition and the Tabgroup / TableView for the menu. But I'm not sure if this would be worth the work.
    Why not just define two different layouts for the menu. That's why Alloy is so cool. You can easily create completely different navigation designs for each platform but use the same controllers and views for the content within.

    Manuel Lehner
    @manumaticx
    Continuing conversation in #40 ...
    The problem I see if we just use our own toolbar is that the user won't be able to control it anymore with existing Actionbar and Menu proxies. So this is a bigger step that needs to be on Titanium side (in the SDK)
    Géraud Bourdin
    @GeraudBourdin
    that's the point. If the sdk don't include the toolbar, that is not possible. That's why i asked you if this was possible. My guess is no, but maybe i'am missing something.
    (by the way, hello every body)
    Géraud Bourdin
    @GeraudBourdin
    @manumaticx i have a little time to try the toolbar ting. it seems that import android.support.v7.app.AppCompatActivity isn't supported at this time. So i don't think we could find a way whithout this. activity = (AppCompatActivity) appContext.getCurrentActivity(); breaks compilation. That is sad :)
    Manuel Lehner
    @manumaticx
    @GeraudBourdin Sorry, I didn't reply. Not sure what I'm doing wrong but gitter does not notify me when something happens here... :worried:
    Manuel Lehner
    @manumaticx
    My problem was that TiCompositeLayout throws an Exception if a Toolbar is a child. So we would need a Titanium Proxy for the Toolbar - a simple TiUIView wrapper didn't solve it for me. I didn't investigate more in the Toolbar because it means some more work which definitely should be part of the SDK, not the Drawer module.
    Will Dent
    @WillDent
    What is the minimum version of Titanium SDK and Android API that Ti.DrawerLayout work on?
    Will Dent
    @WillDent
    @manumaticx
    Manuel Lehner
    @manumaticx
    @WillDent currently Ti 3.4.1 is minimum and it should work on all Android API levels that are supported by this SDK
    Will Dent
    @WillDent
    Thanks @manumaticx