Java Code Examples for com.chad.library.adapter.base.BaseQuickAdapter#getItem()
The following examples show how to use
com.chad.library.adapter.base.BaseQuickAdapter#getItem() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MainActivity.java From TitleBarView with Apache License 2.0 | 6 votes |
@Override protected void onItemClicked(BaseQuickAdapter<TitleEntity, BaseViewHolder> adapter, View view, int position) { super.onItemClicked(adapter, view, position); TitleEntity entity = adapter.getItem(position); if (entity.colorRes != 0) { isWhite = entity.colorRes == android.R.color.white; titleBar.setBackgroundResource(entity.colorRes); titleBar.setLeftTextDrawable(isWhite ? R.drawable.ic_arrow_left : R.drawable.ic_arrow_back_white); titleBar.setRightTextDrawable(isWhite ? R.drawable.ic_menu : R.drawable.ic_menu_white); titleBar.setTitleMainTextColor(isWhite ? getResources().getColor(R.color.colorTextBlack) : Color.WHITE); titleBar.setTitleSubTextColor(isWhite ? getResources().getColor(R.color.colorTextBlack) : Color.WHITE); if (type > 0 && isImmersible) { if (isWhite) { StatusBarUtil.setStatusBarLightMode(mContext); } else { StatusBarUtil.setStatusBarDarkMode(mContext); } } } else if (entity.activity != null) { startActivity(entity.activity); } }
Example 2
Source File: HomeFragment.java From FastLib with Apache License 2.0 | 5 votes |
@Override public void onItemClicked(BaseQuickAdapter<WidgetEntity, BaseViewHolder> adapter, View view, int position) { super.onItemClicked(adapter, view, position); WidgetEntity entity = adapter.getItem(position); if (position == 1) { SwipeBackActivity.start(mContext, entity.title); } else { FastUtil.startActivity(mContext, entity.activity); } }
Example 3
Source File: ThirdLibraryActivity.java From FastLib with Apache License 2.0 | 5 votes |
@Override public void onItemClicked(BaseQuickAdapter<WidgetEntity, BaseViewHolder> adapter, View view, int position) { super.onItemClicked(adapter, view, position); WidgetEntity item = adapter.getItem(position); if (item == null || TextUtils.isEmpty(item.url)) { return; } WebViewActivity.start(mContext, item.url, true); }
Example 4
Source File: PrivateArticleFragment.java From MaoWanAndoidClient with Apache License 2.0 | 4 votes |
@Override public void onItemClick(BaseQuickAdapter adapter, View view, int position) { HomeArticleData homeArticleData = (HomeArticleData) adapter.getItem(position); StartDetailPage.start(_mActivity,homeArticleData, Constants.PAGE_WEB_NOT_COLLECT,Constants.ACTION_PAGE_DETAIL_ACTIVITY); }
Example 5
Source File: SquareFragment.java From MaoWanAndoidClient with Apache License 2.0 | 4 votes |
@Override public void onItemClick(BaseQuickAdapter adapter, View view, int position) { HomeArticleData homeArticleData = (HomeArticleData) adapter.getItem(position); StartDetailPage.start(_mActivity,homeArticleData, Constants.PAGE_WEB_COLLECT,Constants.ACTION_PAGE_DETAIL_ACTIVITY); }
Example 6
Source File: HomeFirstTabFragment.java From MaoWanAndoidClient with Apache License 2.0 | 4 votes |
@Override public void onItemClick(BaseQuickAdapter adapter, View view, int position) { //Toast.makeText(_mActivity,"首页数据 被点击 BaseQuickAdapter :"+adapter.getItem(position).toString(),Toast.LENGTH_SHORT).show(); HomeArticleData homeArticleData = (HomeArticleData) adapter.getItem(position); StartDetailPage.start(_mActivity,homeArticleData, Constants.PAGE_WEB_COLLECT,Constants.ACTION_PAGE_DETAIL_ACTIVITY); }
Example 7
Source File: HomeSecondTabFragment.java From MaoWanAndoidClient with Apache License 2.0 | 4 votes |
@Override public void onItemClick(BaseQuickAdapter adapter, View view, int position) { HomeArticleData homeArticleData = (HomeArticleData) adapter.getItem(position); StartDetailPage.start(_mActivity,homeArticleData, Constants.PAGE_WEB_COLLECT,Constants.ACTION_PAGE_DETAIL_ACTIVITY); }
Example 8
Source File: OfficialAccountsPageFragment.java From MaoWanAndoidClient with Apache License 2.0 | 4 votes |
@Override public void onItemClick(BaseQuickAdapter adapter, View view, int position) { KnowledgeHierarchyData knowledgeHierarchyData = (KnowledgeHierarchyData) adapter.getItem(position); StartDetailPage.start2(_mActivity,knowledgeHierarchyData, Constants.PAGE_OFFICIAL_ACCOUNTS_DETAIL,Constants.ACTION_OFFICIAL_ACCOUNTS_ACTIVITY); }
Example 9
Source File: SearchFragment.java From MaoWanAndoidClient with Apache License 2.0 | 4 votes |
@Override public void onItemClick(BaseQuickAdapter adapter, View view, int position) { HomeArticleData homeArticleData = (HomeArticleData) adapter.getItem(position); StartDetailPage.start(getActivity(),homeArticleData, Constants.PAGE_WEB_COLLECT,Constants.ACTION_PAGE_DETAIL_ACTIVITY); }
Example 10
Source File: KnowledgeLevel2PageFragment.java From MaoWanAndoidClient with Apache License 2.0 | 4 votes |
@Override public void onItemClick(BaseQuickAdapter adapter, View view, int position) { HomeArticleData homeArticleData = (HomeArticleData) adapter.getItem(position); StartDetailPage.start(_mActivity,homeArticleData, Constants.PAGE_WEB_COLLECT,Constants.ACTION_PAGE_DETAIL_ACTIVITY); }
Example 11
Source File: OfficialAccountsDetailActivity.java From MaoWanAndoidClient with Apache License 2.0 | 4 votes |
@Override public void onItemClick(BaseQuickAdapter adapter, View view, int position) { HomeArticleData homeArticleData = (HomeArticleData) adapter.getItem(position); StartDetailPage.start(this,homeArticleData, Constants.PAGE_WEB_COLLECT,Constants.ACTION_PAGE_DETAIL_ACTIVITY); }
Example 12
Source File: WebAppFragment.java From FastLib with Apache License 2.0 | 4 votes |
@Override public void onItemClicked(BaseQuickAdapter<WebAppEntity, BaseViewHolder> adapter, View view, int position) { WebAppEntity item = adapter.getItem(position); WebAppActivity.start(mContext, item.url, item.color); }