Back to project page android_widget_adapters.
The source code is released under:
[Apache License](http://www.apache.org/licenses/): Version 2.0, January 2004 =============== ## TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION ## ### 1. Definitions. ### "License" sha...
If you think the Android project android_widget_adapters listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
/* * ================================================================================================= * Copyright (C) 2014 Martin Albedinsky [Wolf-ITechnologies] * ================================================================================================= * Licensed under the Apache License, Version 2.0 or later (further "License" only). * ------------------------------------------------------------------------------------------------- * You may use this file only in compliance with the License. More details and copy of this License * you may obtain at//from w w w . j a v a2 s. c o m * * http://www.apache.org/licenses/LICENSE-2.0 * * You can redistribute, modify or publish any part of the code written within this file but as it * is described in the License, the software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES or CONDITIONS OF ANY KIND. * * See the License for the specific language governing permissions and limitations under the License. * ================================================================================================= */ package com.wit.android.ui.widget.adapter; import android.support.annotation.NonNull; import android.view.View; /** * <h3>Interface Overview</h3> * todo: description * * @param <Item> A type of the item of which data will be presented within views hold by implementation * of this holder. * @param <Adapter> A type of the adapter where will be implementation of this holder used. * @author Martin Albedinsky */ public interface ViewHolder<Item, Adapter extends BaseAdapter> { /** * Called to perform all necessary operations to create a valid instance of this holder, like * to obtain all views which need to be hold by this holder. * * @param position The position for which is this holder being created. * @param itemView The view of an item for which is this holder being created. This view can be * used to access all views to be hold by this holder for later easy access. * @see #bind(int, Object, BaseAdapter) */ public void create(int position, @NonNull View itemView); /** * Called to set up and populate all views hold by this holder with data of the given <var>item</var>. * * @param position The position of the given item. * @param item Item obtained from the given <var>adapter</var> for the specified position. * @param adapter An instance of the adapter which requests to bind views of this holder. * @see #create(int, android.view.View) */ public void bind(int position, @NonNull Item item, @NonNull Adapter adapter); }