Fixes form peer review
This commit is contained in:
parent
056e3a4d66
commit
1a050c2d73
|
@ -22,11 +22,13 @@
|
||||||
android:name=".activities.SplashActivity"
|
android:name=".activities.SplashActivity"
|
||||||
android:launchMode="singleInstance"
|
android:launchMode="singleInstance"
|
||||||
android:noHistory="true"
|
android:noHistory="true"
|
||||||
|
android:screenOrientation="portrait"
|
||||||
android:exported="true">
|
android:exported="true">
|
||||||
|
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MAIN" />
|
<action android:name="android.intent.action.MAIN" />
|
||||||
<action android:name="android.intent.action.VIEW" />
|
<action android:name="android.intent.action.VIEW" />
|
||||||
|
|
||||||
<category android:name="android.intent.category.LAUNCHER" />
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
|
|
||||||
|
@ -38,7 +40,9 @@
|
||||||
android:launchMode="singleInstance"
|
android:launchMode="singleInstance"
|
||||||
android:screenOrientation="portrait" />
|
android:screenOrientation="portrait" />
|
||||||
|
|
||||||
<activity android:name=".activities.MainActivity" />
|
<activity
|
||||||
|
android:name=".activities.MainActivity"
|
||||||
|
android:screenOrientation="portrait" />
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".activities.DownloadsActivity"
|
android:name=".activities.DownloadsActivity"
|
||||||
|
|
|
@ -109,6 +109,7 @@ class MainActivity : AppCompatActivity() {
|
||||||
setContentView(binding.root)
|
setContentView(binding.root)
|
||||||
|
|
||||||
setSupportActionBar(binding.appbar)
|
setSupportActionBar(binding.appbar)
|
||||||
|
supportActionBar?.setDisplayShowTitleEnabled(false)
|
||||||
|
|
||||||
onBackPressedDispatcher.addCallback(this) {
|
onBackPressedDispatcher.addCallback(this) {
|
||||||
if (binding.nowPlayingBottomSheet.isOpen) {
|
if (binding.nowPlayingBottomSheet.isOpen) {
|
||||||
|
|
|
@ -6,6 +6,7 @@ import android.util.TypedValue
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import android.widget.FrameLayout
|
import android.widget.FrameLayout
|
||||||
|
import androidx.cardview.widget.CardView
|
||||||
import androidx.coordinatorlayout.widget.CoordinatorLayout
|
import androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||||
import androidx.core.content.res.use
|
import androidx.core.content.res.use
|
||||||
import audio.funkwhale.ffa.R
|
import audio.funkwhale.ffa.R
|
||||||
|
@ -16,7 +17,7 @@ import com.google.android.material.bottomsheet.BottomSheetBehavior.BottomSheetCa
|
||||||
|
|
||||||
class NowPlayingBottomSheet @JvmOverloads constructor(
|
class NowPlayingBottomSheet @JvmOverloads constructor(
|
||||||
context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0
|
context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0
|
||||||
) : FrameLayout(context, attrs, defStyleAttr), BottomSheetIneractable {
|
) : CardView(context, attrs, defStyleAttr), BottomSheetIneractable {
|
||||||
private val behavior = BottomSheetBehavior<NowPlayingBottomSheet>()
|
private val behavior = BottomSheetBehavior<NowPlayingBottomSheet>()
|
||||||
private val targetHeaderId: Int
|
private val targetHeaderId: Int
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:layout_constraintBottom_toTopOf="@id/appbar_wrapper">
|
app:layout_constraintBottom_toTopOf="@id/appbar">
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/nav_host_fragment_wrapper"
|
android:id="@+id/nav_host_fragment_wrapper"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -43,6 +43,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@color/elevatedSurface"
|
android:background="@color/elevatedSurface"
|
||||||
|
app:cardElevation="8dp"
|
||||||
app:target_header="@id/constraint_layout_placeholder">
|
app:target_header="@id/constraint_layout_placeholder">
|
||||||
<androidx.fragment.app.FragmentContainerView
|
<androidx.fragment.app.FragmentContainerView
|
||||||
android:id="@+id/now_playing"
|
android:id="@+id/now_playing"
|
||||||
|
@ -53,21 +54,14 @@
|
||||||
</audio.funkwhale.ffa.views.NowPlayingBottomSheet>
|
</audio.funkwhale.ffa.views.NowPlayingBottomSheet>
|
||||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||||
|
|
||||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
<androidx.appcompat.widget.Toolbar
|
||||||
android:id="@+id/appbar_wrapper"
|
android:id="@+id/appbar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="?attr/actionBarSize"
|
||||||
app:layout_constraintBottom_toBottomOf="parent">
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
android:theme="@style/AppTheme.AppBar"
|
||||||
|
app:navigationIcon="@drawable/funkwhaleshape"
|
||||||
|
tools:menu="@menu/toolbar"
|
||||||
|
|
||||||
<com.google.android.material.bottomappbar.BottomAppBar
|
/>
|
||||||
android:id="@+id/appbar"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="bottom"
|
|
||||||
android:theme="@style/AppTheme.AppBar"
|
|
||||||
app:backgroundTint="@color/elevatedSurface"
|
|
||||||
app:layout_insetEdge="bottom"
|
|
||||||
app:navigationIcon="@drawable/funkwhaleshape"
|
|
||||||
tools:menu="@menu/toolbar" />
|
|
||||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:layout_constraintBottom_toTopOf="@id/appbar_wrapper">
|
app:layout_constraintBottom_toTopOf="@id/appbar">
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -32,7 +32,8 @@
|
||||||
android:id="@+id/now_playing_bottom_sheet"
|
android:id="@+id/now_playing_bottom_sheet"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@color/elevatedSurface"
|
android:backgroundTint="@color/elevatedSurface"
|
||||||
|
app:cardElevation="16dp"
|
||||||
app:target_header="@id/constraint_layout_placeholder">
|
app:target_header="@id/constraint_layout_placeholder">
|
||||||
<androidx.fragment.app.FragmentContainerView
|
<androidx.fragment.app.FragmentContainerView
|
||||||
android:id="@+id/now_playing"
|
android:id="@+id/now_playing"
|
||||||
|
@ -44,21 +45,14 @@
|
||||||
</audio.funkwhale.ffa.views.NowPlayingBottomSheet>
|
</audio.funkwhale.ffa.views.NowPlayingBottomSheet>
|
||||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||||
|
|
||||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
<androidx.appcompat.widget.Toolbar
|
||||||
android:id="@+id/appbar_wrapper"
|
android:id="@+id/appbar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="?attr/actionBarSize"
|
||||||
app:layout_constraintBottom_toBottomOf="parent">
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
android:theme="@style/AppTheme.AppBar"
|
||||||
<com.google.android.material.bottomappbar.BottomAppBar
|
android:background="@color/elevatedSurface"
|
||||||
android:id="@+id/appbar"
|
app:navigationIcon="@drawable/funkwhaleshape"
|
||||||
android:layout_width="match_parent"
|
tools:menu="@menu/toolbar"
|
||||||
android:layout_height="wrap_content"
|
/>
|
||||||
android:layout_gravity="bottom"
|
|
||||||
android:theme="@style/AppTheme.AppBar"
|
|
||||||
app:backgroundTint="@color/elevatedSurface"
|
|
||||||
app:layout_insetEdge="bottom"
|
|
||||||
app:navigationIcon="@drawable/funkwhaleshape"
|
|
||||||
tools:menu="@menu/toolbar" />
|
|
||||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
|
@ -50,7 +50,7 @@
|
||||||
android:id="@+id/controls"
|
android:id="@+id/controls"
|
||||||
layout="@layout/partial_now_playing_controls"
|
layout="@layout/partial_now_playing_controls"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="0dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="8dp"
|
android:layout_margin="8dp"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/detail_image_placeholder"
|
app:layout_constraintTop_toBottomOf="@id/detail_image_placeholder"
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<merge
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
|
||||||
|
</merge>
|
|
@ -39,6 +39,7 @@
|
||||||
app:layout_constraintStart_toStartOf="@id/constraint_layout_placeholder"
|
app:layout_constraintStart_toStartOf="@id/constraint_layout_placeholder"
|
||||||
app:layout_constraintTop_toBottomOf="@id/now_playing_progress"
|
app:layout_constraintTop_toBottomOf="@id/now_playing_progress"
|
||||||
app:layout_constraintBottom_toBottomOf="@id/constraint_layout_placeholder"
|
app:layout_constraintBottom_toBottomOf="@id/constraint_layout_placeholder"
|
||||||
|
android:scaleType="centerCrop"
|
||||||
app:srcCompat="@drawable/cover"
|
app:srcCompat="@drawable/cover"
|
||||||
tools:src="@tools:sample/avatars"
|
tools:src="@tools:sample/avatars"
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -68,9 +68,9 @@
|
||||||
<style name="AppTheme.AppBar" parent="ThemeOverlay.MaterialComponents.Toolbar.Primary">
|
<style name="AppTheme.AppBar" parent="ThemeOverlay.MaterialComponents.Toolbar.Primary">
|
||||||
<item name="android:drawableTint" tools:targetApi="m">@color/colorPrimary</item>
|
<item name="android:drawableTint" tools:targetApi="m">@color/colorPrimary</item>
|
||||||
<item name="android:tint">@color/colorPrimary</item>
|
<item name="android:tint">@color/colorPrimary</item>
|
||||||
|
|
||||||
<item name="actionBarPopupTheme">@style/AppTheme.PopupMenu</item>
|
<item name="actionBarPopupTheme">@style/AppTheme.PopupMenu</item>
|
||||||
<item name="popupTheme">@style/AppTheme.PopupMenu</item>
|
<item name="popupTheme">@style/AppTheme.PopupMenu</item>
|
||||||
|
<item name="android:elevation">16dp</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="AppTheme.PopupMenu" parent="ThemeOverlay.MaterialComponents.Toolbar.Primary">
|
<style name="AppTheme.PopupMenu" parent="ThemeOverlay.MaterialComponents.Toolbar.Primary">
|
||||||
|
|
Loading…
Reference in New Issue