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