Commit graph

1214 commits

Author SHA1 Message Date
OxygenCobalt
f85f366144
ui: change adapter animations
Rework the submitList animation to be less resource intensive and nicer
looking (at the cost of scroll positioning)

notifyDatasetChanged is slow and has no animation, but list diffing is
chaotic and basically useless outside of search. However, clearing the
adapter and then populating it with new items seems to work quite well,
albeit with the scroll position being lost sadly. Switch to that.
2022-06-07 19:14:54 -06:00
OxygenCobalt
d15055cc29
music: improve exoplayer tag management
Extend the range of tags Auxio is capable of recognizing, removing some
edge-cases in the process.

This is mostly three changes:
1. Auxio no longer tolerates tracks/discs/years that are 0. These are
usually never valid.
2. Auxio now has support for original date/year values. This are niche
tags, but I was inspired to implement it by this HN discussion at
https://news.ycombinator.com/item?id=31659799 simply because it
differentiates Auxio.
3. Auxio can handle the more esoteric tag variations in vorbis, such
as "YEAR" or "ALBUM ARTIST".
2022-06-07 17:50:11 -06:00
OxygenCobalt
c929357d76
ui: add edge-to-edge toggle
Add a toggle for edge-to-edge mode.

Normally we would want to enable edge-to-edge by default (in fact, we
still do). However, some phones (once again, samsung) don't provide
Auxio with actual window insets. As a result, we need to add a toggle
so that it can be disabled on busted devices.

Did you know that even when Auxio has it's edge-to-edge functionality
busted, Samsung Music works just fine? Very interesting.

Resolves #149.
2022-06-07 17:14:02 -06:00
OxygenCobalt
bd683ca09a
ui: use compat edge-to-edge
Use androidx compat tools when setting up edge-to-edge and applying
window insets.

This is mostly a readability tweak ahead of making edge-to-edge a
setting.
2022-06-07 13:41:13 -06:00
OxygenCobalt
1482333adc
music: remove version-specific display name hacks
Remove the version-specific display name hacks added previously.

Turns out RELATIVE_PATH only includes the directory structure. Oh.
Since this invalidates the purpose of version-specific display name
hacks, we just remove it.
2022-06-07 10:02:20 -06:00
OxygenCobalt
a6599eec2a
music: do not use future callback with exoplayer
Do not add a callback to a MetadataRetriever call in ExoPlayerBackend.

This fixes an issue where if an error occurs while a future completes,
the app will crash entirely. This is because Futures run on a different
Executor and thus exceptions will not bubble up to Indexer.
2022-06-07 10:01:13 -06:00
OxygenCobalt
8d7aa7936b
detail: respond to automatic rescanning
Make the detail UIs respond to automatic rescanning events.

This currently has no effect, but is instead a preparation step for the
seamless addition of automatic rescanning.
2022-06-06 20:05:12 -06:00
OxygenCobalt
0a18883a6a
music: replace loading with indexing
Replace all in-code instances of music loading with music indexing,
primarily for clarity.
2022-06-05 19:30:45 -06:00
OxygenCobalt
fb3c32b14c
music: split display name fix across versions
When having to fall back to an alternative displayName field, use
the version-specific RELATIVE_PATH and DATA fields when necessary.
2022-06-05 19:11:58 -06:00
OxygenCobalt
dd00c70488
music: do not auto-index unless indeterminate
Make IndexerService only auto-index music when there is no library AND
no loading has occured.

This resolves an issue where if IndexerService dies after a failed
index, IndexerService would try to index music regardless, as there was
no library present.
2022-06-05 11:47:04 -06:00
OxygenCobalt
f3a7813f5e
music: add support for excluding other volumes
Add support for excluding directories on other volumes, at least from
Android Q onwards.

Previously, Auxio only supported excluding the primary volume. This was
mostly out of laziness, as the excluded directory implementation was
shamelessly copied from Phonograph. This commit completely refactors
the excluded directory system, dumpstering the old database (which was
overkill anyway) for a new system based on SharedPreferences that is
actually capable of handling external volumes.

Now, limitations regarding external volumes still apply below Android
Q, as the VOLUME_NAME field does not exist on those versions. However,
this should resolve at least one major complaint regarding the
excluded directory system. Now theres just all of the other complaints.

Resolves #134.
2022-06-05 11:35:26 -06:00
OxygenCobalt
7673fa4a40
detail: do not cache viewholder pos for highlight
Fix an issue with highlighting in the detail UIs taht stemmed from the
ViewHolder position being cached.

Resorting could have changed the ViewHolder position, so caching it
will result in ViewHolders being incorrectly updated.
2022-06-04 13:51:59 -06:00
OxygenCobalt
b2ad54eef3
image: make bitmap provider use generation system
Make BitmapProvider leverage the generation system used in Indexer.

This helps reduce the surface for instruction-by-instruction race
conditions.
2022-06-04 13:42:16 -06:00
OxygenCobalt
244c8ec404
Merge branch 'patch-1' of github.com:Fjuro/Auxio into Fjuro-patch-1
Update Czech translations.
2022-06-04 13:12:40 -06:00
OxygenCobalt
882e24bd12
music: improve genre parsing
Rework genre parsing to properly align with the ID3v2 standard.

The ID3v2 genre specification is weirdly complex. Auxio ignored most
of that and just parsed out the most common cases for genres (digits
and (digits)). For the sake of completeness, rework Auxio's genre
parser to handle the weirder cases like RX/CR, multiple values,
and escaping, with an implementation roughly based on Mutagen's
genre parser.
2022-06-04 11:15:54 -06:00
OxygenCobalt
09392ef381
music: improve indexer state management
Improve Indexer's state management by splitting up the current loading
state and the last response.

This is intended to resolve a bug where if the UI task and
IndexerService are both killed, the Indexer state would become
indeterminate and the library would not show. Resolve this by keeping
track of whatever the last completed state was and falling back to it
whenever the loading process is canceled.
2022-06-04 10:12:31 -06:00
Fjuro
67d1668b1d
Update values-cs/strings.xml 2022-06-04 09:47:25 +02:00
OxygenCobalt
08caa01dca
music: add indexer service
Add a dedicated service towards the loading of the music library.

This new service was created for two reasons:
1. Music loading is slow and resource-intensive, so putting it on the
ViewModel layer just didn't seem right and made it vulnerable to the
OS simply stopping the loading process.
2. For automatic rescanning [#72], there must be something watching
the music library and waiting for a change in the background. This
would require a service as that is probably the least insane way to
do that kind of background work.

I have no garuntees how viable the service might be. If anything, it
might be halted by some insane android restriction or issue that
makes it more or less impossible to use for most apps, and I will have
to largely drop truly automatic rescanning.
2022-06-03 20:12:27 -06:00
OxygenCobalt
e3708bf5f5
music: rework loading management
Rework loading management into a new object, Indexer, which should act
as the base for all future loading changes.

Indexer tries to solve a two issues with music loading:
1. The issue of what occurs when tasks must be restarted or cancelled,
which is common with music loading.
2. Trying to find a good strategy to mediate between service and
ViewModel components in a sensible manner.

Indexer also rolls in a lot of the universal music loading code
alongside this, as much of MusicStore's loading state went unused
by app components and only raised technical challenges when reworking
it.
2022-06-03 16:03:08 -06:00
OxygenCobalt
66b95cef42
deps: upgrade
AndroidX core -> 1.8.0
Material Components -> 1.6.1
2022-06-03 14:15:23 -06:00
OxygenCobalt
b0ec6faa33
Version 2.3.1
Ready for version 2.3.1 of Auxio.
2022-06-03 10:44:10 -06:00
OxygenCobalt
a396101bd0
detail: clean up adapters
Clean up the adapter implementations by removing redundant code.
2022-06-02 19:59:51 -06:00
OxygenCobalt
490c291a14
image: rework genre ordering
Rework genre ordering to be alphabetical based on album, but without
all of the mosaic being taken up by one artist.

With the ordering changes that were done previously, genre images
greatly differed compared to previously. May as well use this breakage
as an oppertunity to improve genre ordering. In this case, we want to
order albums alphabetically, as usual, but we also want to prevent
one artist from taking up the whole mosaic. Fix that by deduplicating
artists in the set of grouped albums.
2022-06-02 19:49:57 -06:00
OxygenCobalt
5bc5afa162
fastlane: fix image metadata
Fix slight screenshot discrepancies where shot7 would show the old
song sub-heading.
2022-06-02 17:05:42 -06:00
OxygenCobalt
bb1d660eae
music: add loading progress indicator
Add an indicator to gague the current music loading progress.

This is actually a lot harder to implement than it might seem, not only
due to UI state issues, but also due to the fact that MusicStore needs
to keep it's state sane across a myriad of possible events that could
occur while loading music. This system seems like a good stopgap until
a full service-backed implementation can be created.
2022-06-02 15:16:32 -06:00
OxygenCobalt
14c9bbd4f9
all: cleanup
Miscellanious clean-up.
2022-06-02 13:57:29 -06:00
OxygenCobalt
9aa09620fe
Merge branch 'patch-1' of github.com:qwerty287/Auxio into qwerty287-patch-1
Improve German translations.
2022-06-02 10:48:01 -06:00
OxygenCobalt
e73d10070b
all: use notifyItemChanged everywhere
Apply the notifyItemChanged fix everywhere by making it an explicit
part of the RecyclerView framework.

This way, implementing future selection and rewrite behavior will be
much easier, as the payload argument is available in every adapter
implementation.
2022-06-02 10:42:33 -06:00
OxygenCobalt
10afae0bfc
detail: fix highlighting issues
Fix two major highlighting bugs based around the janky and stupid way
I would handle highlighting previously.

Previously, I would index the views of a RecyclerView in order to
highlight viewholders. In retrospect this was a pretty bad idea,
as viewholders could be in a weird limbo state where they are bound,
but not accessible. I mean, it's in the name. It's a Recycling View.

Fortunately, google actually knew what they were doing and provided
a way to mutate viewholders at runtime using notifyItemChanged.
And the API actually makes sense! Wow! Migrate all detail adapters
to a system that uses notifyItemChanged instead of the terrible
pre-existing system.
2022-06-02 10:20:31 -06:00
OxygenCobalt
182b08ab65
playback: fix state restore regression
Fix a state restore issue that would cause the parent to restore
incorrectly.

At some point, I accidentally used the index for the PlaybackMode field
when restoring the playbackState. This resulted in the playback mode
effectively reverting to ALL_SONGS and causing a number of subtle
issues.
2022-06-02 09:20:31 -06:00
qwerty287
4a2c07f0e5
Improve German translation
Fix some typos in the German translation.
2022-06-02 10:36:33 +02:00
OxygenCobalt
07127403ff
music: fix minor indexer issues
Further refine the Indexer and ExoPlayerBackend implementations.

These fixes were primarily focused on ensuring stable grouping through
stable sorting order, and more graceful handling of edge cases in
ExoPlayerBackend.
2022-06-01 15:50:49 -06:00
OxygenCobalt
a64a4864bd
playback: fix gadgetbridge regression [#62]
Fix a regression where media button controls would no longer work
with GadgetBridge.

In 4a79de4, I assumed that my code was redundant, as there should be
some kind of reciever handling media button events already. I was
completely wrong. Re-add the reciever code (with extra checks) to
make controls work again.
2022-06-01 12:05:38 -06:00
OxygenCobalt
a65d37c421
all: switch to stateflow
Switch from LiveData to StateFlow.

While LiveData is a pretty good data storage/observer mechanism, it has
a few flaws:
- Values are always nullable in LiveData, even if you make them
non-null.
- LiveData can only be mutated on Dispatchers.Main, which frustrates
possible additions like a more fine-grained music status system.
- LiveData's perks are exclusive to ViewModels, which made coupling
with shared objects somewhat cumbersome.

StateFlow solves all of these by being a native coroutine solution with
proper android bindings. Use it instead.
2022-06-01 11:46:00 -06:00
OxygenCobalt
6b06afdef5
Merge branch 'patch-1' of github.com:yurical/Auxio into yurical
Add Korean translations.
2022-05-29 20:09:09 -06:00
OxygenCobalt
caaeaca494
home: rework loading screen
Move the loading screen into the home view.

Previously, we would use a Snackbar to track the music loading state.
This ended up being a pretty stupid and buggy idea, and would get even
worse with the new music loader changes. Instead, we re-implement the
loading screen into the home view to generally be more sane and
extendable compared to previously.
2022-05-29 20:07:07 -06:00
Yurical
ba10e0e3e1 add Korean translation
This commit adds Korean translation for Auxio, including app
translations and F-Droid descriptions.
2022-05-30 08:09:42 +09:00
OxygenCobalt
f52fa7f338
music: cleanup implementation
Clean up the indexer implementation even further.
2022-05-29 10:09:49 -06:00
OxygenCobalt
48289ef006
all: make callbacks initialize impls
Make addCallback calls (or similar) initalize the caller by calling the
specific callback methods.

This is primarily intended as a fix to an issue where the music library
would actually reload during a warm start. This is extremely bad, but I
hope it doesn't make the app too unusable until the next version.
2022-05-28 20:00:10 -06:00
OxygenCobalt
47726c3e02
music: add exoplayer backend [#128]
Add an ExoPlayer-based metadata backend.

This backend finally allows Auxio to parse metadata internally, which
has been a highly requested feature given how many unfixable MediaStore
issues it would fix.

However, this is not fully ready for production yet. The loading
process becomes much larger with manual parsing, the current
implementation still allocates picture metadata (terrible for
efficiency), and there is no good indicator in the app to keep
track of music loading.

As a result, this backend is disabled until it can be fully integrated
into Auxio's architecture.
2022-05-28 19:52:23 -06:00
OxygenCobalt
87bdf50d39
music: clean implementation
Clean up the music implementation heavily, removing redundant code and
splitting off some code into utilities.
2022-05-28 14:49:18 -06:00
OxygenCobalt
2576fb26ba
music: introduce backend system
Move out the MediaStoreCompat interface into a full interface called
Backend.

In preparation for direct metadata parsing, it would be useful to
create some kind of object system to properly handle the capabilities
of each metadata indexing mode. Backend fulfills that by allowing
each object to implement their own query and then loading routine.

This system is designed somewhat strangely. This is firstly because
the ExoPlayer metadata backend will have to plug in to the original
MediaStore backend, so making methods more granular allows the
ExoPlayer backend to avoid some of the stupid inefficiencies from
the actual MediaStore backend, such as the genre loading process.
We also want to separate the steps of loading music in order to
more adequately show the current loading process to the user in
a future change.
2022-05-28 13:13:19 -06:00
OxygenCobalt
c6d7d8fe39
playback: implement "safe" slider wrapper
Implement a safe slider wrapper that does not crash with invalid values
as often.

Slider is a terrible component that is not designed with Auxio's
use-case in the slightest. Instead of gracefully degrading with invalid
values, it just crashes the entire app, which is horrible for UX.

Since SeekBar is a useless buggy version-specific sh******ed mess too,
we have no choice but to wrap Slider in a safe view layout that
hopefully hacks with the input enough to not crash the app when doing
simple seeking actions.

I hate android so much.

Resolves #140.
2022-05-27 14:34:14 -06:00
OxygenCobalt
852630ab38
Version 2.3.0
Ready for version 2.3.0 of Auxio.
2022-05-26 16:33:47 -06:00
OxygenCobalt
df4ecc0137
sort: add disc number sorting to other sorts
Add disc number sorting to sorts that originally sorted by track.

Forgot to add disc sorting to the other sort modes when adding disc
number support. Fix that.
2022-05-26 15:58:35 -06:00
OxygenCobalt
c0da3673c2
fastlane: update screenshots
Update app screenshots for 2.3.0. Notably, a new album screenshot has
been added showcasing the new disc functionality.
2022-05-26 15:51:17 -06:00
OxygenCobalt
f34ea7f863
deps: upgrade deps
Once again
Gradle -> 7.4.2
Spotless -> 6.6.1
Ktfmt -> 0.67
2022-05-26 10:29:41 -06:00
OxygenCobalt
b59ef1a746
info: update architecture
Update architecture to reflect the new changes made in 2.3.0.
2022-05-26 10:03:41 -06:00
OxygenCobalt
1a02aaad4b
music: use correct version impl for discs
Create separate routines to parse disc and track numbers in the most
optimal manner.

On API 30 (Android R) and above, ensure that we are using the superior
CD_TRACK_NUMBER and DISC_NUMBER database fields, while below API 30,
stick with the normal TRACK field.
2022-05-25 16:38:57 -06:00
OxygenCobalt
ae62572760
strings: update german translations
Update german translations for the strings I can translate at least
okay.
2022-05-25 13:20:50 -06:00
OxygenCobalt
444e4299d6
widgets: revert most widget changes
Revert the introduction of the thin/tiny widgets, but keep the new
cover layout I created while working on them.

There is simply no way I can cram controls and metadata within the
size bucket that the thin widget occupies. I have decided to give up
and revert the widget to it's old form.

I understand why the thin widget is not appealing. However, the sizing
at which a widget can properly accomodate a taller widget is just too
precise and not really large enough to justify it's existance.
2022-05-25 11:03:59 -06:00
OxygenCobalt
4c74879cf1
playback: use gesture insets on panel
Also use the gesture insets on playback panel.

Turns out when the panel uses normal insets, the playback panel is
extremely close to the system bars. Fix this by using the bigger
gesture insets.

Resolves #137.
2022-05-24 17:24:21 -06:00
OxygenCobalt
b320f4b1bd
widgets: add thin widget
Rework the smallest widgets to have no textual metadata, alongside
adding a new widget size class.

Turns out the last tiny widget redesign made the controls far too
small. Instead, remove the textual metadata and make these widgets
more akin to the small and wide widgets. This also introduces a new
side class alongside that with more controls, again to make it
similar to the other size classes.
2022-05-24 17:12:48 -06:00
OxygenCobalt
e1e032d254
ui: re-add accent customization >api 31
Re-add accent customization on Android 12 and above.

Previously, I disabled accent customization since I thought they were
more or less useless with the new Material You dynamic colors system.
Turns out I severely underestimated how horribly OEMs would botch the
dynamic colors system. Guess I was blinded by my adherence to the pixel
line. Re-add the accent customization for those who do not have a good
dynamic color palette at all.

Resolves #131.
2022-05-24 12:52:09 -06:00
OxygenCobalt
eb293022e8
widgets: rework tiny widget
Rework the tiny widget to cram even more information into it.

The tiny widget is nominally meant for edge cases like exceptionally
small screens or landscape mode, but apparently it's triggered on some
devices in normal use because of platform fragmentation and OEM insanity.

Update the tiny widget layout with some new buttons in order to make it
more usable in mnormal use. This is still nowehre near ideal. For
example, when triggering the layout on my device, it ends up squishing
the buttons. But it should probably work better outside of those edge
cases.
2022-05-24 10:08:12 -06:00
OxygenCobalt
485c35d74c
all: hack around more lollipop issues
Hack around more insane lollipop bugs, such as:

- The angular auxio icon crashing the system UI
- Optimized icons being corrupted
- Setting image alpha not working properly

I really wish I could drop support for this horrible version, but I
either have to wait for a major library to drop support or for the
usage numbers to reach 1%.
2022-05-22 17:12:49 -06:00
OxygenCobalt
594fa3597e
playback: add delayed action system
Replace the hodge-podge framework of state restoration and URI playing
with a single "delayed action" system.

Auxio's initialization routine is a total cluster----. This is mostly
because it involves multiple asynchronous operations such as music
loading, state restore, and service starting which tend to make it
highly prone to race conditions and other insanity.

In particular, the way Auxio would attempt to restore playback and
handle file opening was a spaghetti pile of bad API boundaries and
dubious UI code. This has not changed. I want to move this routine
to the service, but it's lifecycle is also sh------ed to such an
extent where that would be nearly impossible. Instead, this commit
introduces a new "delayed action" system that bites the bullet and
allowes PlaybackViewModel to accept a context and an action in
return for initializing playback...eventually.

I tried my best to eliminate as much memory leaks as I physically
could here, but could only go so far. Still though, even this insane
system is better than the UI-level LiveData shenanigans I did
previously, and actually works compared to the broken android
components that google keeps wanting you to use.
2022-05-22 11:55:17 -06:00
OxygenCobalt
1ac55c534e
detail: add duration sort
Add the duration sort to the detail views.
2022-05-22 10:01:16 -06:00
OxygenCobalt
2c7dd1241b
style: remove android string references
Remove references to android system strings, in favor of in-house
translations.

Previously Auxio would use the `android.R.string.ok` and
`android.R.string.cancel` strings to represent Ok and Cancel
respectively, but these system strings are actually untranslated on
some devices, so it is better for i18n if we use our own strings
for such.
2022-05-22 09:56:25 -06:00
OxygenCobalt
21fccf1f31
playback: add pre-amp customization
Implement a UI frontend for customizing the ReplayGain pre-amp value.

This finally completes Auxio's ReplayGain implementation. Not only
that, it also shows how Auxio can use positive ReplayGain values,
unlike other apps.

As a side-note, this also fiddles with the dialog style somewhat.
I got carried away.

Resolves #114.
2022-05-22 09:32:23 -06:00
OxygenCobalt
519de0e1d5
playback: add framework for handling pre-amp
Implement an internal setting for a ReplayGain pre-amp setting.

Pre-amp is a lot like above reference volume regarding Auxio's
ReplayGain implementation, where I want to implement it in order
to allow ReplayGain to graduate from being labeled "experimental".

No UI frontend has been implemented just yet.
2022-05-21 16:34:20 -06:00
OxygenCobalt
2d7dbd19cd
ui: rework custom ui components
Refactor the package structure and implementation of custom UI
components.
2022-05-21 14:52:08 -06:00
OxygenCobalt
61839405ce
home: hide tabs when there is only one
Hide the tab selector when there is only one tab.

This is mostly to remove a redundant UI element that has no purpose
when only one list is shown.
2022-05-20 20:01:14 -06:00
OxygenCobalt
28feebcec3
sort: add duration and count sorts
Add sorting modes for duration and song count.

This was requested previously in the now-closed UI/UX changes
megathread, however I have only gotten to it now.
2022-05-20 18:33:56 -06:00
OxygenCobalt
059652d2f1
all: fix misc issues
Fix miscellanious issues with documentation and the playback system
2022-05-20 11:30:56 -06:00
OxygenCobalt
9edc113ebb
Merge branch 'enricocid-it_translations' into dev
Update italian translations
2022-05-19 19:32:42 -06:00
OxygenCobalt
28cedd1240
music: attempt to handle bad DISPLAY_NAME [#120]
Add recovery code to the music indexer in the case that Android doesn't
provide the DISPLAY_NAME field.

Nominally this should never happen, but OEMs will OEM and apparently
this does happen on some devices. Try to recover by grokking DATA for
a file name.
2022-05-19 17:37:19 -06:00
OxygenCobalt
0b9141d474
sort: rework implementation
Rework the sort implementation to allow Auxio to leverage it's sorting
capabilities in a more powerful manner.

This is mostly the removal of stupid redunant methods and the change of
Sort overrides to sort in-place. This just gives us the option to avoid
full blown list copies in cases where such is reasonable.
2022-05-19 17:16:33 -06:00
OxygenCobalt
c522af546c
detail: add full disc number support
Finalize the disc number implementation within Auxio.

This is probably one of the most widely-requested features outside
of playlisting. This implementation also adds some more fine grained
sorting modes for disc numbers in particular, which actually removes
some of the quirkiness of the Sort class.

Resolves #96.
2022-05-19 16:43:01 -06:00
OxygenCobalt
04f254f91b
music: add disc number indexing
Change the indexer to parse out the disc number field from
AudioColumns.TRACK.

On newer versions, I hope to further modify the loader to use
the API 30+ CD_TRACK_NUMBER field, as it is more versatile than
TRACK.
2022-05-18 20:03:45 -06:00
OxygenCobalt
6f2a0d66c6
detail: add framework for disc number items
Add the UI and data components for a disc number value within the album
detail view.

This is the first-step of a multi-step addition to finally implement
disc numbers.
2022-05-18 17:30:50 -06:00
OxygenCobalt
5381e9f9a2
playback: remove media button reciever impl
Make MediaButtonReceiver an empty class without any behavior.

The previous manner in which Auxio would handle media button events
was actually bad, as in certain cases (like a rewind or if there was
no song playing) Auxio would actually crash, as the service would
not start a foreground state in time.

Fix this by removing that functionality. This should hopefully still
retain the current state.
2022-05-17 06:29:55 -06:00
OxygenCobalt
4a79de455a
playback: rework service components
Try to rework the playback service components to reduce race conditions
and improve readability.

This changeset has gone through a number of changes. I originally
wanted to unify all cover loading under a single "Component Manager",
but this turned out to be stupid given that the three service components
are different in nearly every way. Instead I just reworked them all
individually by introducing a new less-data race-prone image loading
framework, and moving around a bunch of code I was planning to move
around.
2022-05-16 20:37:42 -06:00
Enrico D'Ortenzio
e785f5a3a5
Update it translations 2022-05-15 16:03:16 +02:00
OxygenCobalt
d296a3aed9
all: rework formatting
Do some miscellanious formatting reworks.

1. Remove all instances of m in favor of _. _ is only used when names
collide or if something should be internal.
2. Make fragments apply their own click listeners.
3. Remove instances of inc/dec and replace them with the more
straightfoward + 1 or - 1.
2022-05-11 19:03:56 -06:00
OxygenCobalt
1a9e55e73b
about: add full library statistics
Split off the "songs loaded" about item into it's own card called
"library statistics"

This card includes the song, album, artist, and genre counts,
alongside a total duration of the music library. This is just more
informative and useful to the user.

Resolves #121.
2022-05-04 20:20:47 -06:00
OxygenCobalt
ac6a471318
playback: fix index bug
Fix some index bugs by using inc/dec instead of ++/--.
2022-05-02 18:35:26 -06:00
OxygenCobalt
e451bc9859
playback: rework state restore
Rework state restore to be more coherent and in line with the new
member layout of the general

This primarily involves making the index the primary database attribute
in favor of song, with the old song id field becoming a sanity check
field.
2022-05-02 17:43:01 -06:00
OxygenCobalt
1e7a439c31
deps: switch material to 1.6.0-rc01
Switch material components to the more stable 1.6.0-rc01. Have to deal
with android complaining, but whatever.
2022-05-01 17:54:37 -06:00
enricocid
ece5dc06c0 Italian translations
Signed-off-by: enricocid <enrico2588@gmail.com>
2022-05-01 21:44:13 +02:00
OxygenCobalt
a645c3a217
deps: upgrade deps
aaaaaaa
coil -> 2.0.0-rc03
material -> 1.7.0-alpha01
leakcanary -> 2.9.1
navigation -> 2.4.2
kotlin -> 1.6.21
agp -> 7.1.3
2022-04-29 20:14:17 -06:00
OxygenCobalt
d57f980148
playback: cleanup components
Fix miscellanious bugs and clean the component code.

Currently the components are in a strange state. They are a big ball of
mud with inconsistent lifecycles and callbacks. I want to find a way to
unify them under a single lifecycle, but the competing nature of them
makes this extremely difficult.
2022-04-29 19:53:58 -06:00
OxygenCobalt
6adc5f8715
playback: fix service state issues
Fix a bunch of miscellanious state issues with the playback fragment.
2022-04-29 16:17:26 -06:00
OxygenCobalt
8e849feb7d
playback: rename loopmode to repeatmode
Rename LoopMode to RepeatMode, which is generally much clearer
than the previous name.

This changes all non-breaking instances of "loop" in the app with
"repeat".
2022-04-29 14:52:33 -06:00
OxygenCobalt
c80af01d5c
playback: rework fields
Rework the playback fields.

The new fields are more coherent, better-named, and less prone to state
failure.
2022-04-29 14:29:56 -06:00
OxygenCobalt
2bdbe212df
playback: decouple fields and callback
Decouple the callback notifying code and the field code. This makes
code more reasonable for future changes.
2022-04-29 12:07:14 -06:00
OxygenCobalt
60367c45c3
nit: fix typos
Fix miscellanious typos.
2022-04-28 22:03:15 -06:00
OxygenCobalt
3d03bf9b7e
playback: fix position polling bug
Fix a bug where position polling would stop when the audio focus
state changed.
2022-04-28 20:04:10 -06:00
OxygenCobalt
bcec9272d3
Merge branch 'dev' of github.com:OxygenCobalt/Auxio into dev 2022-04-28 19:59:11 -06:00
OxygenCobalt
3d70028bd2
playback: remove playbackmode field
Remove the useless PlaybackMode field.

Parent does the same job, but better.
2022-04-28 19:58:39 -06:00
User_Name
21335859b2
updated translation 2022-04-09 01:34:59 +03:00
OxygenCobalt
180faa6f50
music: rework callback configuration
Rework the asynchronous aspects of MusicStore to rely on a more
conventional callback system.

In preparation for automatic rescanning, it would be more elegant
for music consumers to use a callback, so that updates can be
registered easier than if a co-routine continued to be used.
Convert MusicStore to this new model and rework the accesses of
MusicStore in-app to line up with this new system.
2022-04-07 20:18:25 -06:00
OxygenCobalt
3a19d822ce
music: rework name heirarchy
Once again rework the naming system for music, this time with it being
much easier to localize (hopefully).
2022-04-03 12:54:29 -06:00
OxygenCobalt
ab194c14c2
ui: create viewmodel for navigation
Create a ViewModel for the more complicated navigation pathways.

Normally, navigation was fragmented along a complicated stretch of
fragment hacks and DetailViewModel's navToItem attitbute, both of which
were not really that ideal. Dumpster them for a single, unified
viewmodel for the more complicated navigation situations. This removes
much of the duplicate navigation logic and is likely much more
maintainable for future situations.
2022-04-02 20:21:06 -06:00
OxygenCobalt
74f5962844
ui: rework cover style
Rework the style of all album covers in the app to be more in line with
the new track number style.

This is mostly comprised of adding a new background to all cover views
and rescaling error icons to be smaller than they would normally be.
This also includes a change in the cover/track background color from
colorSurfaceVariant to colorOnSurfaceInverse, which seems to provide
the best visibility in all cases.

These changes also apply to the track number views.
2022-04-02 18:18:10 -06:00
OxygenCobalt
e387e72b2c
detail: update album song layout
Update the album song layout to be more alike to other songs.

Recently I migrated the TextView in the album songs to use 48dp sizing,
like the other song views. However, this resulted in a lot of empty
space that felt off. Fix this by adding a light background to the track
number, which fills the room it takes up a bit more. It also hopefully
primes the track number to take an indicator once multi-select is
added.
2022-03-29 20:08:57 -06:00
OxygenCobalt
0107d9ff32
playback: remove extraneous encodings
Remove extraneous encodings from ReplayGainAudioProcessor.

According to the ExoPlayer developers, an AudioProcessor is only
provided 16-bit PCM data. This makes all of the other encodings I
had implemented in ReplayGainAudioProcessor useless, as their
cases would never run. Remove those extraneous encodings and just
just 16-bit PCM.
2022-03-29 06:27:42 -06:00
OxygenCobalt
59a56090e8
playback: add positive replaygain values
Implement support for positive ReplayGain values.

Turns out the blocker for this with the new AudioProcessor was that
I did not properly clamp PCM data when I manipulated the data,
resulting in target samples like 75491 being truncated to lower
values like 9955, which resulted in popping. This is a niche addition,
but also puts Auxio in a category that no other (FOSS) android music
player currently occupies. Yay.

Resolves #115.
2022-03-28 19:58:25 -06:00
OxygenCobalt
b4abad26cd
playback: migrate replaygain to audioprocessor
Create an AudioProcessor implementation for ReplayGain.

Now that ExoPlayer handles AudioFocus, the ReplayGain implementation
would conflict with the changes that ducking would make to the volume.
To fix this, migrate the ReplayGain implementation to a dedicated
audio processor. This not only resolves this system, but also opens the
door for positive ReplayGain values in the future. Currently however,
our method for modifying the bitstream results in popping with values
above the reference volume, so some more work must be done in that
regard.
2022-03-27 20:33:01 -06:00
OxygenCobalt
b748d73abb
playback: rework audio focus
Rework audio focus to rely on the native ExoPlayer implementation
instead of a custom implementation.

Previously, we avoided ExoPlayer's AudioFocus system as it never
played after a transient lost. A few versions later now through,
now it does, so we may as well switch to it. This does introduce
a bug where ReplayGain functionality will conflict with audio
focus, but I hope to eliminate this with #115 as I switch to
an AudioProcessor instead of a callback.
2022-03-27 11:51:58 -06:00
OxygenCobalt
e54a58c612
ui: audit null safety
Audit null safety to remove extraneous and stupid calls while
optimizing certain checks here and there.

This commit is primarily centered around the introduction of a new
utility: unlikelyToBeNull. This call uses requireNotNull on debug
builds and !! on release builds, which allows for bug catching in
an easier manner on normal builds while also allowing for
optimizations on the release builds.
2022-03-27 11:23:07 -06:00
OxygenCobalt
05a5ef5c3f
ui: migrate esoteric adapters to framework
Migrate all esoteric adapters to the new RecyclerView framework.

One of the shortcomings with the previous RecyclerView utilities was
how more esoteric adapters with data that does not implement Item
could not use the utlities. The new system, by comparison, is capable
of taking any type of data, so we can no migrate all of the esoteric
adapters to the new system.
2022-03-27 09:59:35 -06:00
OxygenCobalt
2406c371db
widgets: work around new coil scaling behavior
Fix an issue where album covers fail to load when not explicitly
specifying a size.

At some point, Coil changed some internal scaling logic to depend on
this weird pseudo-screen size value that caused the bitmap to fail
to load only on in widget creation process. Who knows why. Fix this
by explicitly specifying the size in all cases.
2022-03-26 11:43:48 -06:00
OxygenCobalt
8100f294d7
recycler: spin off data into separate class
Spin off the data instances into their own class called BackingData.

This is to isolate the sane adapters that rely on one type of diffing
from the insane adapters that use synchronous and asynchronous diffing
simultaniously. It also allows some of the more esoteric adapters to
implement their own backing data without much trouble or leaky
abstractions.
2022-03-26 11:32:54 -06:00
OxygenCobalt
ee1a234e76
ui: rework base adapter class
Completely rework the base adapter class to require less boilerplate
and properly handle cases such as diffing. The major adapters have
been migrated to this system, but the other adapters have not been
changed so far.

This is only part 1 of a multi-part rework, as this is an incredibly
complex system.
2022-03-26 10:16:36 -06:00
OxygenCobalt
595a982d59
all: cleanup
Clean up the project after the previous changes and update some
dependencies.
2022-03-23 12:27:49 -06:00
OxygenCobalt
d79592e029
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.
2022-03-23 10:59:01 -06:00
OxygenCobalt
95057ec357
all: move all fragments to ViewBindingFragment
Move all fragment instances to the new ViewBindingFragment paradigm,
which should help immensely with reducing memory leaks from list
bindings and to really alleviate the overloaded onCreate functions.
2022-03-23 09:18:08 -06:00
OxygenCobalt
8f38ed6ee5
playback: rework view implementations
Rework the playback views to follow the new idioms I want to use for
Auxio.

This change mostly consists of flattening away some of the custom
views, removing databinding, and using a general viewbinding
fragment that I hope to extend to the entire app.
2022-03-21 20:15:42 -06:00
OxygenCobalt
e4d4266e35
playback: rework playback slide up implementation
Rework the playback slide up implementation to be more straightfoward.

This is really composed of stylistic improvements, very little in
actual behavior changes. This does re-introduce a regression when
nothing is playing where the scroll position will become off when
rotating, but that desynchronization happens often so unless I were
to completely migrate both the panel and the bar to a view, I don't
really see it as an issue.
2022-03-20 12:33:49 -06:00
OxygenCobalt
608112a7ac
all: migrate to centralized constant table
Migrate to a centralized constant table for easier management.

Previously, Auxio would tie constants to the class itself, which
led to a largely disjointed system that relied on an internal table
so that it would stay sane. This commit moves all of those constants
to a single table for easier usage and management.
2022-03-19 20:05:57 -06:00
OxygenCobalt
9be97bb329
Merge branch 'dev' of https://github.com/kontillion/Auxio into kontillion-dev
Updated German translation
2022-03-19 18:48:50 -06:00
OxygenCobalt
9c07ad2d34
sort: completely rework class
Completely refactor the Sort class to be more efficient and
straightforward.

The original Sort class had *major* shortcomings, it was slow,
poorly organized, and relied on abusing compareBy to implement
special things like article sort. This rework eliminates all of
that in favor of a new system relying on custom comparators and
chaining to achieve something much faster and maintainable.
2022-03-19 15:44:11 -06:00
OxygenCobalt
90f10f2a84
home: clean up fast scroller
Clean up the fast scroller implementation to remove dead code and
be more coherent in general.
2022-03-19 10:59:13 -06:00
Konstantin Tutsch
67f90a9494
Improved language quality of german translation 2022-03-17 20:53:43 +01:00
Konstantin Tutsch
4f4b493fb6
Added german translation for headset autoplay feature 2022-03-17 20:50:53 +01:00
Konstantin Tutsch
c00b078fcf
Updated German translation
Translation for rounded covers and the restart button
2022-03-17 16:12:11 +01:00
OxygenCobalt
484f5c8490
Merge branch 'dev' of https://github.com/cccClyde/Auxio into cccClyde-dev
Update strings translation for zh-rCN.
2022-03-15 06:25:47 -06:00
OxygenCobalt
0417a77b33
music: make resolvedName standard
Make resolvedName the standard name to use across all music items.

Previously, the way Auxio differentiated between names in UIs was to
use name for normal items and resolvedName for parents. This was odd
and disjointed, as it muddled the meanings of the two fields and lead
to a lot of bugs. Fix this by making resolvedName *the* standard name
to use across all music items, even in ones that don't have to resolve
their name.
2022-03-13 20:22:19 -06:00
OxygenCobalt
2ff7d93263
all: view cleanup
Do even more cleanup regarding views.
2022-03-13 18:56:24 -06:00
OxygenCobalt
33da09a08a
all: switch to spotless
Switch to the spotless linter with ktfmt used as a backend instead of
ktlint.

This switch was done for two reasons:
1. ktfmt is more thorough than ktlint
2. License headers can be added more effectively with spotless than
the default Android Studio behavior.

Dump all of the changes now so I don't have to deal with it over a long
period of time. I don't care.
2022-03-13 17:38:19 -06:00
OxygenCobalt
627ab97948
all: cleanup
A bunch of small changes that have accrued over the last week due to
having more or less no time to work on Auxio.
2022-03-13 16:42:03 -06:00
Clyde
2d9d986697
Update strings.xml
Update translations for zh-rCN
2022-03-12 09:03:37 +08:00
Clyde
b662d2e59d
Merge branch 'OxygenCobalt:dev' into dev 2022-03-12 08:47:34 +08:00
OxygenCobalt
82247775ac
Version 2.2.2
Ready for version 2.2.2 of Auxio.
2022-03-08 16:19:02 -07:00
OxygenCobalt
3293637cfd
all: minor cleanup
Do some minor cleanup before the next release.
2022-03-08 16:13:59 -07:00
OxygenCobalt
7b5c49a5b3
ui: disable default actions in drag helpers
Disable the default long-press action in the ItemTouchHelper usages.

ItemTouchHelper provides a long-press action to start an item drag by
default. However, because Auxio adds a drag handle on top of this
action, this actually results in a conflict with the default behavior
in certain cases. Replace it with a custom version of the long-press
action within the viewholders themselves.
2022-03-07 08:33:49 -07:00
OxygenCobalt
d3d6d18d5d
music: fix crash below android 8 [#95]
Fix a crash that stemmed from the use of the API 30+ database field
CD_TRACK_NUMBER.

I switched to CD_TRACK_NUMBER in 1e39ceb to fix [#88], however I did
not realize that CD_TRACK_NUMBER was actually only supported on API
30 onwards. This led to a load failure on versions before API 30.
2022-03-07 07:18:15 -07:00
OxygenCobalt
b5b8767f46
playback: fix crash with state restore [#89]
Fix an esoteric crash with queue synchronization during the playback
restore process.

Auxio will attempt to re-synchronize the queue index whenever it is
desynchronized, however during the check for if it's desynchronized,
Auxio would do a direct index of the queue, which could result in a
crash in situations where the desynchronized index is outside of the
queue bounds.

Fix this by replacing that unprotected access with a protected access,
which not only fixes the crash but also still correctly detects
desynchronization in that case.

Resolves #89.
2022-03-06 19:25:48 -07:00
OxygenCobalt
1b791074ec
playback: replace headset focus with headset autoplay
Turn the headset focus setting into the headset autoplay setting.

The way auxio handles headsets is...odd. Sometimes the MediaSession
handles it and Auxio could not care less, and sometimes Auxio actually
needs to handle it. As a result, the idea of being able to disable
headset focus is more or less moot because it will only apply to some
devices and not others.

On the other end, the way Auxio automatically begins playback once a
headset is plugged in is also quite weird. It only works on wired
headsets, and when it does, it overrides all other apps that might
also be playing audio. It's not to say that it's a bad feature, but
it's also one that I don't want to make the defualt. Auxio should
still play along within the confines of Android's expectations, after
all.

Replacing the existing "Headset focus" setting with a new "Headset
autoplay" setting solves both of these issues, as it prevents a
mis-guided disabling of the setting that doesn't actually disable
the feature and it relegates the quirky autoplay behavior to an
setting not enabled by default.
2022-03-05 20:34:12 -07:00
OxygenCobalt
6d003c308b
playback: fix headset focus autoplay issue
Fix an issue where headset focus would result in unexpected playback
whenever the service started.

AudioManager.ACTION_HEADSET_PLUG seems to always fire when the initial
BroadcastReceiver is set up, which results in a weird bug where if a
wired headset is connected while PlaybackService is started, playback
will start immediately, which was not user friendly.

I fear that this may result in an edge case that results in headset
focus not firing in an unrelated situation, which in that case I would
be forced to remove headset autoplay entirely (or at least relegate it
to a quirk option).
2022-03-03 18:47:55 -07:00
OxygenCobalt
1e39ceb9fc
music: add more failsafes to loading process
Add even more checks and guards to the music loading process to ensure
proper metadata loading.

Auxio has always had issues handling track numbers and years, mostly
with ensuring their validity. This change resolves them by more or less
surrounding them with gobs of null-checks and fallible parsing
routines, which should help avoid frustrating bugs and crashes with
metadata in the future.

Resolves #88.
Resolves #84.
2022-03-01 19:52:28 -07:00
OxygenCobalt
dbe0bd1bb3
ui: revert list item changes
Revert the removal of the song/artist values from list items for now.

The current plan of removing extraneous values from songs and albums
only works if I add multi-select and a dedicated menu button, but that
is still in the air, and in general I want feedback before I go ahead.
Aside from reverting the previous changes, this actually standardizes
all item descriptions under a single bullet point formatting system,
instead of the mix of commas and bullet points that existed beforehand.
2022-02-28 19:27:57 -07:00
OxygenCobalt
a408cc629d
strings: remove redundant spanish translation
Remove the strings.xml.old file in the spanish translations.

This was generated from vim when #87 was created. It's redundant, so
remove it.
2022-02-28 19:01:12 -07:00
n-berenice
88f815ed9f Redone from scratch
Previous file was too incomplete and had too many mistakes in order to be fixed, fully redone.
2022-02-28 22:12:56 -03:00
OxygenCobalt
d7babcba71
ui: remove album name from song items
Remove the album name from the main song item in favor of a duration
value.

Auxio has traditionally used "Artist . Album" for song items. However,
this had some shortcomings:
1. The way the artist and album names are packed probably results in
truncation on small screens, which I doubt is very helpful.
2. All other items in Auxio have only one specific "subject" per line,
which makes the song items a bit of an outlier since it has two (the
artist and the album)
3. The empty space available could be used for another UI element,
such as a duration or maybe a menu button in the future.

For consistency, this also removes the song count from all album items
as well.
2022-02-25 08:12:26 -07:00
OxygenCobalt
c5be39774a
ui: remove memberBinding [#80]
Remove all usages of memberBinding from the app.

For some reason, certain devices running Android 10 and lower will
have a lifecycle race condition whenever the theme is mis-matched.
This ends up resulting in an invalid state whenever memberBinder was
used. Since we can't replace memberBinder with a better solution,
just dumpster the whole thing. This platform is so god damn broken,
jesus christ.

Resolves #80.
2022-02-24 19:31:48 -07:00
OxygenCobalt
fc4c7714a2
deps: upgrade
Wheeeeeee
ExoPlayer -> 2.17.0
Coil -> 2.0.0-alpha09
Ktlint -> 0.44.0
2022-02-24 15:17:31 -07:00
OxygenCobalt
9171f9a3b4
coil: make mosaics use squareframetransform
Change createMosaic to use SquareFrameTransform.

This should help fix a theoretical bug where non-1:1 album covers will
be oddly stretched in a generated mosaic, as all album covers will be
forcefully cropped to a 1:1 ratio.
2022-02-24 14:58:59 -07:00
OxygenCobalt
61dbfe3185
coil: make rounded images more nuanced
Create a custom view for rounded images, making them more nuanced in
the process.

The previous method for applying rounded images in-app was generally
clunky and fragile. Introduce a new custom view that actually takes a
cornerRadius attribute from the ImageView itself that then applies it
whenever the user enables the setting. This also allows rounded images
to be more nuanced, as typical 8dp elevation can be used for small
views and a more fitting 16dp radius can be used for large views.
2022-02-23 17:42:34 -07:00
OxygenCobalt
280b582efa
home: rework fab adaptiveness
Rework how the fab's adaptive functionality works.

Handle fab adaptiveness by using a style instead of a fully custom
view. This helps eliminate a usage of private resources.
2022-02-23 16:13:59 -07:00
OxygenCobalt
87035805d2
ui: general cleanup
Clean up a bunch of UI issues that have accumulated.
2022-02-23 15:26:40 -07:00
OxygenCobalt
22258a3e6b
style: add disabled state to switches
Add a disabled state to the M3 switches.
2022-02-22 17:44:56 -07:00
OxygenCobalt
35b75b5f81
music: rename BaseModel to Item
Rename BaseModel to Item to make the meaning of it clearer.
2022-02-22 17:44:36 -07:00
OxygenCobalt
3aaa2ab0e0
all: rework logging
Rework logging to be clearer and more standardized.

Rework all usages of lossing to follow a single unified style,
introducing a new "warn" option alongside this.
2022-02-22 17:24:51 -07:00
OxygenCobalt
e1dbe6c40c
coil: force all images to a 1:1 aspect ratio
Crop all images to a 1:1 aspect ratio.

Sometimes cover art will not be a square. I never realized this because
all covers in my music library are square. This led to many strange bugs
that I would rather avoid, so create a new transformation that crops the
image to a 1:1 aspect ratio.

The reason why we use a transformation is that it won't be dependent on
the actual state of the ImageView, which is what would happen if we
used ScaleType.CENTER_CROP. In the case that we use a very weird hacky
ImageView like in the widgets, doing such would result in any cropping
not actually working correctly. It's better to do it in the
Transformation stage simply to ensure consistency.
2022-02-21 20:00:30 -07:00
OxygenCobalt
6fc3c9374c
style: rework dynamic colors
Allow the material library to handle dynamic colors.

Turns out I was mis-understanding how DynamicColor themes were meant to
be used by the material library. Turns out you can just inherit from it
and it will work perfectly fine. Refactor the V31 styles to remove our
insane shims and finally fix the slapdash dynamic color usage across
the main theme and widgets.
2022-02-21 17:07:06 -07:00
OxygenCobalt
9304e58190
playback: rework playback icon visibility
Add a circular indicator to playback icons.

Sometimes it can be too difficult to tell apart the active and inactive
states of the shuffle/loop icons. However, there is really no good way
to improve the contrast on these icons without some kind of muddled UX
fragmentation, or god-awful design. Try to settle on the okay-est
version, which is to use colorPrimary with a dot indicator on views we
control, and use a more muddled semi-transparent icon on views we don't
control, like notifications and widgets.
2022-02-21 16:36:08 -07:00
OxygenCobalt
2a74ff906c
style: enable drop shadows before api 28
Re-enable drop shadows on the playback bar and queue items on API 27
and lower. This is mostly to make Auxio line up with the M3 styles as
a whole.
2022-02-19 11:06:10 -07:00
OxygenCobalt
f5478018c5
deps: upgrade deps
Round and round
Lifecycle -> 2.4.1
Media -> 1.5.0
Navigation -> 2.4.1// TODO: Downgrade back to 2.4.1 when it is out
2022-02-19 10:13:26 -07:00
OxygenCobalt
ddc6428455
Version 2.2.1
Ready for version 2.2.1 of Auxio.
2022-02-18 19:06:00 -07:00
OxygenCobalt
d4513293a7
all: cleanup
General app cleanup.
2022-02-18 19:03:25 -07:00
OxygenCobalt
83dc6cd4c9
app: expose file opening intents better [#78]
Copy-paste some extra fields onto the file opening intent filter as to
[hopefully] get Auxio to be recognized by OEM skins better.

Some OEM skins don't seem to do a basic query for an app that matches
the APP_MUSIC category. Instead, they do some insane query for apps
that match this specific file intent structure that Auxio does not fit
for whatever reason. Try to graft some manifest features from the MPV
android app to make Auxio correctly expose this. I have no idea if this
will actually do anything.
2022-02-15 19:27:44 -07:00
OxygenCobalt
5b57d77d02
playback: disable audio focus setting on api 31
Disable the ability to customize audio focus on Android 12 and up.

Android 12 automatically regulates audio streams even further than it
did in previous versions, to the point where the audio focus setting
no longer makes sense on that version. I may extend the removal to all
versions in the future.
2022-02-15 06:33:21 -07:00
OxygenCobalt
30ad7f99db
playback: fix headset focus bug
Fix an issue where headset focus would restart playback unexpectedly.

At some point during the broadcast refactor, I accidentally switched
the values of CONNECTED and DISCONNECTED when handling
AudioManager.ACTION_HEADSET_PLUG. This resulted in playback starting
for no reason in some situations.
2022-02-14 19:46:04 -07:00
OxygenCobalt
ec358a13e3
style: apply body typography
Use body typography in more places, reworking the letter spacing as to
make it more pleasent to use with the inter typeface.

This should hopefully be the last time I fret over typography.
Everything should line up in the way desired by M3.
2022-02-13 15:39:34 -07:00
OxygenCobalt
f377e144dd
style: remove elevation from toolbars
Remove the elevation component from all toolbars and the bottom bar.

Material3 states that top and bottom app bars should not cast a drop
shadow. Auxio ignored this and used one anyway. This largely stemmed
from incorrect use of the AppBarLayout styles, which were mostly just
incorrect M2 styles with a new background plastered over. Fix this
by creating a new style that inherits the proper M3 styles and then
using that on all AppBarLayout instances in the app.
2022-02-10 17:34:03 -07:00
OxygenCobalt
04bec3161f
music: modify model configuration
Do a couple things to the music models:
1. Make the genre field non-nullable. This is because I beleive I've
largely eliminated the genre bugs in previous versions and future ones
can be caught with a crash screen I plan to add.
2. Make the initial album grouping process use hashCode instead of a
pair of names. This just helps with loading speed in general, albeit I
am slightly worried that it may result in improper grouping if some
edge case appears.
2022-02-08 06:56:49 -07:00
OxygenCobalt
f4217a337a
style: tweak body typography
Apply body typography in new places in the app.

For awhile, Body and Title typography were used interchangeably, as
they occupy the same text size range. This commit defines the Body
text as to be used for one-line widgets or tertiary widgets, while
the Title text is defined to be used for multi-line or heading widgets.
2022-02-08 06:23:43 -07:00
OxygenCobalt
4a326cc4ff
all: fix sloppy code
Fix some dumb and sloppy code that I made in the rush to complete
2.2.0.
2022-02-07 20:08:18 -07:00
Clyde
245e0f5dc1
Update strings.xml
Update zh-rCN translations accordingly with the latest `strings.xml`.
2022-02-07 06:22:29 -07:00
Clyde
0a9c7124db
Update strings.xml
Update zh-rCN translations accordingly with the latest `strings.xml`.
2022-02-07 12:26:22 +08:00
OxygenCobalt
4d384f4cbd
Version 2.2.0
Ready for version 2.2.0 of Auxio.
2022-02-06 19:23:54 -07:00
OxygenCobalt
a51f1aa5b9
pref: fix application of m3 switches
Fix an issue with M3SwitchPreference where the switch would not update
properly.

When reacing M3SwitchPreference, I wanted to make an optimization
regarding updating the switch to M3, so I decided to make the
preference check if they have already applied the switch, and then
ignore it if that's the case. However, I ended up forgetting that
ViewHolders tend to need to be re-bound, which resulted in this
optimization leading to inconsistent application of the M3 switches.
Fix this by removing that optimization.
2022-02-06 19:20:29 -07:00
OxygenCobalt
d9e2d7f07a
docs: rework contribution info
Update the contribution information and templates.

The contribution information and templates were growing a bit stale,
given that they haven't gotten a refresh since ~1.3.0. This commit
reworks them to be more thorough and straightfoward.
2022-02-06 14:33:36 -07:00
OxygenCobalt
470187422a
docs: add changelog
Add a CHANGELOG document that keeps track of the past and current
release notes.

Making all of our releases rely on GitHub to keep track of them is not
really a good idea, so this document serves as a record of past release
changelogs just as a pre-caution. It also allows a live preview of the
next version whenever something is changed.
2022-02-06 14:01:03 -07:00
OxygenCobalt
8e0d27696d
detail: improve track number handling
Improve the way track numbers are handled in the album detail view.

Previously, Auxio would show track numbers by simplying stringifying
the integer and then showing it in a TextView. This was problematic for
two reasons:
- Numerics from other languages like Arabic would not be respected
- Invalid track numbers [e.g 0] would be shown regardless of the
situation.

This commit fixes that by placing all track numbers through a format
string first, and showing a generic song icon instead of a number
whenever the track number is 0.
2022-02-06 11:19:50 -07:00
OxygenCobalt
4b919b121a
util: rework context utilities
Completely rework the Context extensions for resources.

Previously, Auxio has used a strange hodge-podge of context extensions
and verbose code to get resources. Fix this by unifying most of the
resource accesses under a single, unified set of extensions. The only
ones excluded for now is the getString call, as that is used in far too
many places to effectively replace.
2022-02-06 10:45:40 -07:00
OxygenCobalt
bd099aee7b
deps: upgrade
Like a while loop with no escape
Navigation -> 2.5.0-alpha01 [workaround for AGP 7.1]
Preference -> 1.2.0
Fragment -> 1.4.1
2022-02-06 09:08:10 -07:00
OxygenCobalt
0209e526e1
all: general cleanup
Do some general code cleanup.
2022-02-06 09:01:51 -07:00
OxygenCobalt
4d22b99577
playback: re-add index correction
Re-add index correction, albeit with a new system that accomodates the
single queue mechanism.

The issue with using the previous queue mechanism for the single queue
was that it risked using the index of an incorrect duplicate song, as
the search would always start at index 0. Fix this by implementing a
sort of "wobbly" search that starts at the current index and moves back
and forth, checking the closest items first and the furthest items
last.
2022-02-05 11:40:45 -07:00
OxygenCobalt
685d3af12f
settings: remove 1.4.0 compatibility
Remove 1.4.0 setting migrations.

It's been nearly a year. Everyone should have migrated by now.
2022-02-05 11:01:03 -07:00
OxygenCobalt
b047b50411
settings: add option to force-reload the app
Add an option to force-reload the app.

Currently, Auxio will load music once and then never re-load it. This
is a really decision I made early on and now regret completely. The
only way to remedy this properly is to create an automatic rescanning
system, but that is a major technical undertaking that I want to save
for later.

Resolves #71.
2022-02-05 10:30:03 -07:00
OxygenCobalt
0a216def1b
strings: tweak arabic translations
Fix the plurals and audit RTL usages in the arabic translations.
2022-02-05 10:06:13 -07:00
OxygenCobalt
4774fbaa4e
Merge branch 'dev' of https://github.com/hasanpasha/Auxio into arabic-dev 2022-02-05 09:49:52 -07:00
OxygenCobalt
92ac7d9a9d
strings: rework russian translations
Improve the russian translations for this app.

These translations were proposed by lisiczka43 with the following
rationale:

"[use] less literal translations, [use] shorter wording to fit into UI
elements,  [correct] mistranslations, [improve] consistency of
terminolgy, [enforce] strict ё, [add] missing new strings"

Apparently the previous russian translations were quite Amateurish.
This should make them better.
2022-02-05 09:45:18 -07:00
OxygenCobalt
20245db261
style: update inter
Update the inter font to v3.19.
2022-02-05 09:23:37 -07:00
OxygenCobalt
b121b6428d
music: refactor music grouping
Completely refactor the way music is grouped up into artists and
albums.

The issue with previous attempts at implementing better artist
management was the reliance on MediaStore IDs in many parts of the
program. Dumpster this by merging the hash and ID values into a
single field that is garunteed to be unique enough. This allows songs
to be adequately grouped into case-insensitive artists while also
deduplicating albums that may have been split my MediaStore due to
heterogeneous formats.

Resolves #66.
2022-02-04 20:55:48 -07:00
hasanpasha
bdaa0519d8 add arabic tranlation 2022-02-04 14:49:54 +03:00
OxygenCobalt
6e00fd1129
music: merge duplicate albums [#66]
Move all duplicate checking to the album creation stage, adding a new
check for duplicate albums.

Album names can be similarly duplicated as artist names, most often
when one has an album consisting of multiple differing file formats.
This commit fixes that by grouping albums up by their ID as usual,
but then merging together albums that have the same (lowercase) album
name and (lowercase) artist name.
2022-02-03 20:05:20 -07:00
OxygenCobalt
433d623f14
strings: fix improper usage of plurals
Use a proper composition of the "many" and "other" fields in the plural
fields of specific languages.

In the french/czech plural configuration, both "many" and "other" are
used for string fields. The lint does not make this obvious, so in
d7f34e6 I ended up switching the "other" field to "many". This resulted
in some devices on those languages crashing. To fix this, we define
the "many" and "other" fields with the same value to avoid a crash.

Resolves #69.
2022-02-02 07:17:28 -07:00
OxygenCobalt
3c9ffd5946
style: re-add inter
Re-add the inter typeface.

It's not good design to have two similar typefaces, so I may as well
revert back to Inter once and for all. It's too good of a typeface
compared to the mess of Roboto and other native fonts.
2022-01-30 20:31:40 -07:00
OxygenCobalt
9514f17bc7
music: group artists case-insensitively [#66]
Group up album artists case-insensitively.

Music files from the same artist may format the artist differently, such as being
in uppercase/lowercase forms. If we have already built an artist that has a
functionally identical name to another artist, then simply merge the artists
instead of keeping them separate.
2022-01-30 17:29:42 -07:00
OxygenCobalt
50a2305f63
music: respect individual artist names [#66]
Modify the music loader to use the normal artist name when using song
titles while still retaining album artist functionality.

Oftentimes music files will be tagged as to use the artist tag to
specify performers, collaborators, and others, and then use the album
artist tag to group them up into a single artist. Previously, Auxio
would only use the album artist tag, which flattened the collaborator
information out for consistency. Resolve this by implementing a sort
of "resolved artist name" for songs that is used in the UI and nowhere
else. This seems to work well, but at the same time further ruins the
API surface for handling music objects. An acceptable price to pay
for a better UX.
2022-01-30 16:46:11 -07:00
OxygenCobalt
50f6f8f348
style: migrate body type to roboto
Migrate to the native roboto typeface on body elements.

Migrating to the native typeface saves on APK size, contributes to a
more native look and feel, and create a more compact UI for smaller
devices. Inter Semibold remains as the "Flair" type that distinguishes
Auxio from other apps.
2022-01-29 10:25:35 -07:00
OxygenCobalt
44c53d96f3
Version 2.1.0
Ready for version 2.1.0 of Auxio.
2022-01-28 19:22:18 -07:00
OxygenCobalt
d540773664
deps: fix aar issues
Fix insane build issues with the new aar system through means that I
really don't understand.
2022-01-27 19:41:25 -07:00
OxygenCobalt
5b5aa24f5c
deps: use aar
Bundle our custom ExoPlayer components into aar instead of directly
depending on the project. This just makes things far better regarding
ease of use and reproducible builds.
2022-01-27 15:05:45 -07:00
OxygenCobalt
f2e4a3a369
deps: move exoplayer to app
Move ExoPlayer from a top-level directory to srclibs.
2022-01-26 19:56:38 -07:00
OxygenCobalt
d7f34e6b94
all: migrate to api 32
Actually migrate to API 32 [Android 12L], co-inciding with the upgrade
of my studio install and the android gradle plugin. Alongside this, add
a bunch of fixes for lints that the new studio picked up.
2022-01-25 18:59:16 -07:00
OxygenCobalt
317b12579c
playback: expose media button receiver
Expose a custom MediaButtonReceiver that handles the media button
intent. This is not because I wanted to implement this. Some apps
like gadgetbridge just blindly query ACTION_MEDIA_BUTTON instead of
relying on the more modern MediaController API, which I expected
most apps would use instead.

Resolves #62.
2022-01-25 17:20:26 -07:00
OxygenCobalt
c9f789e388
revert "style: migrate to roboto"
I want to hold off with this migration actually. I feel like it's too
jarring of a change to be included as of right now.
This reverts commit 50170f202e.
2022-01-23 12:42:49 -07:00
OxygenCobalt
3de5fecf4a
coil: gracefully handle file handling failures
Wrap the basic fetchArt call in a try statement to prevent exceptions
from being unable to open a file from propagating outwards. This allows
us to safely degrade when creating mosaics.
2022-01-23 11:30:26 -07:00
OxygenCobalt
b04611c3be
playback: fix media intent detection [#62]
Some apps query for media apps by checking for apps that have a
BroadcastReciever that handles the ACTION_MEDIA_BUTTON intent. However,
Auxio does not have a custom media button reciever, instead relying on
the androidx media button reciever. This resulted in Auxio not showing
up in apps like GadgetBridge. Fix this by exposing the androidx media
button reciever in the manifest, which allows this app to be detected.
2022-01-23 11:04:27 -07:00
OxygenCobalt
c98d131316
style: implement m3 switches
Implement a facimile of the new Material 3/You switches in the settings
menu. There's no defined spec for this yet, so I just shamelessly ripped
the implementation from Doodle.
2022-01-23 10:56:34 -07:00
OxygenCobalt
50170f202e
style: migrate to roboto
Dumpster Inter in favor of Roboto. This is mostly for three reasons:
1. Reduces the insane typography setup that Auxio uses
2. Reduces total app size since .ttf files are pretty large and the
dynamic fonts feature was proprietary.
3. Creates a more cohesive look and feel given that nearly every
android app also uses Roboto.
2022-01-23 10:17:47 -07:00
OxygenCobalt
eadf4cc86d
detail: extend smart queue disabling to detail
Add the queue disabling functionality from 47fca78 to the album detail
fragment as well.
2022-01-21 19:59:00 -07:00
Clyde
c8f1fd1094
Update strings.xml
Complicated Simplified Chinese localization accroding to the latest strings from `/app/src/main/res/values/strings.xml`.
2022-01-21 15:00:22 +08:00
OxygenCobalt
47fca7819f
ui: disable queue adding if no playback
If theres no playback going on, disable the play next/add to queue
options, as they will have no effect. This mostly for QoL purposes.
2022-01-19 06:52:05 -07:00
OxygenCobalt
e5901fa9e2
playback: use gesture insets in playback layout
When using gesture navigation, swipe up events might conflict with the
slide up behavior of the playback layout. To fix this, inset the
playback bar based on the gesture insets instead of the system bar
insets.
2022-01-18 19:51:06 -07:00
OxygenCobalt
e4f2906767
deps: upgrade deps
Material -> 1.5.0 [Finally]
ConstraintLayout -> 2.1.3
2022-01-17 16:49:20 -07:00
OxygenCobalt
95e8b06f19
style: extend edge-to-edge on all versions
Extend edge-to-edge to versions below Android Oreo. This is done
through tinting the navigation bar colors on those versions,
circumventing the coloring issue.
2022-01-15 20:12:23 -07:00
OxygenCobalt
4dcc3c3b69
playback: fix queue adding with one-song queues
Fix an issue where with queues of one-song, adding another song with
"Play next" results in it going behind the current song. This stemmed
from a fix for a crash with empty queues, so instead of doing some
insane min/max logic we just check if the queue is empty and just don't
add the item if it is. It will only get overwritten anyway.
2022-01-13 20:24:02 -07:00
OxygenCobalt
ddf2757cb6
playback: add dynamic replaygain mode [#7]
Add a "Dynamic" replaygain mode inspired by the FooBar2000 plugin. This
will automatically determine whether the playback is in an album or not
and use the album gain or track gain accordingly.
2022-01-13 20:15:22 -07:00
OxygenCobalt
5359c819bd
prebuild: reformat
Reformat the prebuild file, which apparently decided to format
themselves with indents instead of spaces. Fun.
2022-01-09 19:00:55 -07:00
OxygenCobalt
2f190f1e0b
playback: use custom exoplayer
Use a custom ExoPlayer fork with the FLAC extension enabled. This
greatly improves the listening experience, as it enables metadata
support on OGG files and FLAC files to be played below API 27.
2022-01-09 12:27:18 -07:00
OxygenCobalt
5e3569d173
all: general cleanup
General cleanup. About to do another major playback change, so
push these changes now so they are not changed later.
2022-01-09 08:22:14 -07:00
OxygenCobalt
d4904136c0
search: open kb only when created
Make it so that the keyboard is only opened on the search view when
it's initially created instead of when it's loaded from the
backstack. This is just nice for overall UX.
2022-01-08 09:46:50 -07:00
OxygenCobalt
049b279e1f
playback: add playing from indicator to fragment
Add the "Playing From" indicator that used be on the queue to the
main playback view.
2022-01-08 09:26:26 -07:00
OxygenCobalt
13730c303c
util: fix number issues
Fix issues where invalid durations and years would not be aliased to
readable values.
2022-01-08 08:59:11 -07:00
OxygenCobalt
e099d1c38c
playback: switch audioreactor to callback system
Switch AudioReactor to a callback-based system. This makes updating the
volume much faster, as it's no longer reliant on a 500ms polling
interval.
2022-01-07 16:00:37 -07:00
OxygenCobalt
70ac37ca8a
playback: fix seekbar crash
Fix an edge case where if the total duration ends up being zero,
the app will end up crashing at the playback screen. Thank SeekBar
for deciding that it's perfectly okay to crash instead of decay
gracefully when valueTo is 0.
2022-01-07 14:10:45 -07:00
OxygenCobalt
9a7571a59a
playback: add replaygain setting
Add a settings option for ReplayGain.
2022-01-06 17:27:45 -07:00
OxygenCobalt
dc43edd6cb
deps: upgrate
Like a while loop with no escape.
Platform -> API 32
Coil -> 2.0.0-alpha06
2022-01-06 12:34:34 -07:00
OxygenCobalt
8ad44d898c
playback: refactor audio focus
Move all replaygain functionality into AudioReactor, alongside moving
all volume management into the class. This allows volume state to stay
sane throughout.
2022-01-06 12:21:32 -07:00
OxygenCobalt
357184dd8d
playback: minor replaygain fixes
Fix issues with the new replaygain system in the ducking system and
when there is no metadata to parse.
2022-01-06 11:06:42 -07:00
OxygenCobalt
d419a4230d
playback: add replaygain support
Add ReplayGain support leveraging ExoPlayer. This was a widely
requested feature, but since I thought I needed MediaStore to
expose the fields, I never considered it. Turns out ExoPlayer
automatically exposes metadata for ID3v2 and Xiph tags, so we
can implement it just fine.

Resolves #7.
2022-01-06 10:47:06 -07:00
OxygenCobalt
43e01e839d
playback: misc changes
I just spent 5 days trying to implement gapless playback using
ExoPlayer and Hopium. That's 5 days I'm never getting back. Heres
what I did add in the process though.
2021-12-27 18:34:43 -07:00
OxygenCobalt
25dd276bd8
playback: use single-queue system
Switch auxio to a single-queue system. "Play next" adds songs to the top
of the queue, similar to before, and then "Add to queue" adds songs to
the bottom of the queue. This enables many more enhancements to be made
to the playback experience, at the cost of a feature I preferred.

Resolves #44.
2021-12-22 16:37:07 -07:00
OxygenCobalt
b92b08f8ab
home: make fab adaptive
Use a large FAB on tablet layouts, as in general it's okay to make
those elements bigger on large touchscreens.
2021-12-18 11:15:28 -07:00
OxygenCobalt
2d3fc47d7c
main: band-aid split screen mode layouts
Split screen layouts in android are completely borked. You can
resize Auxio down to the point where the UI is completely
unusable, and there is NO WAY TO SET A MINIMUM HEIGHT. This is
also not to mention that smallestScreenWidthDp is completely
busted too and still uses the size of the whole screen! Just
band-aid the first issue so that when the layout becomes so
small as to result in a messed up UI, just show a splash that
says that the app can't work at the specific window size.
2021-12-17 17:00:19 -07:00
OxygenCobalt
bae997018d
playback: add larger layout for playback bar
For tablets, use a larger playback bar that shows information more
predominantly.
2021-12-17 15:50:13 -07:00
OxygenCobalt
5a9ac4bec9
deps: upgrade
Round and round:

Coil -> 2.0.0-alpha05
Material -> 1.5.0-rc01
Kotlin -> 1.6.10
2021-12-17 14:45:40 -07:00
OxygenCobalt
284108678b
detail: add layout for small screens
Add a layout for especially small screens so that they do not have to
scroll as much.
2021-12-17 14:32:14 -07:00
OxygenCobalt
8e1da1bfc7
home: make tabs adaptive
Make tabs on the home page adapt to screen configuration changes, using
only icons when the width is small and icons + text when the width
is large.
2021-12-17 14:32:14 -07:00
Vladimir Kosolapov
7b10bf3a34
Updated localization file for Russian language 2021-12-14 22:00:39 +03:00
OxygenCobalt
6b355d6416
theme: re-add black theme on android 12
Re-add the black theme on Android 12. It still has use, unlike the
other theme options made obsolete by dynamic colors.
2021-12-06 06:22:13 -07:00
OxygenCobalt
4b7fa7415c
coil: change album cover rounding method
Forgot that coil's RoundedCornerTransformation is dependent on the
resolution of the image, resulting in inconsistent rounded corners.
Fix this by just doing the plain clipToOutline to round album covers.
2021-12-05 20:30:35 -07:00
OxygenCobalt
637bcccd51
music: clean up loader implementation
Clean up the music loader implementation, removing pre-sorting to make
it a bit more efficent. Instead, sorting is done on indiviual
components.
2021-12-05 17:56:21 -07:00
OxygenCobalt
cde3a99f4d
playback: fade out content as view slides
Re-add the ability for content to fade out as the playback or queue
view slides up. This also migrates the queue slide animation to also
fade out content, which allows for the stylistic cohesion I desire.
2021-11-27 11:49:06 -07:00
OxygenCobalt
e397cf1540
coil: add option to round album covers
Add an option to round album covers for people who might want more
visual cohesion with apps that have completely drunken the "Round
Everything!" kool-aid. Covers will still be hard-edged by default.
2021-11-26 14:15:26 -07:00
OxygenCobalt
14c9b81532
coil: fix mosaics on odd image sizes
Round the image sizes we use for our mosaics so that they are even.
Previously we didn't, and that resulted in bad mosaics being created.
2021-11-26 11:41:01 -07:00
OxygenCobalt
c0b2dee3ff
coil: use image size when creating mosaics
Use the image size provided by coil when creating our mosaics. This
allows both better transformations and better-quality mosaics in the
detail view itself.
2021-11-26 11:12:01 -07:00
OxygenCobalt
2ff2cd8cf4
Version 2.0.1
Ready for version 2.0.1 of Auxio.
2021-11-26 10:27:38 -07:00
OxygenCobalt
949d71dbd1
playback: actually fix controls not working
Turns out playback controls wouldn't actually work because the view
would detach but not the actual fragment, resulting in onCreateView
never being called and the entire system falling apart. This fixes
it by just giving PlaybackLayout the viewmodel instance it needs.
I'll need to release a hotfix for this issue since this is really
easy the trigger and really hard to fix unless you know why it
occurs. Android lifecycles suck so much.
2021-11-26 10:17:46 -07:00
OxygenCobalt
35eb07410d
playback: gracefully handle multi-window mode
Add a new layout that handles the edge-case where splitscreen is used
on a sufficently small device. Previously it would result in a squashed
landscape layout, but now it will show a layout that should fit fine in
most situations.
2021-11-26 09:54:59 -07:00
OxygenCobalt
eaac1ad1a8
playback: be safer with callbacks
Add an executePendingBindings call to PlaybackBarView's databinding.
Just in case.
2021-11-26 09:27:10 -07:00
OxygenCobalt
ec8f538cf0
docs: update metadata
Update metadata in preperation for 2.0.0.
2021-11-26 08:56:09 -07:00
OxygenCobalt
0fe73b5b18
docs: re-write architecture
Create a new ARCHITECTURE document that is up to date with Auxio 2.0.0.
2021-11-25 19:41:28 -07:00
OxygenCobalt
2be49b0042
playback: remove playback subtitle
Remove the playback subtitle for now. I'm considering re-adding it
eventually, but I want to make it so that the UI is less cluttered.
2021-11-25 14:22:47 -07:00
OxygenCobalt
c296321885
home: remove title gradient
Remove the title gradient. It did not work out that well actually.
2021-11-25 12:27:46 -07:00
OxygenCobalt
61624352e4
all: apply finishing touches
Apply the finishing touches for 2.0.0, mostly documentation but also
some odds and ends.
2021-11-25 12:02:10 -07:00
OxygenCobalt
56ded96b10
playback: use layer background in playback panel
Use a layered background in the playback panel, with a colorSurface layer
behind the elevated MaterialShapeDrawable. This is for safety, as there
might be cases where a fully transparent MaterialShapeDrawable results in
unexpected behavior.
2021-11-25 10:10:07 -07:00
OxygenCobalt
2ae22500d3
main: add proper backwards navigation
Move the backwards navigation hook from DetailFragment to MainFragment
and modify it so that it collapses the playback panel when one navs
back.
2021-11-25 09:48:06 -07:00
OxygenCobalt
805035f0d8
playback: improve compact -> full transition
Improve the way the compact playback view transforms into the full
playback view by splitting their view animations in two. This makes
the transition more akin to the Android 12 notification menu, which
due to the nature of how I'm fading views really does make it more
user friendly. Also re-add the "Now Playing" title and a new subtitle
displaying the currently playing artist.
2021-11-25 09:04:22 -07:00
OxygenCobalt
4ccaa7c4bb
all: cleanup code
Clean up code and fits a bunch of miscellaneous issues.
2021-11-24 20:22:30 -07:00
OxygenCobalt
6b54d4b783
playback: fix disabling on playback layout
Fix my haphazard disabling implementation that I copied from umano
without realizing that it would actually break everything.
2021-11-24 15:49:58 -07:00
OxygenCobalt
cfc7352571
playback: add slide up behavior
Completely refactor PlaybackBarLayout into PlaybackLayout, which now
not only handles the bar behavior but also allows for one to slide
up the bar layout into the full playback layout. This was largely
adapted from umano's AndroidSlidingUpPanel, albeit heavily minified
and mixed with the previous window inset tricks of the previous layout.
There are still some tweaks to be made, but this implementation seems
to be really good.
2021-11-24 15:13:34 -07:00
OxygenCobalt
06a7d8258b
sort: refactor sorting
Refactor sorting again to support free-floating ascending/descending
values on every single sort mode. This enables greater freedom in how
users can sort their music and allows me to finally get rid of the
old legacy sematic sorting modes that chose their ascending/decending
order depending on how they wanted it.
2021-11-21 15:45:20 -07:00
OxygenCobalt
e697908a2f
detail: update layouts
Update the detail layouts to work better on tablets and be more
consistent overall.
2021-11-20 17:03:21 -07:00
OxygenCobalt
c350576f21
ui: make list spans use exact sizing
Make list spans use exact sizing.
2021-11-20 10:54:24 -07:00
OxygenCobalt
4475d4a5cc
playback: update tablet layouts
Use proper exact-size layouts for the tablet views. This also adds a
new compact view that shows more controls for landscape/tablet layouts.
2021-11-20 10:44:40 -07:00
OxygenCobalt
58c2681f72
widget: change default size
Make the default widget size 3x2 again. This is because the UX is
generally nicer if the smaller widget is used as the default and
because the small widget is now no longer text-only and ugly.
2021-11-20 09:53:10 -07:00
OxygenCobalt
0e3ffb973b
coil: completely refactor image loading
Upgrade to coil 2.0.0 and completely refactor the usage of coil to work
with the new library structure. This also fixes the issue where error
icons will just re-appear due to blocking calls. I had to add a fix on
my end and also use the new caching system in coil 2.0.0.
2021-11-20 09:00:23 -07:00
OxygenCobalt
e3f4a6fefa
widgets: fix minor issues
Fix problems with weird margins in the small/wide widgets and change
the initial layout from widget_medium to widget_default.

The latter is nice, as it allows for more cohesion between the default
state and the "unhooked" state that's shown when the phone boots.
2021-11-16 16:48:40 -07:00
OxygenCobalt
71b15a3a6a
coil: disable exoplayer loading
Disable exoplayer loading since apparently the way I use a blocking
call in the coil coroutine causes it to be uncancellable. This ends
up resulting in errors continuing to apply themselves to whatever
view they were requested from, even if it was an error. Because you
know. Android.
2021-11-16 06:35:05 -07:00
OxygenCobalt
1ea3ddb2e0
coil: update image behavior
Update the image behavior for the following:
1. Use ic_album as the default image for songs and albums this just
looks beter in general.
2. Use a special default drawable for the widget so that it doesn't
look as strange.
3. Generally update the loading process throughout the app
2021-11-14 16:23:25 -07:00
OxygenCobalt
d4fa52ee13
widget: make small/wide widgets stylistic
Update the small/wide widgets to show just the cover art and controls.
This is for two reasons:
1. The old layouts wasted space, which didn't make them look very good
2. I want to add a more Material3-eque "Stylistic" widget option for
the people who want them. Doing this allows me to pack that option into
the widget without having to add a new option.
2021-11-14 09:00:54 -07:00
OxygenCobalt
f66dea9469
accent: rename all light accents to deep accents
The way Material3 uses an initial light accent seeds is...odd. It more
closely resembles deep purple [darker on light mode, lighter on dark
mode] in behavior. Therefore we simply rename the light accents to
this. This does mess up translations a lot, but I'll fix it when I
update the rest of the translations.
2021-11-13 19:16:42 -07:00
OxygenCobalt
c30c0d7fb3
accent: simplify accents
Simplify the accent scheme:
- Light Blue was re-generated to be a weird darker-on-light-mode
lighter-on-dark-mode blue that looked really similar to how blue-grey
turned out. These have been merged into a new color scheme called
deep blue.
- Deep Orange and Red were too similar after being re-generated, so
they have been merged to become a simple red accent.
2021-11-13 16:00:41 -07:00
OxygenCobalt
43b12598fb
styles: redo accents
Recreate all accents AGAIN. This time it's to properly generate secondary
and tertiary colors for these. The results of them vary [some might be
removed since they're too similar to other accents now], but most are
fine and they allow me to properly use these components without inane
bugs.
2021-11-13 11:51:36 -07:00
OxygenCobalt
d732aea1d3
style: improve typography
Improve typography (again) by isolating my weird non-standard text
styles and moving all font usage to the text styles, which allows
me to eliminate a lot of excessive font usages.
2021-11-11 18:53:34 -07:00
OxygenCobalt
032fd2bd40
style: use material in playback view
Use Slider and FloatingActionbutton in the playback view. This is not
because I wanted to, but because there were insane bugs on Lollipop
devices that stemmed from them being unable to load complex selector
resources.
2021-11-11 16:25:56 -07:00
OxygenCobalt
67797d957e
all: cleanup code
Upgrade dependencies, fix deprecation issues, and just clean up code
in general.
2021-11-11 12:19:07 -07:00
OxygenCobalt
8f61d8479a
style: migrate to Material3 text styling
Migrate to 100% Material3 text styling. I had to basically ignore the
intended styling here just to get a sensible design here, which is
"bad" but I do what I want. The only usage of MaterialComponents left
in the project now is the dialog since the new dialog style the worst
thing ever.
2021-11-11 11:48:22 -07:00
OxygenCobalt
63198f8677
style: unify typography
Use Material typography everywhere instead of using a mix of AppCompat
and Material styles. This is still based around MaterialComponents
though, as I'm not fully sure how to wield the new Material3 text
styles yet. This also completely phases out inter bold.
2021-11-09 06:52:02 -07:00
OxygenCobalt
c5fcc45ee9
detail: show name when scrolling
Show the name of the currently shown detail item when scrolling. This
is just UI candy that I've always wanted to add but couldn't due to
CollapsingToolbarLayout being a mess. This addition circumvents that
by simply doing some reflection magic and hooking the alpha of the
toolbar title to the current scroll state, solving the issue.
2021-11-08 19:54:38 -07:00
OxygenCobalt
1b79eb11e0
all: document custom stuff
Document and clean up PlaybackBarLayout and the fast scroll views to an
extent.
2021-11-07 19:02:50 -07:00
OxygenCobalt
8b8d36cf22
playback: improve persistence
Improve playback persistence in the following ways:
1. Shift the boundary of PlaybackStateManager and PlaybackStateDatabase
so that the reading and searching phases both occur at the same time,
which is more efficient.
2. Improve music hashing so that conflicts are minimized [this also
helps the future playlists addition]
3. Generally improve code style
2021-11-04 06:58:43 -06:00
OxygenCobalt
10c45f1492
home: prevent scrollbar from showing on measure
Prevent FastScrollRecyclerView from showing the scrollbar whenever it
would measure itself, which again results in a scroll event for some
reason.
2021-11-03 06:28:00 -06:00
OxygenCobalt
bb5d163f49
home: make fab size fixed
Make the shuffle FAB in the home UI a fixed size so that I don't have
to update padding based off of the screen config.
2021-11-02 19:39:40 -06:00
OxygenCobalt
2700a1d446
coil: ensure front cover correctness
When parsing quality covers using ExoPlayer, ensure that we have a
front cover image instead of some other type of image. This is slower,
but this setting is already slow, so why not just prioritize
correctness.
2021-11-02 07:12:22 -06:00
OxygenCobalt
93cdae2295
playback: fix bad compact view spacing
Fix an issue where the constraints in the playback view were not
actually anchored to the playback bar, resulting in bad spacing.
2021-11-02 06:59:38 -06:00
OxygenCobalt
0a4b07e583
playback: animate playback bar
Make the playback bar animate when it's shown at runtime. This
completes the playback bar layout and honestly it looks amazing.
2021-11-01 20:01:46 -06:00
OxygenCobalt
282933fb37
docs: update docs
Update general user-facing documentation in preperation for 2.0.0.
2021-11-01 17:08:12 -06:00
OxygenCobalt
6a03781750
drawable: fix resources
Turns out the icon commit from earlier was really slapdash and resulted
in the image drawables being lost. Also fix some misc widget issues.
2021-11-01 16:37:07 -06:00
OxygenCobalt
1beefa30a8
drawable: revamp icon
Revamp Auxio's icon entirely. Now it's generally more vibrant [won't
blend into the BG] and will actually has some style to it with an
angular song note instead of the default icon one.
2021-11-01 06:56:26 -06:00
OxygenCobalt
efb800ee6a
playback: fix playback progress bug
Fix an issue where I forgot to call executePendingBindings when
updating progress, resulting in strange behavior with the progress
bar.
2021-10-31 19:54:49 -06:00
OxygenCobalt
b50a23a47f
ui: fix misc issues
Fix miscellanious code style/compat/ui issues.
2021-10-31 16:06:00 -06:00
OxygenCobalt
7c1382db49
playback: add pre-R inset modification
Add the ability for PlaybackBarLayout to modify window insets on
android versions before R.
2021-10-31 14:05:16 -06:00
OxygenCobalt
c1e1329c21
playback: make compact playback ui a view
Change CompactPlaybackFragment into a View. This completely fixes the
issue I tried to band-aid in ae39054. The code is a bit uglier, but
that's tolerable.
2021-10-31 11:14:04 -06:00
OxygenCobalt
ae39054b63
playback: band-aid scroll position confusion
Band-aid an issue where the scroll position of any RecyclerView in a
PlaybackBarLayout would get consfused because while the main view was
present, the fragment was not inflated yet so that it would not show.
This is [kindof] fixed by moving the fragment instantiation to the
view initialization. However, sometimes the fragment might still not
be inflated. The fragment will likely be replaced with a view
eventually.
2021-10-31 10:03:52 -06:00
OxygenCobalt
e779698746
home: remove appbar collapse behavior
Remove the appbar collapse behavior. It's just causing too much bugs
and phones are so big now that the lost space really doesn't matter.
2021-10-30 18:31:57 -06:00
OxygenCobalt
68782fadac
ui: create dedicated playback bar layout
Create a dedicated playback bar layout. This replaces the old janky
observer system with something that handles state better and is just
more elegant.
2021-10-30 18:21:30 -06:00
OxygenCobalt
4f4f6654c0
widgets: re-add 2x2 widgets
Re-add 2x2 widgets. They were originally removed due to strange layouts
in landscape mode, but that has now been fixed with a new "tiny" layout
meant for that specific edge case. Also rename the widget forms to more
sensible names and make the small (previously minimal) widget be
text-only again.
2021-10-28 19:46:00 -06:00
OxygenCobalt
df49e2765f
music: refactor model usage
Refactor the way music models are constructed to achieve the following:
- Add a unified interface for resolving display names of artists
- Disambiguate the role of Header in the music objects
- Eliminate the need to load strings in with a context when creating
Header instances
2021-10-28 19:09:54 -06:00
OxygenCobalt
51ba72d861
music: change loading ux
Move the main loading response code to MainFragment and add a new
method for other objects to be notified of the progress of the
music loading process. There's probably a better way to do this,
but kotlin coroutines are so complex that I don't know where I
would start. This also adds some enhancements, such as the error
message now showing in more parts of the app and SearchFragment
now re-running the query if the MusicStore instance is loaded.
2021-10-27 18:23:15 -06:00
OxygenCobalt
255154c411
home: remove fab scrolling behavior
Remove the ability for the FAB to disappear on scroll, mostly because
the state would not be consistent and it was generally bad UX when
combined with the fast scroller.
2021-10-25 16:38:37 -06:00
OxygenCobalt
fe0c2761c7
music: make musicloader async
Make MusicLoader instantiation fully asynchronous. This implementation
changes a lot about Auxio. For one, the loading screen is now gone.
However, many parts of the app now run under the fact that MusicStore
might not be available. However, I don't think there will be too much bugs
from it. Some more changes will be made to improve this implementation.
2021-10-24 20:01:15 -06:00
OxygenCobalt
926fef4218
widgets: increase minheight
Prevent issues with malformed widget forms on certain devices by
increasing the minimum widget height to 152dp, which is the height
that the minimal widget should take up.
2021-10-24 11:30:10 -06:00
OxygenCobalt
3107464dd2
home: make fab hide when fast scrolling
Hide the FAB when fast scrolling. This is just a UX enhancement.
2021-10-24 11:03:24 -06:00
OxygenCobalt
71480d0299
home: move shuffle control to fab
Instead of having a play/pause header at the top of the song list, use
a FAB instead. This allows people to shuffle all of their songs even if
the songs tab isn't enabled, and it can be tranformed into a create FAB
when playlists are added.
2021-10-24 10:17:55 -06:00
OxygenCobalt
97808ce1c3
home: merge fast scroller
Merge the fast scroller back into Auxio once again, albeit this time
it's AFS instead of IndicatorFastScroll. This not only slims down the
implementation but also allows me to stop the scroller from appearing
every time the home view is recreated. All modifications were noted
and attribution is included to abide by the Apache 2.0 license.
2021-10-23 18:22:50 -06:00
OxygenCobalt
cb6d02fecc
coil: use exoplayer when loading quality covers
Make AlbumArtFetcher fall back to ExoPlayer's metadata system when
fetching covers. This is because some OEMs seem to cripple
MediaMetadataRetriever, which makes relying on that difficult. This
also modifies MosaicFetcher to rely on AlbumArtFetcher.

Resolves #51
2021-10-22 06:40:04 -06:00
OxygenCobalt
36228d0536
widgets: improve widgets
Enhance widgets in a couple of ways:
1. Make the cover art expand to fit it's aspect ratio with padding
instead of the entire widget. This does the cover art justice and
is more visually appealing in general.
2. Add two new widget forms: Terminal, which applies to only the
smallest widgets, and Minimal, which applies to short and wide
widgets
2021-10-21 19:17:55 -06:00
OxygenCobalt
9030de7774
ui: add edge-to-edge on bar-dependent fragments
Add edge-to-edge on the Home, Detail, and Search fragments. This
solution is not ideal at all, relying on viewModel state to make
sure that the padding is only applied when the playback bar is not
present. However, it works. I'll likely replace it with a better
layout once I can figure out how similar layouts like Material
Files' PersistentBarLyout work.
2021-10-20 20:11:07 -06:00
OxygenCobalt
e01816a1dc
settings: make tab dialog use checkboxes
Make the tab selection dialog use checkboxes instead of icons to make
it more user-friendly.
2021-10-20 19:37:20 -06:00
OxygenCobalt
aa649ebf22
style: remove themed app icons
Turns out android does not play so nice with themed icons. Pixel
launcher will actually cache them and prevent them from updating
every time a theme is updated, making it impractical. Hoipefully
google will make theming icons easier in the future with some kind
of class that follows the style settings. One can hope.
2021-10-19 20:47:16 -06:00
OxygenCobalt
b2f20bec30
style: improve material you usage
My phone has just updated to Android 12, and Auxio looks very out of
place compared to the other themed APIs. Improve the usage of Material
You on the app icon and the widgets so that they line up a bit more.
Can't fully commit though since sometimes the colors can't be
replicated or because they don't look very good.
2021-10-19 20:43:23 -06:00
OxygenCobalt
0537681a86
home: cleanup code
Clean up some bugs and old code from the tab customization
addition.
2021-10-17 20:53:00 -06:00
OxygenCobalt
23d1be8ebc
home: add tab customization
Finally add tab customization. This implementation is a
bit ugly, but I had to futureproof it for playlists and I'm
planning to clean up a lot of the duplicate code across the app.

This addition notably allows a default tab to be set, which is
something that was widely requested in #12. This UI rework finally
allows it to be added.
2021-10-17 20:27:16 -06:00
OxygenCobalt
a253cfccc4
home: add fast scroller
Add a new fast-scroller to the home view. This required some annoying
hacks to work, but it seems to work pretty well.
2021-10-13 19:49:20 -06:00
OxygenCobalt
7ef10fa4f8
search: collapse uis into single bar
Merge the search view and the redundant appbar into a single view. Also
fix another Material3 regression that stemmed from a bad text highlight
color.
2021-10-12 18:29:54 -06:00
OxygenCobalt
2d5c438c58
playback: improve queue ui
Improve the queue UI some more:
- Fixed an issue where clearing the user queue by clearing all items would
result in it bugging out
- Queue items now show a Material-y background when they are swiped
away. This was way harder than you might think it was.
2021-10-11 20:32:23 -06:00
OxygenCobalt
9fc56c1c3d
playback: make queue adding follow sort mode
Make it so that when one adds an album to the queue, it is sorted based
off of the preferred sort mode.
2021-10-11 18:59:53 -06:00
OxygenCobalt
e123999e4d
drawable: update icon
Update the app icon to reflect the new accents. Also move around some
things to make it easier to add dynamic colors later on. Don't make it
follow dynamic colors right now however, as I want to make sure it
lines up with the dynamic pixel icons before I make that change.
2021-10-11 18:54:26 -06:00
OxygenCobalt
8c7f0867f9
style: migrate to Material3
Mostly migrate to Material 3/Material You.

- Auxio should now follow dynamic colors on Android 12
- Accents have been regenerated to align with the new color roles
- Some colors have been tweaked here and there to line up with the
new design system
- Dialogs were not fully migrated, but that's because Material3 dialogs
look god-awful.
- Accent class was reworked to take up less memory

Now that this is out of the way, I can focus on other UI things before
the release of 2.0.0.
2021-10-10 16:44:17 -06:00
OxygenCobalt
5ebe17d0ad
playback: make dedicated seekbar view
Make a dedicated seekbar view so that does the layout magic necessary
to have an adequate touch target while not taking up too much space.
Isolating this makes handling the playback layout's view much easier.
2021-10-05 19:32:35 -06:00
OxygenCobalt
4b6610d236
playback: make queue reflect sort mode
Re-add the feature where the queue will reflect the current sort mode
now that all sorting is persistent.
2021-10-03 19:02:27 -06:00
OxygenCobalt
f1db0a0162
home: make sorting persisent
Re-add persistent sorting to the home lists.
2021-10-03 18:57:21 -06:00
OxygenCobalt
d0835c3a0c
detail: fix genre sort issue
Fix a problem where GenreDetailFragment would apply ASCENDING when
ARTIST was selected in the sort menu. Turns out it was a bad constant
match.
2021-10-03 18:39:49 -06:00
OxygenCobalt
7e32763662
ui: misc ui updates
Do a couple of UI changes I thought of over this week:
- Make the detail header text neutral, mostly so I can make it so that
the accent only corresponds to active thingsd
- Remove the vanity elevation from the cover images. This is mostly to
abide by Material Design.
- Move the about screen to it's own menu slot on the main fragment.
2021-10-01 20:17:48 -06:00
OxygenCobalt
e946648b24
home: refactor list management
Return to the "four seperate list fragments" system when it comes to
HomeFragment. This reduces code complexity [no more massive when
chains] and allows me to customize the content of each fragment without
adding special cases.
2021-10-01 19:49:54 -06:00
OxygenCobalt
394327a2c4
deps: upgrade deps
constraintlayout -> 2.1.1
media -> 1.4.2
exoplayer -> 2.15.1
2021-09-29 06:43:43 -06:00
OxygenCobalt
23399be0c3
ui: make tablayout text lowercase
Make the TabLayout text lowercase, which seems to be what Material3
does by default (and it looks better anyway).
2021-09-29 06:21:10 -06:00
OxygenCobalt
5c3db12f10
all: minor tweaks
Make some minor changes to recently added parts of the app.
2021-09-27 07:01:56 -06:00
OxygenCobalt
b3156941d4
home: add play/shuffle to song list
Re-add the play/shuffle options to the song list, now as a header. This
seems to be the best option UX-wise, but the implementation is really
I think the best option regarding that is to extend this idiom to all
lists or split these fragments up. Both are reasonable.
2021-09-26 19:48:44 -06:00
OxygenCobalt
3ab425839c
music: refactor music loading
Refactor music loading to be based off of songs entirely. This reduces
efficency but enables some nices fixes, notably:
1. Album artists now have basic support [You won't be able to see
specific artists, but they won't be fragmented anymore]
2. Samsung devices probably shouldn't get confused about artist names
anymore, like in #40

This should hopefully be the last time I need to refactor this horrible
system. Thank god.
2021-09-26 15:36:24 -06:00
OxygenCobalt
276f991b2b
playback: remove audiofocus duck fadeout
Remove the ducking fadeout code from AudioReactor. This is mostly
because:
1. Android 12 now does this automatically
2. It caused a ton of annoying bugs
2021-09-26 13:43:14 -06:00
OxygenCobalt
7a17282c30
detail: re-add sorting
Re-add sorting to the detail fragments, now with the new system.
2021-09-25 18:12:42 -06:00
OxygenCobalt
a820724ff2
ui: increase seekbar height
Make the seekbar more touchable by increasing it's height. This should
have no measurable impact since I did some layout black magic and made
the rest of the layout slightly inset into the SeekBar's bounds. This
is not a nice solution. Hopefully I'll be able to make a dedicated view
with a Seeker with the same insetting things later on.
2021-09-24 20:39:10 -06:00
OxygenCobalt
68b8ff0798
ui: become more material
Give up and add more material elements such as neutral toolbar colors
and rounded corners. This is largely for stylistic cohesion. I will
keep rounded corners to a minimum though, rounding album covers is a
crime against humanitity.
2021-09-24 19:46:42 -06:00
OxygenCobalt
b2ebd92d2a
ui: fix ellipsizing of certain textviews
Fix a problem where ellipsizing wouldn't work on the new TextView
styles.
2021-09-21 06:41:35 -06:00
OxygenCobalt
443c26fe98
styles: refactor style methodology
Refactor the styling again to make all styles start with the Auxio
prefix. Also try to phase out the usage of layout_width and
layout_height in most places, since those can cause a lot of
frustration if they aren't used in the layout they are expected in.
2021-09-14 20:16:55 -06:00
OxygenCobalt
d16c1099bf
settings: remove colorizeNotif option
Remove the notification colorizing option. It's simply causing too many
bugs for it to be usable, especially on Android 11 with it's insane
behavior regarding album cover loading.
2021-09-12 17:46:43 -06:00
OxygenCobalt
bc6bba56fc
widget: update preview
Update the widget preview to reflect the UI tweaks made.
2021-09-12 17:33:48 -06:00
OxygenCobalt
08169b6167
ui: clean up dead code
Clean up the last remaining legacy SortMode remnants. Also reformat all
ViewHolder IDs to be properly unique and sequential.
2021-09-12 17:06:06 -06:00
OxygenCobalt
c9dd3b97a2
ui: fix dialog issues
Remove some more redundant dialog styles and fix an issue where
preference dialogs would crash when the screen is rotated.
2021-09-12 16:13:53 -06:00
OxygenCobalt
744e4172f3
ui: improve misc ui elements
Make some minor UI tweaks across the app.
2021-09-11 20:54:36 -06:00
OxygenCobalt
cafd7d8ca6
detail: fix album regressions
Fix the accidental navToItem breakage in AlbumDetailFragment.
2021-09-11 18:10:50 -06:00
OxygenCobalt
0e0be19e1d
detail: refactor module
Completely refactor the detail module. This is for a few reasons:

- Prevent data regeneration every time a fragment re-creates.
- Make DetailModel follow the customs of other ViewModels.
- Simplify layouts into a single detail item to reduce code
complexity.

Currently sorting doesn't work, but that is still being worked out
as the legacy SortMode continues to be phased out of Auxio.
2021-09-11 17:40:19 -06:00
OxygenCobalt
d8c0037b10
detail: fix highlighting issue
Fix an issue where in certain cases a playing item would not be
highlighted if it was being re-played. This was solved my simply
adding a check for if the new item was equal and ignoring it if
it is.
2021-09-06 19:20:57 -06:00
OxygenCobalt
00b7e0cac3
ui: further apply elevation overlays
Apply elevation overlays to CompactPlaybackFragment and dragged queue
items. This makes elevation more noticable on dark mode.
2021-09-05 20:22:40 -06:00
OxygenCobalt
0433abc5cb
search: normalize unicode strings
Normalize unicode strings when making searches. This allows accented
characters to be treated as typical characters/
2021-09-05 19:42:17 -06:00
OxygenCobalt
dae334b1d6
home: re-add sorting
Re-add sorting to HomeFragment, except heavily improved. The major
improvement here is the addition of song sorting, which was a heavily
requested feature judging by #16. The setting does not save yet and
is not present in the detail fragments, but it is still a major
milestone for the new home ui.
2021-09-05 16:11:37 -06:00
OxygenCobalt
0fc8f1cd02
ui: clean up colors
Further clean up coloring, adding new selectors to cut down on resource
duplication and to simplify logic in general.
2021-09-04 22:46:11 -06:00
OxygenCobalt
34367b3bae
ui: fix material issues
Migrate dividers over to material theming alongside making detail items
use a colorStateList instead of manually indexing for text colors.
2021-09-04 19:31:28 -06:00
OxygenCobalt
23e3c0241d
ui: completely migrate to material
Drop the Bridge theme and completely migrate to material. This is for
two reasons:

- To make Material You less painful
- Improve coloring [Dark mode, other colors, etc].

Most of the previous UI elements were kept [no rounded corners], but
did come at the cost of removing the hint tagline from the search bar
since there was simply no good way to integrate it. There are also
some other miscellanious issues [Weird selection menus, dividers are
not migrated still], but those will be fixed in future commits.
2021-09-03 20:37:32 -06:00
OxygenCobalt
74d55ba59e
home: make appbar liftOnScroll
Make HomeFragment's AppBarLayout lift when the data scrolls. This
was something I wanted to do initially, but kept running into issues
with. Turns out the addition of my custom AppBarLayout made this pretty
trivial all things considered. The entire app now follows this idiom.
2021-09-03 18:02:57 -06:00
OxygenCobalt
624eb57e7a
ui: fix divider color
Divider colors were accidentally messed up when the dark theme was
revamped, fix that.
2021-09-02 06:49:20 -06:00
OxygenCobalt
2d24770ab9
Merge pull request #49 from Fjuro/patch-1
Add Czech language
2021-09-01 20:05:36 -06:00
OxygenCobalt
2a695a4977
ui: brighten dark theme
Brighten the dark theme somewhat. This is for two reasons:
- To make colorOnSurface stick out less like a sore thumb
- To be more in line with other material apps
- To make the dark theme differ from the black theme more

Black theme remains unchanged, so if one wants a much darker theme,
then they can use that.
2021-09-01 18:48:02 -06:00
Fjuro
143397f571
Add Czech language 2021-09-01 19:53:26 +02:00
OxygenCobalt
acabe9217b
ui: use colorOnSurface
Use colorOnSurface for the first time ever. I decided to pick a color
that was as non-intrusive as possible that was still differentiateable,
and I think it looks like a net improvement. It will probably be
tweaked a bit in the future as I expand it to other elevated views.
2021-08-30 20:19:52 -06:00
OxygenCobalt
765f92ca98
ui: improve playback/about UIs
Make playback/about UIs follow the new liftOnScroll and edge-to-edge
idioms. This finally allows me to collapse a lot of duplicate code
into MainActivity and in general reduce code mess.
2021-08-30 19:53:19 -06:00
OxygenCobalt
1251af660a
ui: fix liftOnScroll issues entirely
Make a hack layout that fixes the problem of the lift state not
actually following the RecyclerView state. This should remove the
need for all the fragile fixes for this UI idiom.
2021-08-30 06:43:18 -06:00
OxygenCobalt
047b885dca
ui: fix landscape problems
Once again fix annoying issues that arise from the quirks of phone
landscape mode. A lot of these fixes can be re-rolled back into the
edge-to-edge code eventually, but it requires fitsSystemWindows to
be phased out entirely.
2021-08-29 21:00:17 -06:00
OxygenCobalt
a4d2a8d48c
search: improve ui
Improve the search UI by making it edge-to-edge and adding the
liftOnScroll idiom. It does come with the caveat of walking on
eggshells to get the liftOnScroll code working, but its okay. It
may be improved in the future.
2021-08-29 20:20:25 -06:00
OxygenCobalt
e142c17fca
home: make edge-to-edge
Make the home fragment span from edge-to-edge. This also adds a nice
effect for the toolbar to fade out when it collapses.
2021-08-29 18:29:58 -06:00
OxygenCobalt
c5b1d7d735
ui: refactor edge-to-edge
Merge all edge-to-edge functions into two methods for applying insets.
This generally simplifies code.
2021-08-29 16:20:45 -06:00