Skip to content

Instantly share code, notes, and snippets.

@marcelsanches2
marcelsanches2 / ViewVisibilityIdlingResource.java
Created June 15, 2016 18:23 — forked from vaughandroid/ViewVisibilityIdlingResource.java
An IdlingResource for Espresso which blocks until a View has a particular visibility state.
package com.vaughandroid.test.espresso.idlingresources;
import android.app.Activity;
import android.os.Handler;
import android.support.annotation.IdRes;
import android.support.annotation.NonNull;
import android.support.test.espresso.*;
import android.view.View;
import java.lang.ref.WeakReference;
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (c) 2015 Upclose.me All rights reserved.
~
~ 0000000 xx
~ 00000000 xxxx
~ 0000000000 xxl
~ 00000000000000
~ 000000000000
~ 00000000
import android.content.Context;
import android.graphics.Bitmap;
import android.renderscript.Allocation;
import android.renderscript.Element;
import android.renderscript.RenderScript;
import android.renderscript.ScriptIntrinsicBlur;
import com.squareup.picasso.Transformation;
public class BlurTransform implements Transformation {

You can use this class to realize a simple sectioned RecyclerView.Adapter without changing your code.

The RecyclerView should use a LinearLayoutManager. You can use this code also with the TwoWayView with the ListLayoutManager (https://github.com/lucasr/twoway-view)

This is a porting of the class SimpleSectionedListAdapter provided by Google

Screen

Example: