org.robobinding.widget.adapterview.ItemMappingAttribute Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of robobinding Show documentation
Show all versions of robobinding Show documentation
A Presentation Model(MVVM) framework for the Android platform
package org.robobinding.widget.adapterview;
import java.util.Collection;
import org.robobinding.BindingContext;
import org.robobinding.PredefinedPendingAttributesForView;
import org.robobinding.attribute.PredefinedMappingsAttribute;
import org.robobinding.viewattribute.grouped.ChildViewAttributeWithAttribute;
/**
*
* @since 1.0
* @version $Revision: 1.0 $
* @author Robert Taylor
*/
public class ItemMappingAttribute implements ChildViewAttributeWithAttribute {
private final PredefinedMappingUpdater predefinedMappingsUpdater;
private PredefinedMappingsAttribute mappingsAttribute;
public ItemMappingAttribute(PredefinedMappingUpdater predefinedMappingsUpdater) {
this.predefinedMappingsUpdater = predefinedMappingsUpdater;
}
@Override
public void setAttribute(PredefinedMappingsAttribute attribute) {
this.mappingsAttribute = attribute;
}
@Override
public void bindTo(BindingContext bindingContext) {
Collection viewMappings = mappingsAttribute.getViewMappings(bindingContext.getContext());
predefinedMappingsUpdater.updateViewMappings(viewMappings);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy