diff --git a/app/src/main/res/layout-large/fragment_playback.xml b/app/src/main/res/layout-large/fragment_playback.xml index 440cdd0a8..60b25b325 100644 --- a/app/src/main/res/layout-large/fragment_playback.xml +++ b/app/src/main/res/layout-large/fragment_playback.xml @@ -41,7 +41,7 @@ android:id="@+id/playback_cover" android:layout_width="0dp" android:layout_height="0dp" - android:layout_margin="@dimen/margin_mid_large" + android:layout_margin="@dimen/margin_huge" android:contentDescription="@{@string/description_album_cover(song.name)}" android:elevation="@dimen/elevation_normal" android:outlineProvider="bounds" @@ -57,8 +57,8 @@ android:id="@+id/playback_song" android:layout_width="0dp" android:layout_height="wrap_content" - android:layout_marginStart="@dimen/margin_mid_large" - android:layout_marginEnd="@dimen/margin_mid_large" + android:layout_marginStart="@dimen/margin_huge" + android:layout_marginEnd="@dimen/margin_huge" android:ellipsize="marquee" android:fontFamily="@font/inter_semibold" android:marqueeRepeatLimit="marquee_forever" @@ -77,8 +77,8 @@ android:id="@+id/playback_artist" android:layout_width="0dp" android:layout_height="wrap_content" - android:layout_marginStart="@dimen/margin_mid_large" - android:layout_marginEnd="@dimen/margin_mid_large" + android:layout_marginStart="@dimen/margin_huge" + android:layout_marginEnd="@dimen/margin_huge" android:ellipsize="end" android:onClick="@{() -> detailModel.navToItem(playbackModel.song.album.artist)}" android:singleLine="true" @@ -95,8 +95,8 @@ android:id="@+id/playback_album" android:layout_width="0dp" android:layout_height="wrap_content" - android:layout_marginStart="@dimen/margin_mid_large" - android:layout_marginEnd="@dimen/margin_mid_large" + android:layout_marginStart="@dimen/margin_huge" + android:layout_marginEnd="@dimen/margin_huge" android:layout_marginBottom="@dimen/margin_medium" android:ellipsize="end" android:onClick="@{() -> detailModel.navToItem(playbackModel.song.album)}" @@ -116,8 +116,8 @@ android:layout_height="wrap_content" android:clickable="true" android:focusable="true" - android:paddingStart="@dimen/margin_mid_large" - android:paddingEnd="@dimen/margin_mid_large" + android:paddingStart="@dimen/margin_huge" + android:paddingEnd="@dimen/margin_huge" android:progressBackgroundTint="?android:attr/colorControlNormal" android:progressTint="?attr/colorPrimary" android:splitTrack="false" @@ -132,7 +132,7 @@ android:id="@+id/playback_duration_current" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginStart="@dimen/margin_mid_large" + android:layout_marginStart="@dimen/margin_huge" android:layout_marginBottom="@dimen/margin_medium" app:layout_constraintBottom_toTopOf="@+id/playback_play_pause" app:layout_constraintStart_toStartOf="parent" @@ -142,7 +142,7 @@ android:id="@+id/playback_song_duration" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginEnd="@dimen/margin_mid_large" + android:layout_marginEnd="@dimen/margin_huge" android:layout_marginBottom="@dimen/margin_medium" android:text="@{song.formattedDuration}" app:layout_constraintBottom_toTopOf="@+id/playback_play_pause" @@ -174,7 +174,7 @@ 16dp 24dp 32dp + 48dp 128dp diff --git a/info/ARCHITECTURE.md b/info/ARCHITECTURE.md index 168bfa80a..790c94742 100644 --- a/info/ARCHITECTURE.md +++ b/info/ARCHITECTURE.md @@ -1,6 +1,6 @@ # Architecture -This document is designed to provide a simple overview of Auxio's architecture and some guides on how to add to the codebase in an elegant manner. It will be updated as aspects about Auxio change. +This document is designed to provide a simple overview of Auxio's architecture and where code resides/should reside. It will be updated as aspects about Auxio change. #### Code structure @@ -100,7 +100,7 @@ All music objects inherit `BaseModel`, which guarantees that all music has both Auxio's playback system is somewhat unorthodox, as it avoids a lot of the built-in android code in favor of a more understandable and controllable system. Its structured around a couple of objects, the connections being highlighted in this diagram. ``` - Playback UI Queue UIs PlaybackService + Playback UIs Queue UI PlaybackService │ │ │ │ │ │ PlaybackViewModel─────┘ │ @@ -109,13 +109,13 @@ Auxio's playback system is somewhat unorthodox, as it avoids a lot of the built- PlaybackStateManager───────────────────┘ ``` -`PlaybackStateManager` is the shared object that contains the master copy of the playback state, doing all operations on it. This object should ***NEVER*** be used in a UI, as it does not sanitize input and can cause major problems if a Volatile UI interacts with it. It's callback system is also prone to memory leaks if not cleared when done. `PlaybackViewModel` can be used instead, as it exposes stable data and abstracted functions that UI's can use to interact with the playback state. +`PlaybackStateManager` is the shared object that contains the master copy of the playback state, doing all operations on it. This object should ***NEVER*** be used in a UI, as it does not sanitize input and can cause major problems if a Volatile UI interacts with it. It's callback system is also prone to memory leaks if not cleared when done. `PlaybackViewModel` should be used instead, as it exposes stable data and safe functions that UI's can use to interact with the playback state. -`PlaybackService`'s job is to use the playback state to manage the ExoPlayer instance and also modify the state depending on system events, such as when a button is pressed on a headset. It should **never** be bound to, mostly because there is no need given that `PlaybackViewModel` exposes the same data in a much safer fashion. +`PlaybackService`'s job is to use the playback state to manage the ExoPlayer instance and also modify the state depending on system events, such as when a button is pressed on a headset. It should **never** be bound to, mostly because there is no need given that `PlaybackViewModel` exposes the same data in a much safer fashion. #### `.recycler` -Shared RecyclerView utilities. Important ones to note are `DiffCallback`, which acts as a reusable differ callback for all `BaseModel` instances, and the shared ViewHolders for each data type, such as `SongViewHolder` or `HeaderViewHolder`. +Shared RecyclerView utilities, often for adapters and ViewHolders. Important ones to note are `DiffCallback`, which acts as a reusable differ callback based off of `BaseModel` for `ListAdapter`s, and the shared ViewHolders for each data type, such as `SongViewHolder` or `HeaderViewHolder`. #### `.search` @@ -127,7 +127,7 @@ Package for the songs UI, there is no data management here, only a user interfac #### `.ui` -Shared User Interface utilities. This is primarily made up of convenience/extension functions. It also contains some dedicated utilities, such as: +Shared User Interface utilities. This is primarily made up of convenience/extension functions relating to Views, Resources, Configurations, and Contexts. It also contains some dedicated utilities, such as: - The Accent Management system - `newMenu` and `ActionMenu`, which automates menu creation for most datatypes - `memberBinding` and `MemberBinder`, which allows for viewbindings to be used as a member variable without memory leaks or nullability issues. \ No newline at end of file