Browse Source

Merge branch 'bugfix/70-missing-title-in-search-results' into 'develop'

#70: Fix missing search results title

Closes #70

See merge request funkwhale/funkwhale-android!44
enhancement/speed-up-pipelines
Ryan Harg 3 years ago
parent
commit
a35a0dc6c0
  1. 3
      app/src/main/java/audio/funkwhale/ffa/adapters/SearchAdapter.kt
  2. 10
      app/src/main/res/layout/activity_search.xml
  3. 5
      app/src/main/res/layout/row_track.xml

3
app/src/main/java/audio/funkwhale/ffa/adapters/SearchAdapter.kt

@ -184,7 +184,7 @@ class SearchAdapter(
.transform(RoundedCornersTransformation(16, 0)) .transform(RoundedCornersTransformation(16, 0))
.into(rowTrackViewHolder?.cover) .into(rowTrackViewHolder?.cover)
searchHeaderViewHolder?.title?.text = item.title() rowTrackViewHolder?.title?.text = item.title()
rowTrackViewHolder?.artist?.text = item.subtitle() rowTrackViewHolder?.artist?.text = item.subtitle()
Build.VERSION_CODES.P.onApi( Build.VERSION_CODES.P.onApi(
@ -312,6 +312,7 @@ class SearchAdapter(
inner class RowTrackViewHolder(val binding: RowTrackBinding, context: Context?) : inner class RowTrackViewHolder(val binding: RowTrackBinding, context: Context?) :
ViewHolder(binding.root, context), View.OnClickListener { ViewHolder(binding.root, context), View.OnClickListener {
val title = binding.title
val cover = binding.cover val cover = binding.cover
val artist = binding.artist val artist = binding.artist

10
app/src/main/res/layout/activity_search.xml

@ -58,12 +58,12 @@
android:layout_marginStart="16dp" android:layout_marginStart="16dp"
android:layout_marginTop="16dp" android:layout_marginTop="16dp"
android:layout_marginEnd="16dp" android:layout_marginEnd="16dp"
android:drawableTop="@drawable/funkwhaleshape"
android:drawablePadding="16dp" android:drawablePadding="16dp"
android:drawableTint="#525252"
android:text="@string/search_welcome" android:text="@string/search_welcome"
android:textAlignment="center" android:textAlignment="center"
android:textSize="14sp" /> android:textSize="14sp"
app:drawableTint="#525252"
app:drawableTopCompat="@drawable/funkwhaleshape" />
<TextView <TextView
android:id="@+id/search_no_results" android:id="@+id/search_no_results"
@ -72,9 +72,9 @@
android:layout_marginStart="16dp" android:layout_marginStart="16dp"
android:layout_marginTop="16dp" android:layout_marginTop="16dp"
android:layout_marginEnd="16dp" android:layout_marginEnd="16dp"
android:drawableTop="@drawable/funkwhaleshape" app:drawableTopCompat="@drawable/funkwhaleshape"
android:drawablePadding="16dp" android:drawablePadding="16dp"
android:drawableTint="#525252" app:drawableTint="#525252"
android:text="@string/search_no_results" android:text="@string/search_no_results"
android:textAlignment="center" android:textAlignment="center"
android:textSize="14sp" android:textSize="14sp"

5
app/src/main/res/layout/row_track.xml

@ -1,6 +1,7 @@
<?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:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginHorizontal="8dp" android:layout_marginHorizontal="8dp"
@ -45,9 +46,9 @@
style="@style/AppTheme.ItemTitle" style="@style/AppTheme.ItemTitle"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:drawableStart="@drawable/downloaded" app:drawableStartCompat="@drawable/downloaded"
android:drawablePadding="8dp" android:drawablePadding="8dp"
android:drawableTint="@color/controlColor" app:drawableTint="@color/controlColor"
android:ellipsize="end" android:ellipsize="end"
android:lines="1" android:lines="1"
tools:text="Absolution" /> tools:text="Absolution" />

Loading…
Cancel
Save