[![Mend Renovate logo
banner](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[com.google.android.material:material](https://togithub.com/material-components/material-components-android)
| `1.9.0` -> `1.10.0` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/com.google.android.material:material/1.10.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/com.google.android.material:material/1.10.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/com.google.android.material:material/1.9.0/1.10.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/com.google.android.material:material/1.9.0/1.10.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
---
### Release Notes
<details>
<summary>material-components/material-components-android
(com.google.android.material:material)</summary>
###
[`v1.10.0`](https://togithub.com/material-components/material-components-android/releases/tag/1.10.0)
[Compare
Source](https://togithub.com/material-components/material-components-android/compare/1.9.0...1.10.0)
### What's new since 1.9.0
- Added Predictive back support for search, bottom sheet, side sheet and
navigation drawer. Check out the [developer
documentation](https://togithub.com/material-components/material-components-android/blob/master/docs/foundations/PredictiveBack.md)
for more details.
- Add `Start-aligned` variant to Carousel component. Check out the
[developer
documentation](https://togithub.com/material-components/material-components-android/blob/master/docs/components/Carousel.md)
for more details.
- Badge component updates. Check out the [developer
documentation](https://togithub.com/material-components/material-components-android/blob/master/docs/components/BadgeDrawable.md)
for more details.
- Left & RTL side sheets. Check out the [developer
documentation](https://togithub.com/material-components/material-components-android/blob/master/docs/components/SideSheet.md)
for more details.
#### Important
##### New minimum requirements for your app's project:
- Update `compileSdkVersion` to `34`
#### Dependency Updates
| Dependency | Previous version | New version |
| - | - | - |
| Gradle | 7.2.0 | 7.4.2 |
| androidx.activity | -- | 1.8.0 |
| androidx.appcompat | 1.5.0 | 1.6.1 |
| androidx.resourceinspection:resourceinspection-annotation | -- | 1.0.1
|
| androidx.resourceinspection:resourceinspection-processor | -- | 1.0.1
|
#### Library Updates
- `A11y`
- Do not count headers for accessibility
([`917da52`](917da52393))
- `Badging`
- Deprecate bottom badge gravities and update docs and usages in catalog
([`27abfdb`](27abfdba4f))
- Add new attribute for vertical offset when font is large
([`2362f4b`](2362f4b64b))
- Fix table formatting and remove unnecessary badge invalidation
([`44a97f4`](44a97f4a83))
- Fix crash caused by non-ascii strings
([`532b65d`](532b65d008))
- Badge cleanup/fixes:
([`4d50aa4`](4d50aa41e7))
- Add attribute to automatically adjust badge so that it is within the
anchor view's grandparent view's bounds
([`b706506`](b706506c3d))
- Add getters/setters for vertical and horizontal badge padding
([`a0d0b53`](a0d0b53472))
- Allow text strings in badges
([`c1ef52b`](c1ef52b8ea))
- Center badge content more correctly
([`fc0de1b`](fc0de1ba24))
- Add padding in between top and bottom edges of badge and text
([`8499b83`](8499b83ba1))
- Integrating tokens
([`68c844c`](68c844c91d))
- Add shape appearance for badges
([`2ddcfe4`](2ddcfe46b7))
- Update badge images
([`c1eba1b`](c1eba1b268))
- `BottomAppBar`
- Fix bug with transparent top app bar when in bottom app bar layout
([`c22eb0d`](c22eb0d31b))
- Fix issue with pre-21 FAB elevation/shadow sometimes appearing
([`2ea3df9`](2ea3df991f))
- `BottomNavigationView`
- Integrate tokens and add shape appearance support
([`7bd9724`](7bd9724078))
- `BottomSheet`
- Fix sheet corners animation
([`a5ff190`](a5ff190f52))
- Update bottom sheet documentation
([`af1fa70`](af1fa70979))
- Integrate tokens
([`86cd9d7`](86cd9d70bf))
- Add method to allow programmatically changing
shouldRemoveExpandedCorners behavior
([`c8a0d47`](c8a0d47825))
- Update expanded corner removal to check if sheet view is actually at
top of screen
([`1c01e82`](1c01e82297))
- Fix for detached from bottom sheet behavior.
([`9c4b73d`](9c4b73da3a))
- Ignore ACTION_MOVE events in BottomSheetBehavior that weren't preceded
by an ACTION_DOWN event.
([`d8c01c1`](d8c01c1859))
- `Carousel`
- Add orientation helper to clean up CarouselLayoutManager orientation
differences
([`7822ef8`](7822ef827b))
- Update docs to include hero variant
([`ec509cc`](ec509cc734))
- Add vertical scrolling capability
([`6b48d3b`](6b48d3bb80))
- Deprecate set/get mask x percentages in Maskable as they are no longer
used anywhere, and is a misleading method due to these methods not
actually having any effect on the Carousel as CarouselLayoutManager
overrides the values.
([`29d8742`](29d8742917))
- Ensure that masks are pushed out beyond the parent bounds if they are
*on* the parent bounds
([`9486de5`](9486de5f2f))
- Carousel updates and fixes
([`16c1575`](16c1575758))
- Fix contained mask logic to only update masks when it is still in
view, and remove restrictions on mask size with childWidth/2F. The only
restriction is that the right of the mask must be greater than the left
of the mask.
([`7d6a977`](7d6a977d50))
- Fixed multi browse strategy clipping extra small items before being
fully collapsed
([`85b6d50`](85b6d5018d))
- Add Carousel Hero strategy demo
([`b57dae5`](b57dae57aa))
- Add Hero carousel strategy
([`340cd44`](340cd44b07))
- Add option for snapping with multi-browse carousel demo
([`26c3779`](26c377962f))
- Add CarouselSnapHelper
([`8938da8`](8938da8c28))
- Refactor to reuse logic between different Carousel strategy classes
([`1c27404`](1c27404fc5))
- Fix item masking for API 21
([`7bc26e5`](7bc26e5070))
- Updated MultiBrowseCarouselStrategy to find best arrangments using a
cost function
([`0184b5b`](0184b5baa9))
- Fixed mutli-browse catalog demo crashing due to invalid position
slider values.
([`5bc7a50`](5bc7a50b35))
- Add support for transitions by forcing canvas clipping when detaching
from the window.
([`93ceb7e`](93ceb7edee))
- Updated MaskableFrameLayout to use Outline path clipping on 33+ only.
([`43c5077`](43c507775f))
- Updated setForceCompatClipping visibility for testing.
([`3856af1`](3856af1b65))
- Updated MaskableFrameLayout to clip more performantly.
([`733c9e0`](733c9e08c2))
- Changed Maskable.add/removeOnMaskChangedListener to
Maskable.setOnMaskChangedListener.
([`359580b`](359580b6c1))
- Fixed child index bug causing items to be ordered incorrectly.
([`9d0732b`](9d0732be9e))
- `Catalog`
- Update side sheet state handling to be more accurate in demos
([`4442635`](4442635aec))
- Update bottom sheet state handling to be more accurate in demos
([`386d47b`](386d47b51b))
- Update to compileSdkVersion 34 and update catalog to use
androidx.activity:activity:1.8.0-alpha05
([`2336c23`](2336c23fab))
- Fixed catalog errors for some demos.
([`4c3e1d5`](4c3e1d513b))
- Fixes context menu are not themed on S
([`33e4f84`](33e4f841b2))
- `Checkbox`
- Fixed checkmark icon not updating color on error correctly in pre 21.
([`62aa802`](62aa802f6c))
- `Chip`
- Fix hand pointer icon not showing up on whole Chip when using mouse
input
([`2702b1a`](2702b1a8d5))
- Add theme overlays supported on API < 23
([`fd0c815`](fd0c81531c))
- `Color`
- Temporarily remove v34 Android U color references which could be
causing resource NotFoundExceptions
([`2a1a67f`](2a1a67f076))
- Fixed lint error.
([`824d75e`](824d75e773))
- Integrate container color token
([`206928b`](206928b8f9))
- Made SearchBar and SearchView's container colors configurable in XML
style.
([`cf006c5`](cf006c5e10))
- Added U color resources for contrast mode support.
([`93f386c`](93f386c9f6))
- `Dialog`
- Update DialogWhenLarge theme to have correct parent theme
([`dae89b7`](dae89b7ce2))
- Made dialog background color configurable in XML styles.
([`77cdc1e`](77cdc1e3ac))
- Made dialog background color configurable in XML styles.
([`303fabd`](303fabd331))
- `Documentation`
- Fix SideSheetDialog class definition and source links
([`e4d0fd3`](e4d0fd3d6c))
- Revise version guidance for Search usage.
([`0bcb570`](0bcb57074d))
- Formatted tables in the eng doc.
([`ef57f69`](ef57f699cb))
- Fix doc formatting for github
([`e75654d`](e75654d4c2))
- `ExposedDropdownMenu`
- Added attribute to set dropdown menu's container.
([`1562d0b`](1562d0b64f))
- `FloatingActionButton`
- Correctly handle min touch target size
([`d6f36e8`](d6f36e89e2))
- `Material 3`
- Remove resources loader support for tonal surface update
([`dfd9bfb`](dfd9bfb12f))
- Fix harmonization demo bug
([`836c51e`](836c51e44a))
- Updated content-based dynamic colors
([`e9b485d`](e9b485d619))
- Update Color doc
([`d7f9a06`](d7f9a067e3))
- Updated content-based dynamic colors
([`a511501`](a511501286))
- Adds Search class definition link to Search documentation.
([`e157608`](e157608050))
- Added ColorContrast API
([`a6cf098`](a6cf0985c4))
- Updated content-based dynamic with contrast levels
([`b335436`](b335436cf2))
- Updated SearchDemoUtils to mark the class and methods as public so
that it can be resued.
([`3b43d41`](3b43d41f16))
- Code style update
([`1fd695c`](1fd695c72a))
- Fix Search view prefix style.
([`e56e9b1`](e56e9b1dde))
- Updated search styles to set the default style attributes in the
related theme overlay.
([`9ffaa8d`](9ffaa8d1bf))
- Improve performance by preventing item change notifications during
inflation.
([`203d5ec`](203d5ec3a3))
- Fixed a crash in search components when view attributes inspection dev
setting is turned on.
([`1159923`](11599231a9))
- Color Component demo update
([`2aa1cf3`](2aa1cf3198))
- Color Component demo update
([`c786582`](c786582d6a))
- `MaterialButton`
- Set up Android Studio resource inspection annotation and annotation
processor, and add [@​Attribute](https://togithub.com/Attribute)
annotation to MaterialButton#getIconPadding
([`2b5c75f`](2b5c75f966))
- `MaterialDatePicker`
- Allow client app to access user selected inputMode
([`4d80434`](4d8043453e))
- Fix crash when clicking OK/Cancel on text input mode due to hiding
keyboard
([`7ccf670`](7ccf6708b0))
- Add getTextColor to DayViewDecorator
([`29b59c2`](29b59c21f5))
- a11y/i18n alignment
([`f4d0f56`](f4d0f5653a))
- ContentDescription for "DayName" is not properly getting read by
talkback for the German language
([`35bd1fc`](35bd1fc98f))
- Fix time zone when custom text input format is set
([`619d5a6`](619d5a6cad))
- Update screen width at which days size is 48dp in portrait mode.
([`ec511a5`](ec511a54cf))
- Made dialog container color configurable in xml style.
([`7b2c19b`](7b2c19b273))
- Fix hint for Korean
([`bcc97bf`](bcc97bfaf5))
- Integrated tokens.
([`30ea33e`](30ea33e948))
- Fix keyboard not showing at first in text input mode
([`4032a74`](4032a74112))
- `NavigationRail`
- Added bigger padding in between items on the navigation rail when font
scale is large so there is more room for the badges when they are forced
inside the view bounds
([`8b016a0`](8b016a0e8b))
- Integrate tokens and add shapeAppearance attribute
([`3b2b827`](3b2b827597))
- Added attribute to control the application of start window inset
padding.
([`3f99392`](3f993923b2))
- Fixed active item focused state color not being visible.
([`1d2a59b`](1d2a59ba37))
- `NavigationView`
- Updated NavigationView to use ViewOutlineProvider to handle corner
clipping when possible and remove drawerLayoutCornerClippingEnabled
attribute.
([`c031144`](c031144d26))
- Removed canvas clipping by default and added an option to
enabled/disable manually
([`e3b493f`](e3b493f5eb))
- `Predictive Back`
- Fix issue where modal accessibility is not reset after collapsing
search view predictively, which caused the screen to appear frozen when
using TalkBack
([`e8af8f9`](e8af8f9460))
- Fixed IllegalStateException crashes caused by
MaterialBackAnimationHelper.
([`845007e`](845007e5e9))
- Fixed `UnsupportedOperationException` `AnimatorSet` crash in
`SearchView`.
([`6720e24`](6720e242b0))
- Fix custom predictive back implementations and update
androidx.activity dependency to 1.8.0-alpha06.
([`722b936`](722b93682c))
- Fixed MaterialBackAnimationHelper.onCancelBackProgress being called
twice.
([`ad60bbf`](ad60bbf5d9))
- Fixed possible NaN crashes in MaterialBottomContainerBackHelper,
MaterialMainContainerBackHelper and MaterialSideContainerBackHelper.
([`122c296`](122c2966fd))
- Update components to use BackEventCompat
([`a67a885`](a67a885668))
- Make MaterialMainContainerBackHelper collapsedView optional
([`fb56ab4`](fb56ab4130))
- Fix issue on Android U where clicking SearchView back button causes
SearchBar to disappear and back arrow animation to not run
([`e69a324`](e69a324a2f))
- Minor dev doc edits
([`82a91c8`](82a91c8455))
- Update dev docs
([`47c307d`](47c307d889))
- Fix expand/collapse animation for non-predictive back cases where
rootView bounds are not equal to searchView bounds
([`577d23e`](577d23eceb))
- Added updateBackProgress() predictive back support for coplanar side
sheets.
([`5ba704a`](5ba704a273))
- Added handleBackInvoked() predictive back support for coplanar side
sheets.
([`b984e64`](b984e64445))
- Fix subtle detached side sheet glitch where after predictive back the
sheet does not fully slide off screen
([`52f1737`](52f1737dd8))
- Fix custom nav drawer Catalog demo pre-T crash due to
OnBackAnimationCallback class not found
([`d8c5c2c`](d8c5c2c87d))
- Added predictive back support for modal side sheets.
([`f335a50`](f335a50907))
- Added predictive back support for standard side sheets.
([`562285e`](562285e051))
- Update side container back helper to support containers with arbitrary
child views
([`9405121`](9405121f62))
- Only use device corner radius if SearchView reaches edge of screen
([`a93c91a`](a93c91a2e2))
- Make back helpers support generified View type
([`69b5386`](69b5386e4b))
- Add ability to opt-out of back handling
([`176ce5e`](176ce5e5f0))
- Update SearchView to support predictive back when set up with
SearchBar
([`a4b6f46`](a4b6f46f0c))
- Fix bug where standard hideable bottom sheets don't stay hidden after
predictive back
([`2c23d2a`](2c23d2a158))
- Add top-level developer documentation
([`8105cb7`](8105cb7ed6))
- Update Bottom Sheet to support predictive back
([`d6fad95`](d6fad952c6))
- Infrastructure for back handling in components + Navigation Drawer
predictive back support
([`2c297fa`](2c297faf4b))
- Migrate Catalog to use AndroidX back pressed callbacks and enable
predictive back-to-home
([`22c4e0d`](22c4e0dd60))
- `Search`
- Enforced outline variant to use colorSurface as container color.
([`cbbd50d`](cbbd50dedf))
- Support stylus handwriting in SearchBar
([`884a454`](884a4541e2))
- `SideSheet`
- Aligned close affordance and title text along the baseline rather than
the top.
([`7a3f30b`](7a3f30b065))
- Mapped close affordance to ?attr/colorOnSurfaceVariant in catalog.
([`7ee0b72`](7ee0b72e8a))
- Add links to class definitions in Side Sheet documentation and revise
version guidance.
([`d005ad7`](d005ad7a0c))
- Changed side sheet child containers in Catalog from LinearLayouts to
FrameLayouts.
([`690cd5d`](690cd5d695))
- Changed side sheet title text appearance to Title Large.
([`a0d4fa0`](a0d4fa03ff))
- Fixed modal sheet text field formatting bug in catalog.
([`87a45a2`](87a45a2a3d))
- Renamed private references of "origin" to "inner" in SheetDelegate and
related delegate classes.
([`ad9ad20`](ad9ad204f8))
- Fixed side sheet swipe calculations in RightSheetDelegate.
([`8ae8a37`](8ae8a3791a))
- Added left/start modal sheet.
([`d0ad45e`](d0ad45e1a1))
- Fixed container color assigned to incorrect attribute.
([`a4c65d8`](a4c65d86d3))
- Removed the hasValue check for shapeAppearance to guarantee it always
has a user value or default value to avoid NPE.
([`5e427da`](5e427da912))
- Added `LeftSheetDelegate` and left sheet support for standard and
coplanar side sheets.
([`78fa157`](78fa15748f))
- `Switch`
- Amendments to thumb icon size support
([`3abb658`](3abb658c88))
- Add support for setting thumb icon size
([`2e85f06`](2e85f06247))
- Fix morphing time of switch thumbs
([`23a2b17`](23a2b17355))
- `Tabs`
- Create tab demo fragment that uses viewpager2 in Catalog
([`add7f5d`](add7f5d650))
- Re-adding mistakenly removed tab layout theme
([`e708d98`](e708d98c74))
- Fix issue with indicator not being drawn when viewpager starts
scrolling before onLayout is called
([`34d6a14`](34d6a14700))
- `TextInputLayout`
- Added API to set cursor colors for API 28+.
([`c598ccd`](c598ccd51e))
- Make collapsed hint aligned with prefix and suffix text
([`d9b97b4`](d9b97b42ff))
- `TimePicker`
- Fix crash when clicking OK/Cancel/Icon on text input mode due to
hiding keyboard
([`1fcde2c`](1fcde2c8b2))
- Made dialog container color configurable in xml style.
([`5f542c8`](5f542c8946))
- `Tokens`
- Upgraded outdated token output in textfield & appbar.
([`d722a78`](d722a782bc))
- Updated to v0.162 for a new target.
([`0be665c`](0be665cfc0))
- Upgraded to v0.162.
([`9f1caa2`](9f1caa2c64))
- `TopAppBar`
- Updated to take a CSL as the AppBarLayout background color.
([`6980c40`](6980c40f12))
- Removing keyboard scroll event workaround for AppBarLayout since
CoordinatorLayout issue has been fixed in androidx.core:core:1.10.0
([`fdaff78`](fdaff78506))
- Fixed dragging the app bar layout overshoots the status bar.
([`b3f7b66`](b3f7b6604e))
- Added support to pass toolbar style.
([`cdda1fc`](cdda1fc66e))
- Fix bug in AppBarLayout that refreshes all its children's drawables
instead of just its own
([`21a7aff`](21a7aff545))
- `Other`
- Update library version to 1.10.0
([`5a45d85`](5a45d851e7))
- Update androidx.activity dependency to version 1.8.0
([`4faa81c`](4faa81c74d))
- Update androidx.activity dependency to version 1.8.0-rc01
([`7160a68`](7160a68c59))
- Update library version to 1.10.0-rc01
([`bcc2f91`](bcc2f915e8))
- Update androidx.activity dependency to version 1.8.0-beta01
([`bb0973f`](bb0973f2a5))
- Update library version to 1.10.0-beta01
([`7b8507f`](7b8507fd44))
- Update library version to 1.10.0-alpha06
([`0c0addd`](0c0adddbb9))
- Merge branch 'master' into release-1.10
([`543c473`](543c473696))
- Updated library version to 1.10.0-alpha05.
([`174a57d`](174a57dabe))
- \[TextInputEditText]Fix: TextInputEditText misses some visible lines
in CursorAnchorInfo#getVisibleLineBounds after scrolled
([`bdef355`](bdef355289))
- Fix kotlin version alignment
([`fc6f0a2`](fc6f0a24fa))
- Fix kotlin version alignment
([`7671188`](76711889df))
- Merge branch 'master' into release-1.10
([`797d494`](797d494e1a))
- Update library version to 1.10.0-alpha04
([`9123e4f`](9123e4ffb5))
- Replaced BuildCompat#isAtLeastU() method calls with explicit SDK
checks for UPSIDE_DOWN_CAKE.
([`f2e70d2`](f2e70d2d66))
- Add itemTextAppearanceActiveBoldEnabled attr
([`022e217`](022e217770))
- Update library version to 1.10.0-alpha03
([`11b8da4`](11b8da4da3))
- Update AppCompat dependency to 1.6.1
([`46778db`](46778db594))
- Update library version to 1.10.0-alpha02
([`1a2078b`](1a2078be29))
- Update to AGP 7.4.2 to get latest lint and fix Android U lint issues
([`5a37e4b`](5a37e4b35f))
- Update library version to 1.10.0-alpha01
([`c7d31fb`](c7d31fbec2))
- Minor fix.
([`dfbf4d9`](dfbf4d9c2c))
- Upgrade to 7.6.1.
([`500c8eb`](500c8eb25d))
- Update gradle-wrapper.jar
([`bb2716f`](bb2716f95e))
- Update string translations
([`5689ce2`](5689ce2608))
- Update compileSdkVersion to android-UpsideDownCake
([`3fb6bb2`](3fb6bb27a4))
#### Full list of changes
#### Full list of release notes
-
[1.10.0-alpha01](https://togithub.com/material-components/material-components-android/releases/tag/1.10.0-alpha01)
-
[1.10.0-alpha02](https://togithub.com/material-components/material-components-android/releases/tag/1.10.0-alpha02)
-
[1.10.0-alpha03](https://togithub.com/material-components/material-components-android/releases/tag/1.10.0-alpha03)
-
[1.10.0-alpha04](https://togithub.com/material-components/material-components-android/releases/tag/1.10.0-alpha04)
-
[1.10.0-alpha05](https://togithub.com/material-components/material-components-android/releases/tag/1.10.0-alpha05)
-
[1.10.0-alpha06](https://togithub.com/material-components/material-components-android/releases/tag/1.10.0-alpha06)
-
[1.10.0-beta01](https://togithub.com/material-components/material-components-android/releases/tag/1.10.0-beta01)
-
[1.10.0-rc01](https://togithub.com/material-components/material-components-android/releases/tag/1.10.0-rc01)
</details>
---
### Configuration
📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).
🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.
♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.
🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box
---
This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/pachli/pachli-android).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xOS4yIiwidXBkYXRlZEluVmVyIjoiMzcuNDYuMCIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Viewing edited statuses could crash on API levels around 26 with a
ResourceNotFoundException. Using `?colorOutline` for the divider colour
instead of `?android:textColorPrimary` fixes this, and is also a better
colour to use.
`Theme.Pachli` was being overriden on v29+ devices which meant that poll
options were showing with too much padding. Fix that by using `AppTheme`
as the final theme, and basing that off `Theme.Pachli`.
Black themes were using dark grey for toolbar and tab backgrounds, so
fix that too for a seamless experience with the black theme.
Not all subclasses were calling `super.onViewCreated()` so collecting
the server capability wasn't happening consistently. Fix this, and add a
`@CallSuper` annotation to prevent the problem from recurring.
Without this the model classes are not retained, which causes a
`ClassCastException` when parsing the new models for the instance v1 and
instance v2 API calls.
Fixes#250
Implement some support for server-side status translation. Do this by:
- Implement support for the `api/v1/instance` endpoint to determine if
the remote server supports translation.
- Create new `ServerCapabilities` to allow the app to query the remote
capabilities in a server-agnostic way. Use this to query if the
remote server supports the Mastodon implementation of server-side
translation
- If translation is supported then show a translate/undo translate
option on the status "..." menu.
- Fetch translated content from the server if requested, and store it
locally as a new Room entity.
- Update displaying a status to check if the translated version
should be displayed; if it should then new code is used to show
translated content, content warning, poll options, and media
descriptions.
- Add a `TextView` to show an "in progress" message while translation
is happening, and to show the translation provider (generally
required by agreements with them).
Partially fixes#62
---------
Co-authored-by: sanao <naosak1006@gmail.com>
Now that the flavour includes the store name it's not sufficient to
check for "orange" as the flavour, as that no longer matches. Now it
must start with "orange" to trigger using the git commit count as the
version code.
Users can inadvertently get stuck on older versions of the app; e.g., by
installing from one F-Droid repository that stops hosting the app at
some later time.
Analytics from the Play Store also shows a long tail of users who are,
for some reason, on an older version.
On resuming `MainActivity`, and approximately once per day, check and
see if a newer version of Pachli is available, and prompt the user to
update by going to the relevant install location (Google Play, F-Droid,
or GitHub).
The dialog prompt allows them to ignore this specific version, or
disable all future update notifications. This is also exposed through
the preferences, so the user can adjust it there too.
A different update check method is used for each installation location.
- F-Droid: Use the F-Droid API to query for the newest released version
- GitHub: Use the GitHub API to query for the newest release, and check
the APK filename attached to that release
- Google Play: Use the Play in-app-updates library
(https://developer.android.com/guide/playcore/in-app-updates) to query
for the newest released version
These are kept in different build flavours (source sets), so that e.g.,
the build for the F-Droid store can only query the F-Droid API, the UI
strings are specific to F-Droid, etc. This also ensures that the update
service libraries are specific to that build and do not
"cross-contaminate".
Note that this *does not* update the app, it takes the user to either
the relevant store page (F-Droid, Play) or GitHub release page. The user
must still start the update from that page.
CI configuration is updated to build the different flavours.
The preference change listener was being optimised out by R8, causing
rapid garbage collection, breaking the `changes` flow in release builds.
Fix this by annotating the field with `@Keep` so it is retained.
Fixes#225
Previous code always set `navigationBarColor` and `statusBarColor` to
`transparent` irrespective of the API level.
This only works on API 29 and above; if you do it on API levels lower
than that the system navigation buttons (home, back, recents) are
typically shown on a very similar colour to the background, making them
very hard to see.
Fixes#221
The previous code used `androidx.appcompat.widget.Toolbar` in a several
places.
It's better to use `MaterialToolbar` as that plays better with other
Material components.
Update the usage throughout the project.
In addition, implement a lint check that will prevent any future use
from creeping back in.
Fixes#28
Use Timber instead of `android.util.Log`. Removes the need for `TAG`
statics in companion objects, slightly simplifying the code. Opens the
door for some production logging in the future.
Previously the middle-of-screen progress spinner and the spinner that
appears on a swipe-to-refresh could get out of sync.
Fix this by removing the middle-of-screen progress spinner from relevant
fragments, as the swipe-to-refresh spinner shows the user that an
operation is in progress, and also clues them in to the fact that a
swipe-to-refresh is possible (by using the common UX control).
Fixes#75
There's a well-hidden `updateLintBaseline` task that does what the
custom `newLintBaseline` task does. Prefer the `update...` task to
reduce the amount of custom machinery in this build.
Previously, ending a drag on an image (that didn't result in dismissing
the fragment) animates the image back in to position restoring the X
axis scale factor.
The Y axis scale factor was not restored, potentially breaking the
image's aspect ratio. Restore the Y axis scale factor to fix this
(`ViewVideoFragment` already handles this correctly).
Fixes#202
This previous code could crash if `filterModel.kind` (marked `lateinit`)
had not been set before the filters are loaded. This could happen in
rare cases.
Fix this by rewriting `FilterModel`. Instead of creating a half-empty
object that still needs further initialisation, delay the creation until
all the necessary information is available, and pass it in the
`FilterModel` constructor.
This also forces code that uses `FilterModel` to properly handle the
case where it might be null at the point where filtering decisions have
to be made.
This means that `TimelineViewModel` (and subclasses) no longer need the
`init()` function to complete their construction, which was another
significant code smell. Pass the `TimelineKind` to the view models via
their `SavedStateHandle`.
This showed that changing filters wasn't causing the timelines to update
without a manual refresh, so fix that too. Editing filters sends change
events for the old and new contexts (in case a context is removed from a
filter), and deleting a filter sends a change event too.
Previous code called filters that affect threads "Conversations".
Correct this to "Threads", to distinguish from "Direct Messages" which
can also be known as "conversations" (in the API in particular).
Previous copyright notice mentioned that the license should have been
distributed with Tusky. Correct that to Pachli.
This does not change the copyright assignment, only the instructions
as to where to find the license.
A "self-boost" is someone boosting their own post. Some people are
particularly prolific at this, and it can clutter the timeline. Provide
a new preference that allows the user to show/hide these boosts from
their timeline.
Most parts of the UI will truncate the display of long names (display
and user), but it makes sense to show them untruncated on the account's
profile screen.
The previous code (a) used an emoji as the prefix character when showing
the destination of an obscured link, and (b) made the destination part
of the link anchor text.
Using an emoji was a problem because the user can use different emoji
sets and it can give strange results. Making the destination part of the
link text made it difficult to distinguish at a glance where one link
ends and another starts.
Fix the emoji problem by replacing the emoji with a drawable.
Fix the destination problem by changing the string resource so it only
includes the destination part, and inserting it at the end of the link
instead of replacing the whole link. This means the disclosed
destination is not clickable, does not look like part of the link, and
stands out more.
Previously was showing pale text on a pale background, so effectively
invisible.
Use `colorPrimary` and `colorOnPrimary` to ensure the text can be seen.
Using a sealed interface (instead of a sealed class) at the root of the
hierarchy avoids the overhead of having to create and initialise the
class (visible in the generated bytecode).
It also makes the instantiation code slightly less cumbersome because
the code doesn't need to pass parameters to the root's constructor.