public class ViewModelUtil extends Object
| Modifier and Type | Method and Description | 
|---|---|
static <T> ViewModel<T> | 
getViewModel(android.view.LayoutInflater inflater,
            int layoutId,
            android.view.ViewGroup parent)  | 
static <T> ViewModel<T> | 
getViewModel(android.view.LayoutInflater inflater,
            int layoutId,
            android.view.View convertView,
            android.view.ViewGroup parent)
A utility function for getting a ViewModel out of a view in an adapter. 
 | 
public static <T> ViewModel<T> getViewModel(android.view.LayoutInflater inflater, int layoutId, android.view.View convertView, android.view.ViewGroup parent)
     ViewModel <T> view = getViewModel(inflater, layoutId, convertView, parent);
     view.populate(getItem(position));
     return (View) view;
 T - the type of item in the ViewModelinflater - the view inflaterlayoutId - the layout to inflateconvertView - the convertView from adapter.getView()parent - the parent from adapter.getView()public static <T> ViewModel<T> getViewModel(android.view.LayoutInflater inflater, int layoutId, android.view.ViewGroup parent)
Copyright © 2011–2014. All rights reserved.