當前位置: 首頁>>代碼示例>>Java>>正文


Java EasyRecyclerAdapter類代碼示例

本文整理匯總了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);
}
 
開發者ID:CarlosMChica,項目名稱:easyrecycleradapters,代碼行數:17,代碼來源:EasyRecyclerViewManagerBuilder.java

示例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);
}
 
開發者ID:SergioDim3nsions,項目名稱:RealmContactsForAndroid,代碼行數:8,代碼來源:MainActivity.java

示例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);
}
 
開發者ID:CarlosMChica,項目名稱:easyrecycleradapters,代碼行數:8,代碼來源:MultiViewEasyAdapterFragment.java

示例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);
}
 
開發者ID:CarlosMChica,項目名稱:easyrecycleradapters,代碼行數:9,代碼來源:CustomViewHolderFactoryFragment.java

示例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();
}
 
開發者ID:CarlosMChica,項目名稱:easyrecycleradapters,代碼行數:35,代碼來源:EasyRecyclerViewManager.java

示例7: initAdapter

import com.carlosdelachica.easyrecycleradapters.adapter.EasyRecyclerAdapter; //導入依賴的package包/類
private void initAdapter() {
    adapter = new EasyRecyclerAdapter(getActivity(), Station.class, StationHolder.class);
    adapter.setOnClickListener(this);
}
 
開發者ID:Mun0n,項目名稱:MADBike,代碼行數:5,代碼來源:FavoritesFragment.java

示例8: initAdapter

import com.carlosdelachica.easyrecycleradapters.adapter.EasyRecyclerAdapter; //導入依賴的package包/類
private void initAdapter() {
    adapter = new EasyRecyclerAdapter(this, Station.class, StationHolder.class);
    adapter.setOnClickListener(this);
}
 
開發者ID:Mun0n,項目名稱:MADBike,代碼行數:5,代碼來源:SearchActivity.java

示例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);
}
 
開發者ID:CarlosMChica,項目名稱:easyrecycleradapters,代碼行數:6,代碼來源:SimpleViewEasyAdapterFragment.java

示例10: Builder

import com.carlosdelachica.easyrecycleradapters.adapter.EasyRecyclerAdapter; //導入依賴的package包/類
public Builder(RecyclerView recyclerView, EasyRecyclerAdapter adapter) {
    super(recyclerView, adapter);
}
 
開發者ID:CarlosMChica,項目名稱:easyrecycleradapters,代碼行數:4,代碼來源:EasyRecyclerViewManager.java


注:本文中的com.carlosdelachica.easyrecycleradapters.adapter.EasyRecyclerAdapter類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。