本文整理匯總了Java中com.carlosdelachica.easyrecycleradapters.adapter.EasyRecyclerAdapter類的典型用法代碼示例。如果您正苦於以下問題:Java EasyRecyclerAdapter類的具體用法?Java EasyRecyclerAdapter怎麽用?Java EasyRecyclerAdapter使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
EasyRecyclerAdapter類屬於com.carlosdelachica.easyrecycleradapters.adapter包,在下文中一共展示了EasyRecyclerAdapter類的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: initEasyRecyclerViewManager
import com.carlosdelachica.easyrecycleradapters.adapter.EasyRecyclerAdapter; //導入依賴的package包/類
private void initEasyRecyclerViewManager() {
EasyRecyclerAdapter adapter = new EasyRecyclerAdapter(getActivity());
adapter.bind(ImageData.class, ImageEasyViewHolder.class);
adapter.bind(TextData.class, TextDataEasyViewHolder.class);
easyRecyclerViewManager = new EasyRecyclerViewManager.Builder(recyclerView, adapter)
.layoutManager(new GridLayoutManager(getActivity(), getResources().getInteger(R.integer.grid_columns)))
.divider(R.drawable.custom_divider)
.emptyLoadingListTextView(emptyList)
.emptyListText(R.string.empty_list)
.emptyListTextColor(R.color.accentColor)
.loadingView(loadingView)
.clickListener(this)
.longClickListener(this)
.recyclerViewClipToPadding(false)
.recyclerViewHasFixedSize(true)
.build();
}
開發者ID:CarlosMChica,項目名稱:easyrecycleradapters,代碼行數:18,代碼來源:FullCustomizationEasyRecyclerViewFragment.java
示例2: EasyRecyclerViewManagerBuilder
import com.carlosdelachica.easyrecycleradapters.adapter.EasyRecyclerAdapter; //導入依賴的package包/類
public EasyRecyclerViewManagerBuilder(RecyclerView recyclerView, EasyRecyclerAdapter adapter) {
if (recyclerView == null) {
throw new IllegalArgumentException("RecyclerView must not be null.");
}
if (recyclerView.getContext() == null) {
throw new IllegalArgumentException("Context must not be null.");
}
if (adapter == null) {
throw new IllegalArgumentException("Adapter must not be null.");
}
this.context = recyclerView.getContext().getApplicationContext();
this.recyclerView = recyclerView;
this.adapter = adapter;
this.emptyTextColor = context.getResources().getColor(R.color.empty_list_text_color);
this.loadingTextColor = context.getResources().getColor(R.color.empty_list_text_color);
}
示例3: initAdapter
import com.carlosdelachica.easyrecycleradapters.adapter.EasyRecyclerAdapter; //導入依賴的package包/類
private void initAdapter() {
adapter = new EasyRecyclerAdapter(
new CustomViewHolderFactory(this),
PresentationContact.class,
ContactViewHolder.class);
adapter.setOnClickListener(this);
}
示例4: initAdapter
import com.carlosdelachica.easyrecycleradapters.adapter.EasyRecyclerAdapter; //導入依賴的package包/類
private void initAdapter() {
adapter = new EasyRecyclerAdapter(new CustomViewHolderFactory(getActivity()));
adapter.bind(ImageData.class, ImageEasyViewHolder.class);
adapter.bind(TextData.class, TextDataEasyViewHolder.class);
adapter.setOnClickListener(this);
adapter.setOnLongClickListener(this);
}
示例5: initAdapter
import com.carlosdelachica.easyrecycleradapters.adapter.EasyRecyclerAdapter; //導入依賴的package包/類
private void initAdapter() {
adapter = new EasyRecyclerAdapter(
new CustomViewHolderFactory(getActivity()),
ImageData.class,
ImageEasyViewHolder.class);
adapter.setOnClickListener(this);
adapter.setOnLongClickListener(this);
}
示例6: EasyRecyclerViewManager
import com.carlosdelachica.easyrecycleradapters.adapter.EasyRecyclerAdapter; //導入依賴的package包/類
EasyRecyclerViewManager(Context context,
RecyclerView recyclerView,
LayoutManager layoutManager,
EasyRecyclerAdapter adapter,
TextView emptyLoadingListTextView,
String emptyListText,
int emptyTextColor,
String loadingListText,
int loadingTextColor,
OnItemLongClickListener longClickListener,
OnItemClickListener clickListener,
DividerItemDecoration dividerDrawableRes,
boolean clipToPadding,
boolean hasFixedSize,
View loadingView,
View emptyView) {
this.context = context;
this.recyclerView = recyclerView;
this.layoutManager = layoutManager;
this.adapter = adapter;
this.emptyLoadingListTextView = emptyLoadingListTextView;
this.emptyListText = emptyListText;
this.emptyListTextColor = emptyTextColor;
this.loadingListText = loadingListText;
this.loadingTextColor = loadingTextColor;
this.longClickListener = longClickListener;
this.itemClickListener = clickListener;
this.dividerItemDecoration = dividerDrawableRes;
this.clipToPadding = clipToPadding;
this.hasFixedSize = hasFixedSize;
this.loadingView = loadingView;
this.emptyView = emptyView;
initRecyclerView();
}
示例7: initAdapter
import com.carlosdelachica.easyrecycleradapters.adapter.EasyRecyclerAdapter; //導入依賴的package包/類
private void initAdapter() {
adapter = new EasyRecyclerAdapter(getActivity(), Station.class, StationHolder.class);
adapter.setOnClickListener(this);
}
示例8: initAdapter
import com.carlosdelachica.easyrecycleradapters.adapter.EasyRecyclerAdapter; //導入依賴的package包/類
private void initAdapter() {
adapter = new EasyRecyclerAdapter(this, Station.class, StationHolder.class);
adapter.setOnClickListener(this);
}
示例9: initAdapter
import com.carlosdelachica.easyrecycleradapters.adapter.EasyRecyclerAdapter; //導入依賴的package包/類
private void initAdapter() {
adapter = new EasyRecyclerAdapter(getActivity(), ImageData.class, ImageEasyViewHolder.class);
adapter.setOnClickListener(this);
adapter.setOnLongClickListener(this);
}
示例10: Builder
import com.carlosdelachica.easyrecycleradapters.adapter.EasyRecyclerAdapter; //導入依賴的package包/類
public Builder(RecyclerView recyclerView, EasyRecyclerAdapter adapter) {
super(recyclerView, adapter);
}