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