mirror of
https://gitlab.com/ultrasonic/ultrasonic.git
synced 2025-04-24 12:50:58 +03:00
Cleanup
This commit is contained in:
parent
c2a249f00e
commit
0169a02e4c
ultrasonic/src/main
kotlin/org/moire/ultrasonic/fragment
res/layout
@ -54,6 +54,8 @@ import timber.log.Timber
|
||||
|
||||
/**
|
||||
* Initiates a search on the media library and displays the results
|
||||
*
|
||||
* TODO: Implement the search field without using the deprecated OptionsMenu calls
|
||||
*/
|
||||
class SearchFragment : MultiListFragment<Identifiable>(), KoinComponent {
|
||||
private var searchResult: SearchResult? = null
|
||||
@ -140,7 +142,7 @@ class SearchFragment : MultiListFragment<Identifiable>(), KoinComponent {
|
||||
}
|
||||
|
||||
/**
|
||||
* This method create the search bar above the recycler view
|
||||
* This method creates the search bar above the recycler view
|
||||
*/
|
||||
override fun onCreateOptionsMenu(menu: Menu, inflater: MenuInflater) {
|
||||
val activity = activity ?: return
|
||||
|
@ -14,10 +14,10 @@
|
||||
a:layout_height="match_parent"
|
||||
a:orientation="vertical">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
a:id="@+id/toolbar"
|
||||
a:layout_width="match_parent"
|
||||
a:layout_height="wrap_content" />
|
||||
a:layout_height="?attr/actionBarSize" />
|
||||
|
||||
<androidx.fragment.app.FragmentContainerView
|
||||
a:id="@+id/nav_host_fragment"
|
||||
@ -46,5 +46,5 @@
|
||||
a:layout_gravity="start"
|
||||
a:fitsSystemWindows="true"
|
||||
app:headerLayout="@layout/navigation_header"
|
||||
app:menu="@menu/navigation" />
|
||||
app:menu="@menu/navigation"/>
|
||||
</androidx.drawerlayout.widget.DrawerLayout>
|
@ -1,66 +1,65 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<LinearLayout xmlns:a="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/now_playing"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/colorSecondaryContainer"
|
||||
a:id="@+id/now_playing"
|
||||
a:layout_width="fill_parent"
|
||||
a:layout_height="wrap_content"
|
||||
a:background="?attr/colorSecondaryContainer"
|
||||
tools:ignore="Overdraw">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/now_playing_image"
|
||||
android:layout_width="72.0dip"
|
||||
android:layout_height="72.0dip"
|
||||
android:layout_marginStart="0dp"
|
||||
android:elevation="4dp"
|
||||
android:focusable="true"
|
||||
android:gravity="center"
|
||||
android:importantForAccessibility="no" />
|
||||
a:id="@+id/now_playing_image"
|
||||
a:layout_width="72.0dip"
|
||||
a:layout_height="72.0dip"
|
||||
a:layout_marginStart="0dp"
|
||||
a:elevation="4dp"
|
||||
a:focusable="true"
|
||||
a:gravity="center"
|
||||
a:importantForAccessibility="no" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0.0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_weight="1.0"
|
||||
android:orientation="vertical"
|
||||
android:paddingStart="11.0dip">
|
||||
a:layout_width="0.0dp"
|
||||
a:layout_height="wrap_content"
|
||||
a:layout_gravity="center_vertical"
|
||||
a:layout_weight="1.0"
|
||||
a:orientation="vertical"
|
||||
a:paddingStart="11.0dip">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/now_playing_trackname"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="start"
|
||||
android:ellipsize="marquee"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
/>
|
||||
a:id="@+id/now_playing_trackname"
|
||||
a:layout_width="wrap_content"
|
||||
a:layout_height="wrap_content"
|
||||
a:layout_gravity="start"
|
||||
a:ellipsize="marquee"
|
||||
a:singleLine="true"
|
||||
a:textAppearance="@style/TextAppearance.Material3.TitleMedium" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/now_playing_artist"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="start"
|
||||
android:ellipsize="end"
|
||||
android:scrollHorizontally="true"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="@style/TextAppearance.Material3.BodyMedium" />
|
||||
a:id="@+id/now_playing_artist"
|
||||
a:layout_width="wrap_content"
|
||||
a:layout_height="wrap_content"
|
||||
a:layout_gravity="start"
|
||||
a:ellipsize="end"
|
||||
a:scrollHorizontally="true"
|
||||
a:singleLine="true"
|
||||
a:textAppearance="@style/TextAppearance.Material3.BodyMedium" />
|
||||
</LinearLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/now_playing_control_play"
|
||||
style="@style/Widget.Material3.Button.IconButton"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_gravity="center|end"
|
||||
android:layout_marginTop="2dip"
|
||||
android:layout_marginEnd="16dip"
|
||||
android:layout_weight="0.0"
|
||||
android:contentDescription="@string/buttons.play"
|
||||
android:focusable="false"
|
||||
android:scaleType="fitCenter"
|
||||
app:icon="@drawable/media_pause"
|
||||
app:iconGravity="textTop"
|
||||
app:iconSize="42dp" />
|
||||
a:id="@+id/now_playing_control_play"
|
||||
style="@style/Widget.Material3.Button.IconButton"
|
||||
a:layout_width="48dp"
|
||||
a:layout_height="48dp"
|
||||
a:layout_gravity="center|end"
|
||||
a:layout_marginTop="2dip"
|
||||
a:layout_marginEnd="16dip"
|
||||
a:layout_weight="0.0"
|
||||
a:contentDescription="@string/buttons.play"
|
||||
a:focusable="false"
|
||||
a:scaleType="fitCenter"
|
||||
app:icon="@drawable/media_pause"
|
||||
app:iconGravity="textTop"
|
||||
app:iconSize="42dp" />
|
||||
|
||||
</LinearLayout>
|
Loading…
x
Reference in New Issue
Block a user