widget: update preview
Update the widget preview to reflect the new styling.
This commit is contained in:
parent
ab59ca02fd
commit
016964e5d0
10 changed files with 19 additions and 53 deletions
|
@ -23,6 +23,7 @@ buttons
|
||||||
- Fixed issue where the transition would be wrong when navigating out of the
|
- Fixed issue where the transition would be wrong when navigating out of the
|
||||||
detail views after a rotation
|
detail views after a rotation
|
||||||
- Fixed issue where widget resizing would be far different than intended
|
- Fixed issue where widget resizing would be far different than intended
|
||||||
|
- Fixed broken playback layout on small portrait screens
|
||||||
|
|
||||||
#### What's Changed
|
#### What's Changed
|
||||||
- ReplayGain can now no longer be disabled. Remove ReplayGain tags from
|
- ReplayGain can now no longer be disabled. Remove ReplayGain tags from
|
||||||
|
|
5
app/proguard-rules.pro
vendored
5
app/proguard-rules.pro
vendored
|
@ -20,7 +20,8 @@
|
||||||
# hide the original source file name.
|
# hide the original source file name.
|
||||||
#-renamesourcefileattribute SourceFile
|
#-renamesourcefileattribute SourceFile
|
||||||
|
|
||||||
-dontobfuscate
|
|
||||||
|
|
||||||
-keep class org.oxycblt.auxio.AuxioApp
|
-keep class org.oxycblt.auxio.AuxioApp
|
||||||
-keep class org.oxycblt.auxio.settings.SettingsListFragment
|
-keep class org.oxycblt.auxio.settings.SettingsListFragment
|
||||||
|
|
||||||
|
# Free software does not obsfucate. Also it's easier to debug stack traces.
|
||||||
|
-dontobfuscate
|
|
@ -38,7 +38,7 @@ import org.oxycblt.auxio.util.systemBarInsetsCompat
|
||||||
/**
|
/**
|
||||||
* The single [AppCompatActivity] for Auxio.
|
* The single [AppCompatActivity] for Auxio.
|
||||||
*
|
*
|
||||||
* TODO: Add error screens.
|
* TODO: Add error screens
|
||||||
*
|
*
|
||||||
* TODO: Custom language support
|
* TODO: Custom language support
|
||||||
*
|
*
|
||||||
|
@ -113,7 +113,7 @@ class MainActivity : AppCompatActivity() {
|
||||||
val settings = Settings(this)
|
val settings = Settings(this)
|
||||||
|
|
||||||
// Disable theme customization above Android 12, as it's far enough in as a version to
|
// 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) {
|
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.S) {
|
||||||
AppCompatDelegate.setDefaultNightMode(settings.theme)
|
AppCompatDelegate.setDefaultNightMode(settings.theme)
|
||||||
}
|
}
|
||||||
|
|
|
@ -97,8 +97,7 @@ class MainFragment :
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Dual-pane mode, color/pad the queue sheet manually. Note that we do not round
|
// Dual-pane mode, color/pad the queue sheet manually.
|
||||||
// corners, as the queue sheet cannot be dragged in dual-pane mode.
|
|
||||||
binding.queueSheet.apply {
|
binding.queueSheet.apply {
|
||||||
background =
|
background =
|
||||||
MaterialShapeDrawable.createWithElevationOverlay(context).apply {
|
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
|
* A back press callback that handles how to respond to backwards navigation in the detail
|
||||||
* fragments and the playback panel.
|
* fragments and the playback panel.
|
||||||
*
|
|
||||||
* TODO: Migrate to new predictive API
|
|
||||||
*/
|
*/
|
||||||
private inner class DynamicBackPressedCallback : OnBackPressedCallback(false) {
|
private inner class DynamicBackPressedCallback : OnBackPressedCallback(false) {
|
||||||
override fun handleOnBackPressed() {
|
override fun handleOnBackPressed() {
|
||||||
|
|
|
@ -50,9 +50,6 @@ class PlaybackPanelFragment :
|
||||||
MenuFragment<FragmentPlaybackPanelBinding>(),
|
MenuFragment<FragmentPlaybackPanelBinding>(),
|
||||||
StyledSeekBar.Callback,
|
StyledSeekBar.Callback,
|
||||||
Toolbar.OnMenuItemClickListener {
|
Toolbar.OnMenuItemClickListener {
|
||||||
private var animator: ValueAnimator? = null
|
|
||||||
private var radius = 0.3f
|
|
||||||
|
|
||||||
// AudioEffect expects you to use startActivityForResult with the panel intent. Use
|
// 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.
|
// the contract analogue for this since there is no built-in contract for AudioEffect.
|
||||||
private val activityLauncher by lifecycleObject {
|
private val activityLauncher by lifecycleObject {
|
||||||
|
|
|
@ -116,9 +116,7 @@ class WidgetProvider : AppWidgetProvider() {
|
||||||
|
|
||||||
private fun requestUpdate(context: Context) {
|
private fun requestUpdate(context: Context) {
|
||||||
logD("Sending update intent to PlaybackService")
|
logD("Sending update intent to PlaybackService")
|
||||||
|
|
||||||
val intent = Intent(ACTION_WIDGET_UPDATE).addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY)
|
val intent = Intent(ACTION_WIDGET_UPDATE).addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY)
|
||||||
|
|
||||||
context.sendBroadcast(intent)
|
context.sendBroadcast(intent)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -157,7 +155,8 @@ class WidgetProvider : AppWidgetProvider() {
|
||||||
logD("Assuming true widget dimens are ${width}x$height")
|
logD("Assuming true widget dimens are ${width}x$height")
|
||||||
|
|
||||||
// Find the layout with the greatest area that fits entirely within
|
// 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>()
|
val candidates = mutableListOf<SizeF>()
|
||||||
|
|
||||||
for (size in views.keys) {
|
for (size in views.keys) {
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 132 KiB After Width: | Height: | Size: 133 KiB |
|
@ -1,20 +1,6 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
<shape android:shape="rectangle"
|
||||||
<item>
|
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<shape android:shape="rectangle">
|
<corners android:radius="@dimen/size_corners_mid_large" />
|
||||||
<corners android:radius="@dimen/size_corners_mid_large" />
|
<solid android:color="?attr/colorPrimary" />
|
||||||
<solid android:color="?attr/colorPrimary" />
|
</shape>
|
||||||
</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>
|
|
|
@ -1,20 +1,5 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<item>
|
<corners android:radius="@dimen/size_corners_medium" />
|
||||||
<shape android:shape="rectangle">
|
<solid android:color="?attr/colorPrimary" />
|
||||||
<corners android:radius="@dimen/size_corners_medium" />
|
</shape>
|
||||||
<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>
|
|
Loading…
Reference in a new issue