Skip to content

Commit

Permalink
Merge pull request #92 from learning-layers/integration
Browse files Browse the repository at this point in the history
Release v1.4.1
  • Loading branch information
melonmanchan committed May 12, 2016
2 parents f34282d + a76922f commit 665b757
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -349,9 +349,14 @@ protected void onActivityResult(int requestCode, int resultCode, Intent data) {

@Override
public void createAnnotation(PointF position) {
// Allow creating annotations only when paused
if (playerFragment.getState() != PlayerFragment.State.PAUSED) {

// No annotating while pause is already going on
if (playerFragment.getState() == PlayerFragment.State.ANNOTATION_PAUSED) {
return;

} else if (playerFragment.getState() != PlayerFragment.State.PAUSED) {
playerFragment.pause();
playerFragment.setState(PlayerFragment.State.PAUSED);
}
// Disallow creating annotations when an annotation is being edited
if (areAnnotationControlsVisible()) {
Expand Down Expand Up @@ -498,7 +503,6 @@ public void onPlaybackStateChanged(PlayerFragment.State state) {

case PLAYING:
enableControls();
hideControlsOverlay();
playPauseButton.setImageResource(R.drawable.ic_action_pause);
break;

Expand Down Expand Up @@ -563,9 +567,6 @@ public boolean dispatchTouchEvent(@Nonnull MotionEvent event) {
cancelControlsOverlayHide();
break;

case MotionEvent.ACTION_UP:
hideControlsOverlay();
break;
}

return super.dispatchTouchEvent(event);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ public LinearLayout getSubtitleContainer() {
return subtitleContainer;
}

private void setState(State state) {
public void setState(State state) {
this.state = state;

if (listener != null) {
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/drawable/floating_controls_background.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
android:top="16dp" />

<solid
android:color="@color/background_floating_material_dark" />
android:color="#00000000" />

<corners
android:radius="2dp" />
Expand Down
5 changes: 4 additions & 1 deletion app/src/main/res/layout/activity_player.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_margin="16dp" />
android:layout_marginRight="8dp"
android:layout_marginLeft="8dp"
android:layout_marginBottom="8dp"
android:layout_marginTop="8dp" />

<ViewStub
android:id="@+id/annotationControls"
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/res/layout/partial_annotation_controls.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:textColor="@color/white"
android:textColorHint="@color/white_text"
android:hint="@string/annotation_hint"
android:inputType="text" />

Expand Down

0 comments on commit 665b757

Please sign in to comment.