Search in sources :

Example 1 with BindingContextFactory

use of org.robobinding.BindingContextFactory in project RoboBinding by RoboBinding.

the class SingletonAssembler method createViewBinder.

public ViewBinder createViewBinder() {
    createDependents();
    BinderProviderProxy proxy = new BinderProviderProxy();
    BindingContextFactory bindingContextFactory = createBindingContextFactory(proxy);
    ViewBindingLifecycle viewBindingLifecycle = new ViewBindingLifecycle(new ErrorFormatterWithFirstErrorStackTrace());
    ViewBinderImpl viewBinder = new ViewBinderImpl(bindingViewInflater, viewBindingLifecycle, bindingContextFactoryAdapters.adaptB(bindingContextFactory));
    proxy.setProvider(new BinderProviderImpl(bindingViewInflater, viewBindingLifecycle, nonBindingViewInflater, viewBinder, bindingContextFactoryAdapters));
    return viewBinder;
}
Also used : BindingContextFactory(org.robobinding.BindingContextFactory)

Example 2 with BindingContextFactory

use of org.robobinding.BindingContextFactory in project RoboBinding by RoboBinding.

the class SingletonAssembler method createMenuBinder.

public MenuBinder createMenuBinder(MenuInflater menuInflater, Menu menu) {
    createDependents();
    BinderProviderProxy proxy = new BinderProviderProxy();
    BindingContextFactory bindingContextFactory = createBindingContextFactory(proxy);
    ViewBindingLifecycle viewBindingLifecycle = new ViewBindingLifecycle(new ErrorFormatterWithFirstErrorStackTrace());
    ViewBinderImpl viewBinder = new ViewBinderImpl(bindingViewInflater, viewBindingLifecycle, bindingContextFactoryAdapters.adaptB(bindingContextFactory));
    proxy.setProvider(new BinderProviderImpl(bindingViewInflater, viewBindingLifecycle, nonBindingViewInflater, viewBinder, bindingContextFactoryAdapters));
    BindingMenuInflater bindingMenuInflater = new BindingMenuInflater(context, menu, menuInflater, bindingAttributeParser, bindingAttributeResolver);
    return new MenuBinderImpl(bindingMenuInflater, viewBindingLifecycle, bindingContextFactoryAdapters.adaptB(bindingContextFactory));
}
Also used : BindingContextFactory(org.robobinding.BindingContextFactory)

Aggregations

BindingContextFactory (org.robobinding.BindingContextFactory)2