private static void resetViews(ViewGroup parent, int layoutId,
            List entries) {
        parent.removeAllViews();
        if (layoutId == 0) {
            return;
        }
        LayoutInflater inflater = (LayoutInflater) parent.getContext()
                .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
        for (int i = 0; i < entries.size(); i++) {
            Object entry = entries.get(i);
            ViewDataBinding binding = bindLayout(inflater, parent,
                    layoutId, entry);
            parent.addView(binding.getRoot());
        }
    }
Clears all Views in {@code parent} and fills it with a View for
each item in {@code entries}, bound to the item. If layoutId
is 0, no Views will be added.

@param parent The ViewGroup to contain the list of items.
@param layoutId The layout ID to inflate for the child Views.
@param entries The list of items to bind to the inflated Views. Each
               item will be bound to a different child View.
DataBindingDataBoundList/app/src/main/java/com/example/android/databoundlist/ListBindingAdapters.java