use of androidx.recyclerview.widget.RecyclerView in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class StorageDashboardFragmentTest method test_dontLoadWhenQuotaOffIfVolumeInfoNotLoaded.
@Test
public void test_dontLoadWhenQuotaOffIfVolumeInfoNotLoaded() {
View fakeView = mock(View.class, RETURNS_DEEP_STUBS);
RecyclerView fakeRecyclerView = mock(RecyclerView.class, RETURNS_DEEP_STUBS);
when(fakeView.findViewById(anyInt())).thenReturn(fakeView);
mFragment = spy(mFragment);
when(mFragment.getView()).thenReturn(fakeView);
when(mFragment.getListView()).thenReturn(fakeRecyclerView);
PrivateStorageInfo info = new PrivateStorageInfo(0, 0);
mFragment.setPrivateStorageInfo(info);
mFragment.maybeSetLoading(false);
verify(mFragment, never()).setLoading(true, false);
}
use of androidx.recyclerview.widget.RecyclerView in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class SliceContextualCardRendererTest method getSliceViewHolder.
private RecyclerView.ViewHolder getSliceViewHolder() {
final RecyclerView recyclerView = new RecyclerView(mActivity);
recyclerView.setLayoutManager(new LinearLayoutManager(mActivity));
final View view = LayoutInflater.from(mActivity).inflate(VIEW_TYPE_FULL_WIDTH, recyclerView, false);
return mRenderer.createViewHolder(view, VIEW_TYPE_FULL_WIDTH);
}
use of androidx.recyclerview.widget.RecyclerView in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class SliceContextualCardRendererTest method getDeferredSetupViewHolder.
private RecyclerView.ViewHolder getDeferredSetupViewHolder() {
final RecyclerView recyclerView = new RecyclerView(mActivity);
recyclerView.setLayoutManager(new LinearLayoutManager(mActivity));
final View view = LayoutInflater.from(mActivity).inflate(VIEW_TYPE_DEFERRED_SETUP, recyclerView, false);
final RecyclerView.ViewHolder viewHolder = spy(new SliceDeferredSetupCardRendererHelper.DeferredSetupCardViewHolder(view));
doReturn(VIEW_TYPE_DEFERRED_SETUP).when(viewHolder).getItemViewType();
return viewHolder;
}
use of androidx.recyclerview.widget.RecyclerView in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class SliceDeferredSetupCardRendererHelperTest method getDeferredSetupCardViewHolder.
private RecyclerView.ViewHolder getDeferredSetupCardViewHolder() {
final RecyclerView recyclerView = new RecyclerView(mActivity);
recyclerView.setLayoutManager(new LinearLayoutManager(mActivity));
final View view = LayoutInflater.from(mActivity).inflate(VIEW_TYPE_DEFERRED_SETUP, recyclerView, false);
return mHelper.createViewHolder(view);
}
use of androidx.recyclerview.widget.RecyclerView in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class SliceHalfCardRendererHelperTest method getHalfCardViewHolder.
private RecyclerView.ViewHolder getHalfCardViewHolder() {
final RecyclerView recyclerView = new RecyclerView(mActivity);
recyclerView.setLayoutManager(new LinearLayoutManager(mActivity));
final View view = LayoutInflater.from(mActivity).inflate(VIEW_TYPE_HALF_WIDTH, recyclerView, false);
return mHelper.createViewHolder(view);
}
Aggregations