widget: update preview

Update the widget preview to reflect the new styling.
This commit is contained in:
Alexander Capehart 2022-08-28 11:59:22 -06:00
parent ab59ca02fd
commit 016964e5d0
No known key found for this signature in database
GPG key ID: 37DBE3621FE9AD47
10 changed files with 19 additions and 53 deletions

View file

@ -23,6 +23,7 @@ buttons
- Fixed issue where the transition would be wrong when navigating out of the
detail views after a rotation
- Fixed issue where widget resizing would be far different than intended
- Fixed broken playback layout on small portrait screens
#### What's Changed
- ReplayGain can now no longer be disabled. Remove ReplayGain tags from

View file

@ -20,7 +20,8 @@
# hide the original source file name.
#-renamesourcefileattribute SourceFile
-dontobfuscate
-keep class org.oxycblt.auxio.AuxioApp
-keep class org.oxycblt.auxio.settings.SettingsListFragment
# Free software does not obsfucate. Also it's easier to debug stack traces.
-dontobfuscate

View file

@ -38,7 +38,7 @@ import org.oxycblt.auxio.util.systemBarInsetsCompat
/**
* The single [AppCompatActivity] for Auxio.
*
* TODO: Add error screens.
* TODO: Add error screens
*
* TODO: Custom language support
*
@ -113,7 +113,7 @@ class MainActivity : AppCompatActivity() {
val settings = Settings(this)
// Disable theme customization above Android 12, as it's far enough in as a version to
// the point where most phones should have an automatic option for light/dark theming.
// the point where most phones should have an option for light/dark theming.
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.S) {
AppCompatDelegate.setDefaultNightMode(settings.theme)
}

View file

@ -97,8 +97,7 @@ class MainFragment :
}
}
} else {
// Dual-pane mode, color/pad the queue sheet manually. Note that we do not round
// corners, as the queue sheet cannot be dragged in dual-pane mode.
// Dual-pane mode, color/pad the queue sheet manually.
binding.queueSheet.apply {
background =
MaterialShapeDrawable.createWithElevationOverlay(context).apply {
@ -310,8 +309,6 @@ class MainFragment :
/**
* A back press callback that handles how to respond to backwards navigation in the detail
* fragments and the playback panel.
*
* TODO: Migrate to new predictive API
*/
private inner class DynamicBackPressedCallback : OnBackPressedCallback(false) {
override fun handleOnBackPressed() {

View file

@ -50,9 +50,6 @@ class PlaybackPanelFragment :
MenuFragment<FragmentPlaybackPanelBinding>(),
StyledSeekBar.Callback,
Toolbar.OnMenuItemClickListener {
private var animator: ValueAnimator? = null
private var radius = 0.3f
// AudioEffect expects you to use startActivityForResult with the panel intent. Use
// the contract analogue for this since there is no built-in contract for AudioEffect.
private val activityLauncher by lifecycleObject {

View file

@ -116,9 +116,7 @@ class WidgetProvider : AppWidgetProvider() {
private fun requestUpdate(context: Context) {
logD("Sending update intent to PlaybackService")
val intent = Intent(ACTION_WIDGET_UPDATE).addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY)
context.sendBroadcast(intent)
}
@ -157,7 +155,8 @@ class WidgetProvider : AppWidgetProvider() {
logD("Assuming true widget dimens are ${width}x$height")
// Find the layout with the greatest area that fits entirely within
// the widget. This is what we will use.
// the widget. This is what we will use. Fall back to the smallest layout
// otherwise.
val candidates = mutableListOf<SizeF>()
for (size in views.keys) {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 132 KiB

After

Width:  |  Height:  |  Size: 133 KiB

View file

@ -1,20 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle">
<corners android:radius="@dimen/size_corners_mid_large" />
<solid android:color="?attr/colorPrimary" />
</shape>
</item>
<item>
<ripple android:color="@color/sel_remote_fab_ripple">
<item android:id="@android:id/mask">
<shape android:shape="rectangle">
<solid android:color="@android:color/white" />
<corners android:radius="@dimen/size_corners_mid_large" />
</shape>
</item>
</ripple>
</item>
</layer-list>
<shape android:shape="rectangle"
xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="@dimen/size_corners_mid_large" />
<solid android:color="?attr/colorPrimary" />
</shape>

View file

@ -1,20 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle">
<corners android:radius="@dimen/size_corners_medium" />
<solid android:color="?attr/colorPrimary" />
</shape>
</item>
<item>
<ripple android:color="@color/sel_remote_fab_ripple">
<item android:id="@android:id/mask">
<shape android:shape="rectangle">
<solid android:color="@android:color/white" />
<corners android:radius="@dimen/size_corners_medium" />
</shape>
</item>
</ripple>
</item>
</layer-list>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="@dimen/size_corners_medium" />
<solid android:color="?attr/colorPrimary" />
</shape>