Methods Summary |
---|
private void | bufferedProgressChanged()
if (mListener != null) {
mListener.onBufferedProgressChanged(mBufferedProgressMs);
}
|
private static android.graphics.Bitmap | createBitmap(android.graphics.Bitmap bitmap, int color)
Bitmap dst = bitmap.copy(bitmap.getConfig(), true);
Canvas canvas = new Canvas(dst);
Paint paint = new Paint();
paint.setColorFilter(new PorterDuffColorFilter(color, PorterDuff.Mode.SRC_ATOP));
canvas.drawBitmap(bitmap, 0, 0, paint);
return dst;
|
private void | currentTimeChanged()
if (mListener != null) {
mListener.onCurrentTimeChanged(mCurrentTimeMs);
}
|
public int | getBufferedProgress()Returns the buffered progress for the playback controls row.
return mBufferedProgressMs;
|
private static int | getColorFromTheme(android.content.Context context, int attributeResId)
TypedValue outValue = new TypedValue();
context.getTheme().resolveAttribute(attributeResId, outValue, true);
return outValue.data;
|
public int | getCurrentTime()Returns the current time in milliseconds for the playback controls row.
return mCurrentTimeMs;
|
public final android.graphics.drawable.Drawable | getImageDrawable()Gets the image {@link Drawable} of this row.
return mImageDrawable;
|
public final java.lang.Object | getItem()Gets the main item for the details page.
return mItem;
|
public android.support.v17.leanback.widget.PlaybackControlsRow$OnPlaybackStateChangedListener | getOnPlaybackStateChangedListener()Returns the playback state listener.
return mListener;
|
public final ObjectAdapter | getPrimaryActionsAdapter()Returns the primary actions {@link ObjectAdapter}.
return mPrimaryActionsAdapter;
|
public final ObjectAdapter | getSecondaryActionsAdapter()Returns the secondary actions {@link ObjectAdapter}.
return mSecondaryActionsAdapter;
|
private static android.graphics.drawable.Drawable | getStyledDrawable(android.content.Context context, int index)
TypedValue outValue = new TypedValue();
context.getTheme().resolveAttribute(
R.attr.playbackControlsActionIcons, outValue, false);
TypedArray array = context.getTheme().obtainStyledAttributes(outValue.data,
R.styleable.lbPlaybackControlsActionIcons);
Drawable drawable = array.getDrawable(index);
array.recycle();
return drawable;
|
public int | getTotalTime()Returns the total time in milliseconds for the playback controls row.
return mTotalTimeMs;
|
public void | setBufferedProgress(int ms)Sets the buffered progress for the playback controls row.
If this row is bound to a view, the view will automatically
be updated to reflect the new value.
if (mBufferedProgressMs != ms) {
mBufferedProgressMs = ms;
bufferedProgressChanged();
}
|
public void | setCurrentTime(int ms)Sets the current time in milliseconds for the playback controls row.
If this row is bound to a view, the view will automatically
be updated to reflect the new value.
if (mCurrentTimeMs != ms) {
mCurrentTimeMs = ms;
currentTimeChanged();
}
|
public final void | setImageBitmap(android.content.Context context, android.graphics.Bitmap bm)Sets a {@link Bitmap} for this row.
mImageDrawable = new BitmapDrawable(context.getResources(), bm);
|
public final void | setImageDrawable(android.graphics.drawable.Drawable drawable)Sets a {link @Drawable} image for this row.
mImageDrawable = drawable;
|
public void | setOnPlaybackStateChangedListener(android.support.v17.leanback.widget.PlaybackControlsRow$OnPlaybackStateChangedListener listener)Sets a listener to be called when the playback state changes.
mListener = listener;
|
public final void | setPrimaryActionsAdapter(ObjectAdapter adapter)Sets the primary actions {@link ObjectAdapter}.
mPrimaryActionsAdapter = adapter;
|
public final void | setSecondaryActionsAdapter(ObjectAdapter adapter)Sets the secondary actions {@link ObjectAdapter}.
mSecondaryActionsAdapter = adapter;
|
public void | setTotalTime(int ms)Sets the total time in milliseconds for the playback controls row.
mTotalTimeMs = ms;
|