Package com.leia.sdk.views
Class RecyclerViewAsset
- java.lang.Object
-
- com.leia.sdk.views.InputViewsAsset
-
- com.leia.sdk.views.RecyclerViewAsset
-
public class RecyclerViewAsset extends InputViewsAsset
RecyclerViewAsset provides an optimized solution for displaying many small interlaced views in one InterlacedSurfaceView.Due to Android's graphics architecture, multiple small SurfaceViews work much worse than one SurfaceView of combined resolution. RecyclerViewAsset solves this problem by rendering multiple viewports onto a single InterlacedSurfaceView.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
RecyclerViewAsset.AdaptiveRenderScheduler
static class
RecyclerViewAsset.Item
Defines lifetime of a ViewportView binding.static class
RecyclerViewAsset.ViewportConfig
static class
RecyclerViewAsset.ViewportView
A placeholder view for an interlaced viewport.-
Nested classes/interfaces inherited from class com.leia.sdk.views.InputViewsAsset
InputViewsAsset.BitmapHolder, InputViewsAsset.PictureImpl
-
-
Field Summary
-
Fields inherited from class com.leia.sdk.views.InputViewsAsset
mImpl
-
-
Constructor Summary
Constructors Constructor Description RecyclerViewAsset(View recyclerView)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RecyclerViewAsset.Item
add(int position, RecyclerViewAsset.ViewportView viewportView, InputViewsAsset asset, RecyclerViewAsset.ViewportConfig initialConfig)
Binds an InputsViewsAsset to the viewportView.void
remove(RecyclerViewAsset.Item item)
Unbinds the item's viewportView, effectively hiding the viewport and releasing its graphics resources.void
setBackgroundColor(int color)
void
withAdaptiveScheduler(InterlacedSurfaceView interlacedView, long preferredPeriod, TimeUnit periodUnit)
-
Methods inherited from class com.leia.sdk.views.InputViewsAsset
close, createEmptySurfaceForVideo, createEmptySurfaceForVideo, CreateEmptySurfaceForVideo, createSurfaceForVideo, createSurfaceFromLoadedBitmap, createSurfaceFromLoadedBitmap, CreateSurfaceFromLoadedBitmap, CreateSurfaceFromLoadedBitmap, loadBitmapFromPathIntoSurface, loadBitmapFromPathIntoSurface, LoadBitmapFromPathIntoSurface, LoadBitmapFromPathIntoSurface
-
-
-
-
Constructor Detail
-
RecyclerViewAsset
public RecyclerViewAsset(View recyclerView)
-
-
Method Detail
-
withAdaptiveScheduler
public void withAdaptiveScheduler(InterlacedSurfaceView interlacedView, long preferredPeriod, TimeUnit periodUnit)
-
setBackgroundColor
public void setBackgroundColor(@ColorInt int color)
-
add
public RecyclerViewAsset.Item add(int position, RecyclerViewAsset.ViewportView viewportView, InputViewsAsset asset, RecyclerViewAsset.ViewportConfig initialConfig)
Binds an InputsViewsAsset to the viewportView. Call this when viewportView becomes visible.Use
remove(Item)
to hide the viewport and free graphics resources.
-
remove
public void remove(RecyclerViewAsset.Item item)
Unbinds the item's viewportView, effectively hiding the viewport and releasing its graphics resources.
-
-