Minor fixes

Fix some ordering & display issues. Also slightly increased the play/pause icons size on PlaybackFragment.
This commit is contained in:
OxygenCobalt 2021-01-29 21:21:57 -07:00
parent b3e5777a47
commit 15dbe59db5
No known key found for this signature in database
GPG key ID: 37DBE3621FE9AD47
19 changed files with 84 additions and 49 deletions

View file

@ -19,6 +19,7 @@ import org.oxycblt.auxio.music.BaseModel
import org.oxycblt.auxio.music.Genre import org.oxycblt.auxio.music.Genre
import org.oxycblt.auxio.music.Song import org.oxycblt.auxio.music.Song
import org.oxycblt.auxio.ui.ActionMenu import org.oxycblt.auxio.ui.ActionMenu
import org.oxycblt.auxio.ui.fixAnimInfoLeak
import org.oxycblt.auxio.ui.getSpans import org.oxycblt.auxio.ui.getSpans
import org.oxycblt.auxio.ui.requireCompatActivity import org.oxycblt.auxio.ui.requireCompatActivity
@ -99,6 +100,12 @@ class LibraryFragment : Fragment() {
libraryModel.updateNavigationStatus(false) libraryModel.updateNavigationStatus(false)
} }
override fun onDestroyView() {
super.onDestroyView()
fixAnimInfoLeak()
}
/** /**
* Navigate to an item * Navigate to an item
* @param baseModel The item that should be navigated to. * @param baseModel The item that should be navigated to.

View file

@ -109,11 +109,9 @@ class CompactPlaybackFragment : Fragment() {
} else { } else {
// Use static icons on the first firing of this observer so that the icons // Use static icons on the first firing of this observer so that the icons
// don't animate on startup, which looks weird. // don't animate on startup, which looks weird.
if (it) { binding.playbackControls.setImageResource(
binding.playbackControls.setImageResource(R.drawable.ic_pause_large) if (it) R.drawable.ic_pause_large else R.drawable.ic_play_large
} else { )
binding.playbackControls.setImageResource(R.drawable.ic_play_large)
}
playbackModel.enableAnimation() playbackModel.enableAnimation()
} }

View file

@ -272,7 +272,7 @@ class SettingsManager private constructor(context: Context) :
const val AT_END_LOOP = "LOOP" const val AT_END_LOOP = "LOOP"
/** /**
* Stop at the end. Similar to phonograph. * Stop at the end. Similar to Phonograph.
*/ */
const val AT_END_STOP = "STOP" const val AT_END_STOP = "STOP"
} }

View file

@ -53,6 +53,7 @@
android:fontFamily="@font/inter" android:fontFamily="@font/inter"
android:textAppearance="?android:attr/textAppearanceMedium" android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="?android:attr/textColorPrimary" android:textColor="?android:attr/textColorPrimary"
android:textAlignment="center"
app:layout_constraintBottom_toTopOf="@+id/loading_retry_button" app:layout_constraintBottom_toTopOf="@+id/loading_retry_button"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5" app:layout_constraintHorizontal_bias="0.5"

View file

@ -29,7 +29,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
app:boxBackgroundMode="filled" app:boxBackgroundMode="filled"
app:boxStrokeWidth="0dp" app:boxStrokeWidth="0dp"
app:endIconContentDescription="@string/description_search_clear" app:endIconContentDescription="@string/description_clear_search"
app:endIconDrawable="@drawable/ic_close" app:endIconDrawable="@drawable/ic_close"
app:endIconMode="clear_text" app:endIconMode="clear_text"
app:errorEnabled="false"> app:errorEnabled="false">

View file

@ -98,16 +98,12 @@
<string name="hint_search_library">Durchsuche deine Musikbibliothek…</string> <string name="hint_search_library">Durchsuche deine Musikbibliothek…</string>
<!-- Description Namespace | Accessibility Strings --> <!-- Description Namespace | Accessibility Strings -->
<string name="description_album_cover">Albumcover für %s</string>
<string name="description_artist_image">Künstlerbild für %s</string>
<string name="description_genre_image">Genrebild für %s</string>
<string name="description_track_number">Titel %d</string>
<string name="description_error">Fehler</string>
<string name="description_sort_button">Reihenfolge ändern</string> <string name="description_sort_button">Reihenfolge ändern</string>
<string name="description_sort_none">Standard Reihenfolge</string> <string name="description_sort_none">Standard Reihenfolge</string>
<string name="description_sort_alpha_down">von A bis Z sortieren</string> <string name="description_sort_alpha_down">von A bis Z sortieren</string>
<string name="description_sort_alpha_up">von Z bis A sortieren</string> <string name="description_sort_alpha_up">von Z bis A sortieren</string>
<string name="description_clear_user_queue">Warteschlange entleeren</string> <string name="description_track_number">Titel %d</string>
<string name="description_play">Abspielen</string> <string name="description_play">Abspielen</string>
<string name="description_pause">Pausieren</string> <string name="description_pause">Pausieren</string>
<string name="description_skip_prev">Zu letzter Lied springen</string> <string name="description_skip_prev">Zu letzter Lied springen</string>
@ -115,8 +111,15 @@
<string name="description_shuffle_on">Zufällig anschalten</string> <string name="description_shuffle_on">Zufällig anschalten</string>
<string name="description_shuffle_off">Zufällig ausschalten</string> <string name="description_shuffle_off">Zufällig ausschalten</string>
<string name="description_change_loop">Art die Wiederholung ändern</string> <string name="description_change_loop">Art die Wiederholung ändern</string>
<string name="description_clear_search">Suchanfrage Löschen</string>
<string name="description_clear_user_queue">Warteschlange entleeren</string>
<string name="description_error">Fehler</string>
<string name="description_auxio_icon">Auxio-Icon</string> <string name="description_auxio_icon">Auxio-Icon</string>
<string name="description_search_clear">Suchanfrage Löschen</string> <string name="description_album_cover">Albumcover für %s</string>
<string name="description_artist_image">Künstlerbild für %s</string>
<string name="description_genre_image">Genrebild für %s</string>
<!-- Placeholder Namespace | Placeholder values --> <!-- Placeholder Namespace | Placeholder values -->
<string name="placeholder_genre">Unbekanntes Genre</string> <string name="placeholder_genre">Unbekanntes Genre</string>

View file

@ -58,11 +58,14 @@
<!-- Description Namespace | Accessibility Strings --> <!-- Description Namespace | Accessibility Strings -->
<string name="description_track_number">Κομμάτι %d</string> <string name="description_track_number">Κομμάτι %d</string>
<string name="description_error">Εμφάνιση σφάλματος</string>
<string name="description_clear_user_queue">Εκκαθάριση ουράς αναπαραγωγής</string>
<string name="description_play">Αναπαραγωγή</string> <string name="description_play">Αναπαραγωγή</string>
<string name="description_pause">Παύση</string> <string name="description_pause">Παύση</string>
<string name="description_clear_user_queue">Εκκαθάριση ουράς αναπαραγωγής</string>
<string name="description_error">Εμφάνιση σφάλματος</string>
<!-- Hint Namespace | EditText Hints --> <!-- Hint Namespace | EditText Hints -->
<string name="hint_search_library">Αναζήτηση στη βιβλιοθήκη…</string> <string name="hint_search_library">Αναζήτηση στη βιβλιοθήκη…</string>

View file

@ -67,11 +67,14 @@
<!-- Description Namespace | Accessibility Strings --> <!-- Description Namespace | Accessibility Strings -->
<string name="description_track_number">Pista %d</string> <string name="description_track_number">Pista %d</string>
<string name="description_error">Error</string>
<string name="description_clear_user_queue">Vaciar cola de reproducción</string>
<string name="description_pause">Pausar</string> <string name="description_pause">Pausar</string>
<string name="description_play">Reproducir</string> <string name="description_play">Reproducir</string>
<string name="description_clear_user_queue">Vaciar cola de reproducción</string>
<string name="description_error">Error</string>
<!-- Hint Namespace | EditText Hints --> <!-- Hint Namespace | EditText Hints -->
<string name="hint_search_library">Busca en tu biblioteca…</string> <string name="hint_search_library">Busca en tu biblioteca…</string>

View file

@ -67,11 +67,13 @@
<!-- Description Namespace | Accessibility Strings --> <!-- Description Namespace | Accessibility Strings -->
<string name="description_track_number">Morceau %d</string> <string name="description_track_number">Morceau %d</string>
<string name="description_error">Lerreur</string>
<string name="description_clear_user_queue">Effacer la file d\'attente</string>
<string name="description_play">Lecture</string> <string name="description_play">Lecture</string>
<string name="description_pause">Pause</string> <string name="description_pause">Pause</string>
<string name="description_clear_user_queue">Effacer la file d\'attente</string>
<string name="description_error">Lerreur</string>
<!-- Hint Namespace | EditText Hints --> <!-- Hint Namespace | EditText Hints -->
<string name="hint_search_library">Recherche dans votre bibliothèque…</string> <string name="hint_search_library">Recherche dans votre bibliothèque…</string>

View file

@ -57,10 +57,11 @@
<string name="error_no_music">कोई संगीत नहीं मिला</string> <string name="error_no_music">कोई संगीत नहीं मिला</string>
<!-- Description Namespace | Accessibility Strings --> <!-- Description Namespace | Accessibility Strings -->
<string name="description_error">त्रुटी</string>
<string name="description_play">चलाएं</string> <string name="description_play">चलाएं</string>
<string name="description_pause">रोकें</string> <string name="description_pause">रोकें</string>
<string name="description_error">त्रुटी</string>
<!-- Hint Namespace | EditText Hints --> <!-- Hint Namespace | EditText Hints -->
<string name="hint_search_library">संग्रह में खोजें</string> <string name="hint_search_library">संग्रह में खोजें</string>

View file

@ -67,11 +67,14 @@
<!-- Description Namespace | Accessibility Strings --> <!-- Description Namespace | Accessibility Strings -->
<string name="description_track_number">Traccia %d</string> <string name="description_track_number">Traccia %d</string>
<string name="description_error">Errore</string>
<string name="description_clear_user_queue">Svuota coda</string>
<string name="description_play">Play</string> <string name="description_play">Play</string>
<string name="description_pause">Pausa</string> <string name="description_pause">Pausa</string>
<string name="description_clear_user_queue">Svuota coda</string>
<string name="description_error">Errore</string>
<!-- Hint Namespace | EditText Hints --> <!-- Hint Namespace | EditText Hints -->
<string name="hint_search_library">Cerca nella tua libreria…</string> <string name="hint_search_library">Cerca nella tua libreria…</string>

View file

@ -67,11 +67,14 @@
<!-- Description Namespace | Accessibility Strings --> <!-- Description Namespace | Accessibility Strings -->
<string name="description_track_number">Nummer %d</string> <string name="description_track_number">Nummer %d</string>
<string name="description_error">Fout</string>
<string name="description_clear_user_queue">Leeg wachtrij</string>
<string name="description_play">Afspelen</string> <string name="description_play">Afspelen</string>
<string name="description_pause">Pauzeren</string> <string name="description_pause">Pauzeren</string>
<string name="description_clear_user_queue">Leeg wachtrij</string>
<string name="description_error">Fout</string>
<!-- Hint Namespace | EditText Hints --> <!-- Hint Namespace | EditText Hints -->
<string name="hint_search_library">Zoek in je bibliotheek…</string> <string name="hint_search_library">Zoek in je bibliotheek…</string>

View file

@ -66,11 +66,14 @@
<!-- Description Namespace | Accessibility Strings --> <!-- Description Namespace | Accessibility Strings -->
<string name="description_track_number">Música %d</string> <string name="description_track_number">Música %d</string>
<string name="description_error">Erro</string>
<string name="description_clear_user_queue">Limpar fila</string>
<string name="description_play">Reproduzir</string> <string name="description_play">Reproduzir</string>
<string name="description_pause">Pausar</string> <string name="description_pause">Pausar</string>
<string name="description_clear_user_queue">Limpar fila</string>
<string name="description_error">Erro</string>
<!-- Hint Namespace | EditText Hints --> <!-- Hint Namespace | EditText Hints -->
<string name="hint_search_library">Procurar na biblioteca…</string> <string name="hint_search_library">Procurar na biblioteca…</string>

View file

@ -66,11 +66,14 @@
<!-- Description Namespace | Accessibility Strings --> <!-- Description Namespace | Accessibility Strings -->
<string name="description_track_number">Música %d</string> <string name="description_track_number">Música %d</string>
<string name="description_error">Error</string>
<string name="description_clear_user_queue">Limpar fila</string>
<string name="description_play">Reproduzir</string> <string name="description_play">Reproduzir</string>
<string name="description_pause">Pausar</string> <string name="description_pause">Pausar</string>
<string name="description_clear_user_queue">Limpar fila</string>
<string name="description_error">Error</string>
<!-- Hint Namespace | EditText Hints --> <!-- Hint Namespace | EditText Hints -->
<string name="hint_search_library">Procurar na biblioteca…</string> <string name="hint_search_library">Procurar na biblioteca…</string>

View file

@ -65,11 +65,14 @@
<!-- Description Namespace | Accessibility Strings --> <!-- Description Namespace | Accessibility Strings -->
<string name="description_track_number">Трек %d</string> <string name="description_track_number">Трек %d</string>
<string name="description_error">Ошибка</string>
<string name="description_clear_user_queue">Очистить очередь</string>
<string name="description_play">Воспроизвести</string> <string name="description_play">Воспроизвести</string>
<string name="description_pause">Пауза</string> <string name="description_pause">Пауза</string>
<string name="description_clear_user_queue">Очистить очередь</string>
<string name="description_error">Ошибка</string>
<!-- Hint Namespace | EditText Hints --> <!-- Hint Namespace | EditText Hints -->
<string name="hint_search_library">Поиск в библиотеке…</string> <string name="hint_search_library">Поиск в библиотеке…</string>

View file

@ -5,7 +5,6 @@
<dimen name="padding_tiny">4dp</dimen> <dimen name="padding_tiny">4dp</dimen>
<dimen name="padding_small">8dp</dimen> <dimen name="padding_small">8dp</dimen>
<dimen name="padding_medium">16dp</dimen> <dimen name="padding_medium">16dp</dimen>
<dimen name="padding_play_pause">17dp</dimen>
<!-- Margin namespace | Dimens for margin attributes --> <!-- Margin namespace | Dimens for margin attributes -->
<dimen name="margin_small">8dp</dimen> <dimen name="margin_small">8dp</dimen>

View file

@ -1,17 +1,17 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources> <resources>
<!-- Info namespace | App labels --> <!-- Info namespace | App labels -->
<string name="info_app_name">Auxio</string> <string name="info_app_name" translatable="false">Auxio</string>
<!-- Format Namespace | Value formatting/plurals --> <!-- Format Namespace | Value formatting/plurals -->
<string name="format_info">%1$s / %2$s</string> <string name="format_info" translatable="false">%1$s / %2$s</string>
<string name="format_double_info">%1$s / %2$s / %3$s</string> <string name="format_double_info" translatable="false">%1$s / %2$s / %3$s</string>
<string name="format_double_counts">%1$s, %2$s</string> <string name="format_double_counts" translatable="false">%1$s, %2$s</string>
<string name="format_accent_summary">&lt;b>%1$s&lt;/b>:&#160;%2$s</string> <string name="format_accent_summary" translatable="false">&lt;b>%1$s&lt;/b>:&#160;%2$s</string>
<!-- Debug Namespace | Debug labels --> <!-- Debug Namespace | Debug labels -->
<string name="debug_title">Debug</string> <string name="debug_title" translatable="false">Debug</string>
<string name="debug_state_save">Save playback state</string> <string name="debug_state_save" translatable="false">Save playback state</string>
<string name="debug_state_save_desc">Force save the current playback state</string> <string name="debug_state_save_desc" translatable="false">Force save the current playback state</string>
<string name="debug_state_saved">State saved</string> <string name="debug_state_saved" translatable="false">State saved</string>
</resources> </resources>

View file

@ -98,16 +98,12 @@
<string name="hint_search_library">Search your library…</string> <string name="hint_search_library">Search your library…</string>
<!-- Description Namespace | Accessibility Strings --> <!-- Description Namespace | Accessibility Strings -->
<string name="description_album_cover">Album Cover for %s</string>
<string name="description_artist_image">Artist Image for %s</string>
<string name="description_genre_image">Genre Image for %s</string>
<string name="description_track_number">Track %d</string>
<string name="description_error">Error</string>
<string name="description_sort_button">Change Sort Order</string> <string name="description_sort_button">Change Sort Order</string>
<string name="description_sort_none">Default Sort Order</string> <string name="description_sort_none">Default Sort Order</string>
<string name="description_sort_alpha_down">Sort from A to Z</string> <string name="description_sort_alpha_down">Sort from A to Z</string>
<string name="description_sort_alpha_up">Sort from Z to A</string> <string name="description_sort_alpha_up">Sort from Z to A</string>
<string name="description_clear_user_queue">Clear queue</string> <string name="description_track_number">Track %d</string>
<string name="description_play">Play</string> <string name="description_play">Play</string>
<string name="description_pause">Pause</string> <string name="description_pause">Pause</string>
<string name="description_skip_next">Skip to next song</string> <string name="description_skip_next">Skip to next song</string>
@ -115,8 +111,15 @@
<string name="description_shuffle_on">Turn shuffle on</string> <string name="description_shuffle_on">Turn shuffle on</string>
<string name="description_shuffle_off">Turn shuffle off</string> <string name="description_shuffle_off">Turn shuffle off</string>
<string name="description_change_loop">Change Repeat Mode</string> <string name="description_change_loop">Change Repeat Mode</string>
<string name="description_clear_user_queue">Clear queue</string>
<string name="description_clear_search">Clear search query</string>
<string name="description_error">Error</string>
<string name="description_auxio_icon">Auxio icon</string> <string name="description_auxio_icon">Auxio icon</string>
<string name="description_search_clear">Clear search query</string> <string name="description_album_cover">Album Cover for %s</string>
<string name="description_artist_image">Artist Image for %s</string>
<string name="description_genre_image">Genre Image for %s</string>
<!-- Placeholder Namespace | Placeholder values --> <!-- Placeholder Namespace | Placeholder values -->
<string name="placeholder_genre">Unknown Genre</string> <string name="placeholder_genre">Unknown Genre</string>

View file

@ -236,6 +236,6 @@
<item name="android:layout_marginTop">@dimen/margin_medium</item> <item name="android:layout_marginTop">@dimen/margin_medium</item>
<item name="android:layout_marginEnd">@dimen/margin_large</item> <item name="android:layout_marginEnd">@dimen/margin_large</item>
<item name="android:scaleType">fitCenter</item> <item name="android:scaleType">fitCenter</item>
<item name="android:padding">@dimen/padding_play_pause</item> <item name="android:padding">@dimen/padding_medium</item>
</style> </style>
</resources> </resources>