This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Similar in behavior to {@link FragmentStatePagerAdapter} | |
* <p> | |
* Lifecycle within {@link RecyclerView}: | |
* <ul> | |
* <li>{@link RecyclerView.ViewHolder} initially an empty {@link FrameLayout}, serves as a | |
* re-usable container for a {@link Fragment} in later stages. | |
* <li>{@link RecyclerView.Adapter#onBindViewHolder} we ask for a {@link Fragment} for the | |
* position. If we already have the fragment, or have previously saved its state, we use those. | |
* <li>{@link RecyclerView.Adapter#onAttachedToWindow} we attach the {@link Fragment} to a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.content.Context; | |
import android.content.res.TypedArray; | |
import android.graphics.Canvas; | |
import android.graphics.Rect; | |
import android.graphics.drawable.Drawable; | |
import android.support.v7.widget.LinearLayoutManager; | |
import android.support.v7.widget.RecyclerView; | |
import android.util.AttributeSet; | |
import android.view.View; |