Skip to content

Commit

Permalink
Changed MotionLayout scene
Browse files Browse the repository at this point in the history
Took 26 minutes
  • Loading branch information
shockch4rge committed Aug 18, 2021
1 parent 1ffd183 commit 544909f
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 45 deletions.
46 changes: 23 additions & 23 deletions app/src/main/res/layout/fragment_hub.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,28 +25,28 @@
app:itemTextColor="@drawable/bottom_nav_item_state"
app:menu="@menu/bottom_navigation" />

<androidx.coordinatorlayout.widget.CoordinatorLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@id/navBar">

<androidx.core.widget.NestedScrollView
android:id="@+id/bottomSheet"
android:layout_width="match_parent"
android:layout_height="400dp"
android:background="@color/white"
app:behavior_hideable="true"
app:behavior_peekHeight="55dp"
app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior">

<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:scaleType="centerCrop"
android:src="@drawable/cover_art_placeholder" />

</androidx.core.widget.NestedScrollView>

</androidx.coordinatorlayout.widget.CoordinatorLayout>
<!-- <androidx.coordinatorlayout.widget.CoordinatorLayout-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="match_parent"-->
<!-- android:layout_above="@id/navBar">-->

<!-- <androidx.core.widget.NestedScrollView-->
<!-- android:id="@+id/bottomSheet"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="400dp"-->
<!-- android:background="@color/white"-->
<!-- app:behavior_hideable="true"-->
<!-- app:behavior_peekHeight="55dp"-->
<!-- app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior">-->

<!-- <ImageView-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:scaleType="centerCrop"-->
<!-- android:src="@drawable/cover_art_placeholder" />-->

<!-- </androidx.core.widget.NestedScrollView>-->

<!-- </androidx.coordinatorlayout.widget.CoordinatorLayout>-->

</RelativeLayout>
2 changes: 1 addition & 1 deletion app/src/main/res/layout/fragment_player.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
android:id="@+id/btn_back_press"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="30dp"
android:layout_marginStart="20dp"
android:layout_marginTop="15dp"
android:background="?attr/selectableItemBackgroundBorderless"
android:src="@drawable/svg_back_btn"
Expand Down
35 changes: 14 additions & 21 deletions app/src/main/res/xml/fragment_player_scene.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
android:id="@+id/recycler_bg"
android:layout_width="match_parent"
android:layout_height="700dp"
android:layout_marginTop="130dp"
android:layout_marginTop="310dp"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
Expand All @@ -40,38 +40,37 @@
android:id="@+id/progress_bar"
android:layout_width="370dp"
android:layout_height="wrap_content"
android:layout_marginTop="200dp"
android:layout_marginTop="140dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/artist_holder" />
<Constraint
android:id="@+id/song_holder"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:layout_marginTop="45dp"
android:textAlignment="viewStart"
app:layout_constraintStart_toEndOf="@id/cover_art_holder"
app:layout_constraintTop_toTopOf="parent" />
android:layout_marginTop="20dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/cover_art_holder" />
<Constraint
android:id="@+id/artist_holder"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:textAlignment="viewStart"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="@+id/song_holder"
app:layout_constraintEnd_toEndOf="@id/song_holder"
app:layout_constraintTop_toBottomOf="@+id/song_holder"
app:layout_constraintVertical_bias="0.0" />
<Constraint
android:id="@+id/cover_art_holder"
android:layout_width="80dp"
android:layout_height="80dp"
android:layout_marginStart="30dp"
android:layout_marginTop="30dp"
android:layout_width="200dp"
android:layout_height="200dp"
android:elevation="6dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:layout_marginTop="21dp" />
<Constraint
android:id="@+id/queue_dragger"
android:layout_width="match_parent"
Expand Down Expand Up @@ -109,12 +108,6 @@
app:touchAnchorSide="bottom"
app:touchRegionId="@id/queue_dragger" />
<KeyFrameSet>
<KeyPosition
app:framePosition="40"
app:keyPositionType="deltaRelative"
app:motionTarget="@+id/cover_art_holder"
app:percentY="0.9"
app:sizePercent="0.7" />
<KeyAttribute
app:motionTarget="@+id/playing_from"
app:framePosition="10"
Expand All @@ -125,12 +118,12 @@
android:alpha="0" />
<KeyPosition
app:motionTarget="@+id/playing_from_text"
app:framePosition="8"
app:framePosition="10"
app:keyPositionType="deltaRelative"
app:percentY="1.0" />
<KeyPosition
app:motionTarget="@+id/playing_from"
app:framePosition="8"
app:framePosition="10"
app:keyPositionType="deltaRelative"
app:percentY="1.0" />

Expand Down

0 comments on commit 544909f

Please sign in to comment.