Search in sources :

Example 1 with ViewHolderBinder

use of com.android.launcher3.recyclerview.ViewHolderBinder in project android_packages_apps_Launcher3 by crdroidandroid.

the class WidgetsListAdapter method onBindViewHolder.

@Override
public void onBindViewHolder(ViewHolder holder, int pos) {
    ViewHolderBinder viewHolderBinder = mViewHolderBinders.get(getItemViewType(pos));
    WidgetsListBaseEntry entry = mVisibleEntries.get(pos);
    viewHolderBinder.bindViewHolder(holder, mVisibleEntries.get(pos), pos);
    holder.itemView.setTag(R.id.tag_widget_entry, entry);
}
Also used : WidgetsListBaseEntry(com.android.launcher3.widget.model.WidgetsListBaseEntry) ViewHolderBinder(com.android.launcher3.recyclerview.ViewHolderBinder)

Example 2 with ViewHolderBinder

use of com.android.launcher3.recyclerview.ViewHolderBinder in project android_packages_apps_Launcher3 by ProtonAOSP.

the class WidgetsListAdapter method onBindViewHolder.

@Override
public void onBindViewHolder(ViewHolder holder, int pos, List<Object> payloads) {
    ViewHolderBinder viewHolderBinder = mViewHolderBinders.get(getItemViewType(pos));
    WidgetsListBaseEntry entry = mVisibleEntries.get(pos);
    // The first entry has an empty space, count from second entries.
    int listPos = (pos > 1) ? POSITION_DEFAULT : POSITION_FIRST;
    if (pos == (getItemCount() - 1)) {
        listPos |= POSITION_LAST;
    }
    viewHolderBinder.bindViewHolder(holder, mVisibleEntries.get(pos), listPos, payloads);
    holder.itemView.setTag(R.id.tag_widget_entry, entry);
}
Also used : WidgetsListBaseEntry(com.android.launcher3.widget.model.WidgetsListBaseEntry) ViewHolderBinder(com.android.launcher3.recyclerview.ViewHolderBinder)

Example 3 with ViewHolderBinder

use of com.android.launcher3.recyclerview.ViewHolderBinder in project android_packages_apps_Launcher3 by ArrowOS.

the class WidgetsListAdapter method onBindViewHolder.

@Override
public void onBindViewHolder(ViewHolder holder, int pos, List<Object> payloads) {
    ViewHolderBinder viewHolderBinder = mViewHolderBinders.get(getItemViewType(pos));
    WidgetsListBaseEntry entry = mVisibleEntries.get(pos);
    // The first entry has an empty space, count from second entries.
    int listPos = (pos > 1) ? POSITION_DEFAULT : POSITION_FIRST;
    if (pos == (getItemCount() - 1)) {
        listPos |= POSITION_LAST;
    }
    viewHolderBinder.bindViewHolder(holder, mVisibleEntries.get(pos), listPos, payloads);
    holder.itemView.setTag(R.id.tag_widget_entry, entry);
}
Also used : WidgetsListBaseEntry(com.android.launcher3.widget.model.WidgetsListBaseEntry) ViewHolderBinder(com.android.launcher3.recyclerview.ViewHolderBinder)

Example 4 with ViewHolderBinder

use of com.android.launcher3.recyclerview.ViewHolderBinder in project android_packages_apps_Launcher3 by AOSPA.

the class WidgetsListAdapter method onBindViewHolder.

@Override
public void onBindViewHolder(ViewHolder holder, int pos, List<Object> payloads) {
    ViewHolderBinder viewHolderBinder = mViewHolderBinders.get(getItemViewType(pos));
    WidgetsListBaseEntry entry = mVisibleEntries.get(pos);
    // The first entry has an empty space, count from second entries.
    int listPos = (pos > 1) ? POSITION_DEFAULT : POSITION_FIRST;
    if (pos == (getItemCount() - 1)) {
        listPos |= POSITION_LAST;
    }
    viewHolderBinder.bindViewHolder(holder, mVisibleEntries.get(pos), listPos, payloads);
    holder.itemView.setTag(R.id.tag_widget_entry, entry);
}
Also used : WidgetsListBaseEntry(com.android.launcher3.widget.model.WidgetsListBaseEntry) ViewHolderBinder(com.android.launcher3.recyclerview.ViewHolderBinder)

Example 5 with ViewHolderBinder

use of com.android.launcher3.recyclerview.ViewHolderBinder in project android_packages_apps_404Launcher by P-404.

the class WidgetsListAdapter method onBindViewHolder.

@Override
public void onBindViewHolder(ViewHolder holder, int pos, List<Object> payloads) {
    ViewHolderBinder viewHolderBinder = mViewHolderBinders.get(getItemViewType(pos));
    WidgetsListBaseEntry entry = mVisibleEntries.get(pos);
    // The first entry has an empty space, count from second entries.
    int listPos = (pos > 1) ? POSITION_DEFAULT : POSITION_FIRST;
    if (pos == (getItemCount() - 1)) {
        listPos |= POSITION_LAST;
    }
    viewHolderBinder.bindViewHolder(holder, mVisibleEntries.get(pos), listPos, payloads);
    holder.itemView.setTag(R.id.tag_widget_entry, entry);
}
Also used : WidgetsListBaseEntry(com.android.launcher3.widget.model.WidgetsListBaseEntry) ViewHolderBinder(com.android.launcher3.recyclerview.ViewHolderBinder)

Aggregations

ViewHolderBinder (com.android.launcher3.recyclerview.ViewHolderBinder)5 WidgetsListBaseEntry (com.android.launcher3.widget.model.WidgetsListBaseEntry)5