all: remove databinding

Remove databinding entirely.

Databinding was a terrible idea for Auxio. I rarely leveraged it, and
when I did, it produced messy code and bloated build times. Dumpster it
for just viewbinding, which is good. This reduces building times by
nearly 2/3, and generally makes the codebase more coherent and usable.
This commit is contained in:
OxygenCobalt
2022-03-23 10:59:01 -06:00
parent 95057ec357
commit d79592e029
61 changed files with 861 additions and 1307 deletions
+16 -28
View File
@@ -1,26 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.constraintlayout.widget.ConstraintLayout 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"
tools:context=".detail.recycler.AlbumDetailAdapter.AlbumSongViewHolder">
style="@style/Widget.Auxio.ItemLayout">
<data>
<variable
name="song"
type="org.oxycblt.auxio.music.Song" />
</data>
<androidx.constraintlayout.widget.ConstraintLayout style="@style/Widget.Auxio.ItemLayout">
<ImageView
android:id="@+id/song_track_placeholder"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@string/def_track"
android:src="@drawable/ic_song"
android:visibility="gone"
app:tint="@color/sel_accented"
<ImageView
android:id="@+id/song_track_placeholder"
style="@style/Widget.Auxio.Image.Small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@string/def_track"
android:src="@drawable/ic_song"
android:visibility="invisible"
app:tint="@color/sel_accented"
app:layout_constraintBottom_toBottomOf="@+id/song_track"
app:layout_constraintEnd_toEndOf="@+id/song_track"
app:layout_constraintStart_toStartOf="@+id/song_track"
@@ -31,33 +24,30 @@
android:id="@+id/song_track"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@{@string/desc_track_number(song.track)}"
android:gravity="center"
android:maxLines="1"
android:minWidth="@dimen/size_track_number"
android:text="@{@string/fmt_track(song.track)}"
android:textAlignment="center"
android:textAppearance="@style/TextAppearance.Auxio.BodyLarge"
android:textColor="@color/sel_accented_secondary"
android:textSize="@dimen/text_size_ext_title_mid_larger"
android:textSize="@dimen/text_size_ext_title_mid_large"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/song_name"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="1" />
tools:text="16" />
<TextView
android:id="@+id/song_name"
style="@style/Widget.Auxio.TextView.Item.Primary"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@{song.resolvedName}"
android:textColor="@color/sel_accented_primary"
app:layout_constraintBottom_toTopOf="@+id/song_duration"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/song_track"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintTop_toTopOf="@+id/song_track"
app:layout_constraintVertical_chainStyle="packed"
tools:text="Song Name" />
@@ -66,13 +56,11 @@
style="@style/Widget.Auxio.TextView.Item.Secondary"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@{song.formattedDuration}"
android:textColor="?android:attr/textColorSecondary"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintBottom_toBottomOf="@+id/song_track"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/song_track"
app:layout_constraintTop_toBottomOf="@+id/song_name"
tools:text="16:16" />
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>