public class PagerView extends ViewPager implements RevelControl
Modifier and Type | Class and Description |
---|---|
class |
PagerView.CoverTransformer |
class |
PagerView.DepthPageTransformer |
class |
PagerView.FixedSpeedScroller |
class |
PagerView.ZoomOutPageTransformer |
Modifier and Type | Field and Description |
---|---|
static int |
COVER_PAGE_TRANSFORM |
static int |
DEFAULT_PAGE_TRANSFORM |
static int |
DEPTH_PAGE_TRANSFORM |
protected java.util.List<PlaylistListener> |
playlistListeners |
static int |
ZOOM_OUT_PAGE_TRANSFORM |
Constructor and Description |
---|
PagerView(android.content.Context context,
android.util.AttributeSet attrs) |
PagerView(android.content.Context context,
Module module) |
Modifier and Type | Method and Description |
---|---|
void |
addPlaylistListener(PlaylistListener listener) |
void |
dispose()
Dispose.
|
java.lang.String |
getName()
Gets the name.
|
java.util.Iterator<? extends Option> |
getOptions()
Gets the options.
|
Playlist |
getPlaylist()
Gets the playlist.
|
Source |
getSource() |
int |
getTransitionDuration()
Get the duration in milliseconds for source transitions
|
ModuleType |
getType()
Gets the module type.
|
int |
getZIndex()
Gets the z index.
|
void |
initialize(Module module)
Initialize.
|
protected void |
internalNext() |
boolean |
isAutoStart()
Checks if auto start is enabled.
|
boolean |
isStarted()
True is control is currently started.
|
void |
next() |
void |
onDownloadFeedCompleted(Feed feed) |
void |
onDownloadFileCompleted(File file) |
void |
previous() |
void |
registerPlayedListener(PlayedListener listener) |
void |
removePlaylistListener(PlaylistListener listener) |
void |
setAutoStart(boolean flag)
Sets auto start.
|
void |
setModule(Module module) |
void |
setPageTransformation(int transform) |
void |
setSource(int idx)
Sets and plays the source specified by playlist index (0 based).
|
void |
setSource(int idx,
boolean play)
Set the source by index (0 based).
|
void |
setSource(Source source)
Sets and plays the specified
Source in the playlist. |
void |
setSource(Source source,
boolean play)
Sets the current source.
|
void |
setTransitionDuration(int duration)
Sets the duration in milliseconds for source transitions
|
void |
start()
Start.
|
void |
startAt(int idx)
Starts playing at the specified playlist index.
|
void |
startAt(Source source)
Starts playing at the specified
Source . |
void |
stop()
Stop.
|
protected void |
update() |
public static final int DEFAULT_PAGE_TRANSFORM
public static final int ZOOM_OUT_PAGE_TRANSFORM
public static final int DEPTH_PAGE_TRANSFORM
public static final int COVER_PAGE_TRANSFORM
protected java.util.List<PlaylistListener> playlistListeners
public PagerView(android.content.Context context, android.util.AttributeSet attrs)
public PagerView(android.content.Context context, Module module)
public void setModule(Module module)
public void next()
public void previous()
public void addPlaylistListener(PlaylistListener listener)
public void removePlaylistListener(PlaylistListener listener)
public void setSource(int idx)
Indexes greater than the size of the playlist will wrap.
idx
- the index of the source in the playlistpublic void setSource(int idx, boolean play)
idx
- the index of the source in the playlistplay
- set false to only set current source and not start playbackpublic void setSource(Source source)
Source
in the playlist.source
- the sourcepublic void setSource(Source source, boolean play)
source
- the new sourceplay
- set false to only set current source and not start playbackpublic Source getSource()
public void setPageTransformation(int transform)
protected void internalNext()
protected void update()
public void initialize(Module module)
RevelControl
initialize
in interface RevelControl
module
- the modulepublic void startAt(int idx)
stop()
is called.
Only available from version 2.1.144
on.
idx
- public void startAt(Source source)
Source
. Play will continue until stop()
is called.
Only available from version 2.1.144
on.
source
- public int getTransitionDuration()
public void setTransitionDuration(int duration)
duration
- transition time in millisecondspublic void start()
RevelControl
start
in interface RevelControl
public void stop()
RevelControl
stop
in interface RevelControl
public void registerPlayedListener(PlayedListener listener)
public void onDownloadFeedCompleted(Feed feed)
public void onDownloadFileCompleted(File file)
public void dispose()
RevelControl
dispose
in interface RevelControl
public int getZIndex()
RevelControl
getZIndex
in interface RevelControl
public java.lang.String getName()
RevelControl
getName
in interface RevelControl
public Playlist getPlaylist()
RevelControl
getPlaylist
in interface RevelControl
public java.util.Iterator<? extends Option> getOptions()
RevelControl
getOptions
in interface RevelControl
public ModuleType getType()
RevelControl
getType
in interface RevelControl
public boolean isAutoStart()
RevelControl
isAutoStart
in interface RevelControl
public void setAutoStart(boolean flag)
RevelControl
setAutoStart
in interface RevelControl
flag
- the new auto start valuepublic boolean isStarted()
RevelControl
isStarted
in interface RevelControl