Skip to content

Commit

Permalink
fix overlap between sound playback controller and floating action but…
Browse files Browse the repository at this point in the history
…tons
  • Loading branch information
ashutoshgngwr committed Dec 30, 2023
1 parent ae91687 commit 14aa445
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 24 deletions.
20 changes: 10 additions & 10 deletions app/src/main/res/layout/home_fragment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,11 @@
android:layout_width="match_parent"
android:layout_height="0dp"
app:defaultNavHost="true"
app:layout_constraintBottom_toTopOf="@id/bottom_nav"
app:layout_constraintBottom_toTopOf="@id/playback_controller"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<com.google.android.material.bottomnavigation.BottomNavigationView
android:id="@+id/bottom_nav"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:menu="@menu/home_nav" />

<androidx.fragment.app.FragmentContainerView
android:id="@+id/playback_controller"
android:name="com.github.ashutoshgngwr.noice.fragment.SoundPlaybackControllerFragment"
Expand All @@ -34,4 +25,13 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />

<com.google.android.material.bottomnavigation.BottomNavigationView
android:id="@+id/bottom_nav"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:menu="@menu/home_nav" />

</androidx.constraintlayout.widget.ConstraintLayout>
8 changes: 3 additions & 5 deletions app/src/main/res/layout/library_fragment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipToPadding="false"
android:paddingBottom="@{viewModel.isPlaying ? viewModel.isSavePresetButtonVisible ? @dimen/sound_list_padding_extra_extended : @dimen/sound_list_padding_extended : @dimen/sound_list_padding_normal}"
android:paddingBottom="@{viewModel.isSavePresetButtonVisible ? @dimen/sound_list_padding_extended : @dimen/sound_list_padding_normal}"
app:hasFixedSize="@{true}"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />

Expand All @@ -46,8 +46,7 @@
style="?attr/floatingActionButtonPrimaryStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
android:layout_marginBottom="76dp"
android:layout_margin="16dp"
android:contentDescription="@string/save_preset"
android:src="@drawable/round_save_24"
android:visibility="gone"
Expand All @@ -59,8 +58,7 @@
style="?attr/floatingActionButtonSecondaryStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
android:layout_marginBottom="@{viewModel.isPlaying ? viewModel.isSavePresetButtonVisible ? @dimen/random_preset_fab_margin_normal : @dimen/random_preset_fab_margin_extended : @dimen/random_preset_fab_margin_normal}"
android:layout_margin="16dp"
android:contentDescription="@string/random_preset"
android:src="@drawable/round_shuffle_24"
app:isVisible="@{!viewModel.libraryItems.empty || viewModel.apiErrorStrRes == null}"
Expand Down
2 changes: 0 additions & 2 deletions app/src/main/res/layout/presets_fragment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@
android:id="@+id/list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipToPadding="false"
android:paddingBottom="76dp"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />

</FrameLayout>
4 changes: 1 addition & 3 deletions app/src/main/res/layout/sleep_timer_fragment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="vertical"
android:paddingHorizontal="@dimen/root_layout_padding"
android:paddingTop="@dimen/root_layout_padding"
android:paddingBottom="76dp">
android:padding="@dimen/root_layout_padding">

<com.github.ashutoshgngwr.noice.widget.CountdownTextView
android:id="@+id/countdown_view"
Expand Down
5 changes: 1 addition & 4 deletions app/src/main/res/values/dimens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
<dimen name="root_layout_padding">16dp</dimen>
<dimen name="modal_root_layout_padding">24dp</dimen>
<dimen name="alarms_weekday_toggle_button_size">32dp</dimen>
<dimen name="sound_list_padding_extra_extended">220dp</dimen>
<dimen name="sound_list_padding_extended">148dp</dimen>
<dimen name="sound_list_padding_extended">160dp</dimen>
<dimen name="sound_list_padding_normal">88dp</dimen>
<dimen name="random_preset_fab_margin_normal">16dp</dimen>
<dimen name="random_preset_fab_margin_extended">76dp</dimen>
</resources>

0 comments on commit 14aa445

Please sign in to comment.