diff options
-rw-r--r-- | main/src/com/google/android/setupdesign/template/ListMixin.java | 20 | ||||
-rw-r--r-- | main/src/com/google/android/setupdesign/view/IllustrationVideoView.java | 12 |
2 files changed, 23 insertions, 9 deletions
diff --git a/main/src/com/google/android/setupdesign/template/ListMixin.java b/main/src/com/google/android/setupdesign/template/ListMixin.java index 6e2cb20..38928aa 100644 --- a/main/src/com/google/android/setupdesign/template/ListMixin.java +++ b/main/src/com/google/android/setupdesign/template/ListMixin.java @@ -187,15 +187,17 @@ public class ListMixin implements Mixin { if (defaultDivider == null) { defaultDivider = listView.getDivider(); } - divider = - DrawableLayoutDirectionHelper.createRelativeInsetDrawable( - defaultDivider, - dividerInsetStart /* start */, - 0 /* top */, - dividerInsetEnd /* end */, - 0 /* bottom */, - templateLayout); - listView.setDivider(divider); + if (defaultDivider != null) { + divider = + DrawableLayoutDirectionHelper.createRelativeInsetDrawable( + defaultDivider, + dividerInsetStart /* start */, + 0 /* top */, + dividerInsetEnd /* end */, + 0 /* bottom */, + templateLayout); + listView.setDivider(divider); + } } } diff --git a/main/src/com/google/android/setupdesign/view/IllustrationVideoView.java b/main/src/com/google/android/setupdesign/view/IllustrationVideoView.java index 0654b02..2e4fd71 100644 --- a/main/src/com/google/android/setupdesign/view/IllustrationVideoView.java +++ b/main/src/com/google/android/setupdesign/view/IllustrationVideoView.java @@ -368,6 +368,18 @@ public class IllustrationVideoView extends TextureView return false; } + /** + * Seeks to specified time position. + * + * @param milliseconds the offset in milliseconds from the start to seek to + * @throws IllegalStateException if the internal player engine has not been initialized + */ + public void seekTo(int milliseconds) { + if (mediaPlayer != null) { + mediaPlayer.seekTo(milliseconds); + } + } + @VisibleForTesting(otherwise = VisibleForTesting.PROTECTED) public MediaPlayer getMediaPlayer() { return mediaPlayer; |