use of com.android.settings.homepage.contextualcards.conditional.ConditionContextualCardRenderer.ConditionalCardHolder in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class ContextualCardsAdapterTest method onBindViewHolder_conditionalCard_shouldSetTestTitle.
@Test
public void onBindViewHolder_conditionalCard_shouldSetTestTitle() {
mAdapter.mContextualCards.add(buildConditionContextualCard());
final RecyclerView recyclerView = new RecyclerView(mActivity);
recyclerView.setLayoutManager(new LinearLayoutManager(mActivity));
final View view = LayoutInflater.from(mActivity).inflate(ConditionContextualCardRenderer.VIEW_TYPE_FULL_WIDTH, recyclerView, false);
final ConditionalCardHolder holder = new ConditionalCardHolder(view);
mAdapter.onBindViewHolder(holder, 0);
assertThat(holder.title.getText()).isEqualTo("test_title");
}
use of com.android.settings.homepage.contextualcards.conditional.ConditionContextualCardRenderer.ConditionalCardHolder in project android_packages_apps_Settings by omnirom.
the class ContextualCardsAdapterTest method onBindViewHolder_conditionalCard_shouldSetTestTitle.
@Test
public void onBindViewHolder_conditionalCard_shouldSetTestTitle() {
mAdapter.mContextualCards.add(buildConditionContextualCard());
final RecyclerView recyclerView = new RecyclerView(mActivity);
recyclerView.setLayoutManager(new LinearLayoutManager(mActivity));
final View view = LayoutInflater.from(mActivity).inflate(ConditionContextualCardRenderer.VIEW_TYPE_FULL_WIDTH, recyclerView, false);
final ConditionalCardHolder holder = new ConditionalCardHolder(view);
mAdapter.onBindViewHolder(holder, 0);
assertThat(holder.title.getText()).isEqualTo("test_title");
}
use of com.android.settings.homepage.contextualcards.conditional.ConditionContextualCardRenderer.ConditionalCardHolder in project android_packages_apps_Settings by omnirom.
the class SwipeDismissalDelegateTest method getConditionalViewHolder.
private RecyclerView.ViewHolder getConditionalViewHolder() {
final View view = LayoutInflater.from(mActivity).inflate(ConditionContextualCardRenderer.VIEW_TYPE_FULL_WIDTH, mRecyclerView, false);
final RecyclerView.ViewHolder viewHolder = spy(new ConditionalCardHolder(view));
doReturn(ConditionContextualCardRenderer.VIEW_TYPE_FULL_WIDTH).when(viewHolder).getItemViewType();
return viewHolder;
}
use of com.android.settings.homepage.contextualcards.conditional.ConditionContextualCardRenderer.ConditionalCardHolder in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class SwipeDismissalDelegateTest method getConditionalViewHolder.
private RecyclerView.ViewHolder getConditionalViewHolder() {
final View view = LayoutInflater.from(mActivity).inflate(ConditionContextualCardRenderer.VIEW_TYPE_FULL_WIDTH, mRecyclerView, false);
final RecyclerView.ViewHolder viewHolder = spy(new ConditionalCardHolder(view));
doReturn(ConditionContextualCardRenderer.VIEW_TYPE_FULL_WIDTH).when(viewHolder).getItemViewType();
return viewHolder;
}
Aggregations