Appcompat

Allows access to new APIs on older API versions of the platform (many using Material Design).
Latest Update Stable Release Release Candidate Beta Release Alpha Release
July 26, 2023 1.6.1 - - 1.7.0-alpha03

Declaring dependencies

To add a dependency on Appcompat, you must add the Google Maven repository to your project. Read Google's Maven repository for more information.

Add the dependencies for the artifacts you need in the build.gradle file for your app or module:

Groovy

dependencies {
    def appcompat_version = "1.6.1"

    implementation "androidx.appcompat:appcompat:$appcompat_version"
    // For loading and tinting drawables on older versions of the platform
    implementation "androidx.appcompat:appcompat-resources:$appcompat_version"
}

Kotlin

dependencies {
    val appcompat_version = "1.6.1"

    implementation("androidx.appcompat:appcompat:$appcompat_version")
    // For loading and tinting drawables on older versions of the platform
    implementation("androidx.appcompat:appcompat-resources:$appcompat_version")
}

For more information about dependencies, see Add Build Dependencies.

Feedback

Your feedback helps make Jetpack better. Let us know if you discover new issues or have ideas for improving this library. Please take a look at the existing issues in this library before you create a new one. You can add your vote to an existing issue by clicking the star button.

Create a new issue

See the Issue Tracker documentation for more information.

Version 1.7

Version 1.7.0-alpha03

July 26, 2023

androidx.appcompat:appcompat:1.7.0-alpha03 and androidx.appcompat:appcompat-resources:1.7.0-alpha03 are released. Version 1.7.0-alpha03 contains these commits.

New Features

  • Support for getting per-app locales in non-Activity contexts (I58e753). Four new APIs have been added for this feature:

    • LocaleManagerCompat.getApplicationLocales(): for developers to get per-app locales out of activity scope.

    • ContextCompat.getString(): return localized strings based on per-app locales.

    • ContextCompat.getContextForLanguage(): the context returned by this method will respect the per-app locales.

    • ConfigurationCompat.setLocales(): for above APIs, to set the configuration's locale.

Other API Changes

  • Added setLineHeight(unit, lineHeight) to TextView compat classes (Ia9fa9)
  • Added setLineHeight(unit, lineHeight) to TextView compat classes (Ib2ee1)
  • Added setLineHeight(unit, lineHeight) to TextView compat classes (I15716)

Bug Fixes

  • AppCompatDialog now correctly sets the LifecycleOwner, SavedStateRegistryOwner, and OnBackPressedDispatcherOwner on the dialog's decor view via the ViewTree APIs, fixing issues when hosting a ComposeView within an AppCompatDialog. AppCompat now depends on Activity 1.7.0. (Ib28ab, b/261314581)
  • Significantly improve the performance of SupportMenuInflater (I0b087)

Version 1.7.0-alpha02

February 8, 2023

androidx.appcompat:appcompat:1.7.0-alpha02 and androidx.appcompat:appcompat-resources:1.7.0-alpha02 are released. Version 1.7.0-alpha02 contains these commits.

Bug Fixes

  • Fixed a memory leak in AppCompatDelegate.getLocaleManagerForApplication() (44b57fd)
  • AppCompat now depends on Fragment version 1.5.4 (I54dcd)

Version 1.7.0-alpha01

October 5, 2022

androidx.appcompat:appcompat:1.7.0-alpha01 and androidx.appcompat:appcompat-resources:1.7.0-alpha01 are released. Version 1.7.0-alpha01 contains these commits.

Bug Fixes

  • AppCompatActivity now sets the ViewTreeOnBackPressedDispatcherOwner so that it is possible to retrieve the dispatcher from the view. (I1a115, b/235416503)
  • Locale.getDefault() now returns the system locale after a cold start (I6a94b)
  • LinearLayoutCompat now preserves margin layout params (Id2af4)

Version 1.6.1

Version 1.6.1

February 8, 2023

androidx.appcompat:appcompat:1.6.1 and androidx.appcompat:appcompat-resources:1.6.1 are released. Version 1.6.1 contains these commits.

Bug Fixes

  • Fixed a memory leak in AppCompatDelegate.getLocaleManagerForApplication() (44b57fd)

Version 1.6.0

Version 1.6.0

January 11, 2023

androidx.appcompat:appcompat:1.6.0 and androidx.appcompat:appcompat-resources:1.6.0 are released. Version 1.6.0 contains these commits.

Important changes since 1.5.0

Version 1.6.0-rc01

September 7, 2022

androidx.appcompat:appcompat:1.6.0-rc01 and androidx.appcompat:appcompat-resources:1.6.0-rc01 are released. Version 1.6.0-rc01 contains these commits.

Bug Fixes

  • AppCompatActivity now sets the ViewTreeOnBackPressedDispatcherOwner so that it is possible to retrieve the dispatcher from the view. (I1a115, b/235416503)
  • Reverted a bug fix that overwrote the configuration passed to onConfigurationChanged, which had caused issues for tests that injected their own custom configurations through onConfigurationChanged.

Version 1.6.0-beta01

August 10, 2022

androidx.appcompat:appcompat:1.6.0-beta01 and androidx.appcompat:appcompat-resources:1.6.0-beta01 are released. Version 1.6.0-beta01 contains these commits.

API Changes

  • Move DrawableWrapper, DrawableContainer, and StateListDrawable compat classes to public API. (I37f3e, b/227789566)
  • Introduces a new factory for async layout inflater. (Ia657b)

Bug Fixes

  • Toolbar will now call onPrepareMenu() before the menu is shown instead of unconditionally when the menu is created. (I2a58d, b/232206677)
  • AppCompat now explicitly depends on Lifecycle 2.5.1 and SavedState 1.2.0. (I7e3e2)
  • Added support for back invoked callback to AppCompatDelegate and the AppCompat-provided Toolbar implementation. (I24062)
  • Finalize AppCompat APIs for 1.5.0-beta01 (I2a43d, b/236866227)
  • Finalize AppCompat APIs for 1.5.0-beta01 (I2a43d, b/236866227)

Version 1.6.0-alpha05

June 15, 2022

androidx.appcompat:appcompat:1.6.0-alpha05 and androidx.appcompat:appcompat-resources:1.6.0-alpha05 are released. Version 1.6.0-alpha05 was developed in a private pre-release branch and has no public commits.

API Changes

  • Nullability updates to align with finalized API surface in Tiramisu Beta 3 SDK
  • minCompileSdk is now 33 to align with Tiramisu Beta 3 SDK

Version 1.6.0-alpha04

May 18, 2022

androidx.appcompat:appcompat:1.6.0-alpha04 and androidx.appcompat:appcompat-resources:1.6.0-alpha04 are released. This library was developed against a private pre-release branch, so no commit log is available.

API Changes

  • Add an API to override SwitchCompat width restriction for use by MDC-Android

Bug Fixes

  • Avoid managed configuration when config changes outside of attachBaseConfig

Version 1.6.0-alpha03

April 27, 2022

androidx.appcompat:appcompat:1.6.0-alpha03 and androidx.appcompat:appcompat-resources:1.6.0-alpha03 are released.

This version requires Android 13 Beta 1 to compile and is not guaranteed to be runtime-compatible with future developer previews.

New Features

  • Support for app-wide custom language selection via AppCompatDelegate.setApplicationLocales(). Delegates to platform implementation on API 33 and above.

Version 1.6.0-alpha01

February 23, 2022

androidx.appcompat:appcompat:1.6.0-alpha01 and androidx.appcompat:appcompat-resources:1.6.0-alpha01 are released. Version 1.6.0-alpha01 was built from an internal branch and does not have publicly-visible commits.

This version requires Android Tiramisu DP1 to compile and is not guaranteed to be runtime-compatible with future developer previews.

New Features

  • Added support for customizing application locales. See AppCompatDelegate.setApplicationLocales(LocaleListCompat) for more information. Provides backward compatibility for the new per-language preferences API available in Android 13.

Version 1.5.1

Version 1.5.1

September 7, 2022

androidx.appcompat:appcompat:1.5.1 and androidx.appcompat:appcompat-resources:1.5.1 are released. Version 1.5.1 contains these commits.

Dependency Updates

Version 1.5.0

Version 1.5.0

August 10, 2022

androidx.appcompat:appcompat:1.5.0 and androidx.appcompat:appcompat-resources:1.5.0 are released. Version 1.5.0 contains these commits.

Important changes since 1.4.0

  • This stable version includes improvements to night mode stability, bug fixes and compound drawable tinting support for AppCompat-backed text widgets, and improvements to API usability. See previous 1.5.0-series release notes for a detailed list of changes.

Version 1.5.0-rc01

July 27, 2022

androidx.appcompat:appcompat:1.5.0-rc01 and androidx.appcompat:appcompat-resources:1.5.0-rc01 are released. Version 1.5.0-rc01 contains these commits.

Bug Fixes

  • Fixes an issue where AppCompat’s context wrapper reused the application context's backing resource implementation, resulting in uiMode being overwritten on the application context. (Idf9d5)

Version 1.5.0-beta01

July 13, 2022

androidx.appcompat:appcompat:1.5.0-beta01 and androidx.appcompat:appcompat-resources:1.5.0-beta01 are released. Version 1.5.0-beta01 contains these commits.

API Changes

  • Add an overridable flag to disable the default switch width adjustment. (I37cb7)
  • Add @FloatRange annotation to thumb position getter API (If524c)
  • Add missing nullability annotations to AnimatedStateListDrawableCompat (Ieb4ec)

Bug Fixes

  • Finalize AppCompat APIs for 1.5.0-beta01 (I2a43d, b/236866227)
  • Changing className value for ActionMenuItemView to treat it as a Button (I5ee1c)

Version 1.5.0-alpha01

April 6, 2022

androidx.appcompat:appcompat:1.5.0-alpha01 and androidx.appcompat:appcompat-resources:1.5.0-alpha01 are released. Version 1.5.0-alpha01 contains these commits.

API Changes

  • Added a new API to expose switch thumb's position to subclasses (I9bfb4)
  • Updated nullability to match Tiramisu DP2 (I0cbb7)
  • Backported compound drawable tinting to TextView-derived widgets (Idf98c, b/165822337)
  • AppCompatDialog now extends ComponentDialog for compatibility with OnBackPressedDispatcher (Id9b91, b/217620781)
  • SearchView.onQueryRefine() is now protected visibility to allow overrides (I6cce0, b/212882845)

Bug Fixes

  • AppCompat Toolbar now calls MenuHostHelper's onPrepareMenu() API. (I9b9b5, b/227376894)
  • AppCompatEditText, AppCompatAutoCompleteEditText, AppCompatMultiAutoCompleteEditText will no longer reset clickable or longClickable in the constructor when set in XML (Ic5066, b/221094907)
  • AppCompatEditText, AppCompatAutoCompleteTextView, and AppCompatMultiAutoCompleteTextView will not call overridden setKeyListener during the constructor (I5c13a, b/208480173)
  • Appcompat will not wrap instances of NumberKeyListener passed to setKeyListener, allowing TextView to correctly configure the locale on NumberKeyListeners (Ibf113, b/207119921)
  • Fixed issue with all NumberKeyListener subclasses introduced in AppCompat 1.4.0 that allowed unexpected characters such as punctuation to be input (Iede7a, b/207119921)

Version 1.4.2

Version 1.4.2

June 1, 2022

androidx.appcompat:appcompat:1.4.2 and androidx.appcompat:appcompat-resources:1.4.2 are released. Version 1.4.2 contains these commits.

Bug Fixes

  • Fix crash where AppCompatDelegateImpl made an internal call to ensureSubDecor before the action bar was created (aosp/2048349, b/226648941)

Version 1.4.1

January 12, 2022

androidx.appcompat:appcompat:1.4.1 and androidx.appcompat:appcompat-resources:1.4.1 are released. Version 1.4.1 contains these commits.

Bug Fixes

  • AppCompatEditText, AppCompatAutoCompleteTextView, and AppCompatMultiAutoCompleteTextView will not call overriden setKeyListener during the constructor. (I5c13a, b/208480173)
  • Emoji2 will not wrap instances of NumberKeyListener, allowing the locale to be configured by textview.
    • Appcompat will not wrap instances of NumberKeyListener passed to setKeyListener, allowing TextView to correctly configure the locale on NumberKeyListeners. (Ibf113, b/207119921)
  • Fixes issue with all NumberKeyListener subclasses introduced in appcompat 1.4.0 that allowed unexpected characters such as punctuation to be input (b/207119921) (Iede7a, b/207119921)

Version 1.4.0

Version 1.4.0

November 17, 2021

androidx.appcompat:appcompat:1.4.0 and androidx.appcompat:appcompat-resources:1.4.0 are released. Version 1.4.0 contains these commits.

Important changes since 1.3.0

  • Library is now targeting Java 8 language level
  • Updatable emoji support is enabled by default via the androidx.emoji2 library
  • Improved attribute inspection in Android Studio’s Layout Inspector (I02d55)
  • Added support for nested tinted resources and vector drawables in AppCompat resource loading backports. Note, however, that this means apps cannot override getDrawable() on a custom Resources object when backports are enabled. (Ia6b03, b/176129022)
  • Backported tintable background and check mark for CheckedTextView (I8575c)

Version 1.4.0-rc01

October 27, 2021

androidx.appcompat:appcompat:1.4.0-rc01 and androidx.appcompat:appcompat-resources:1.4.0-rc01 are released. Version 1.4.0-rc01 contains these commits.

Version 1.4.0-beta01

September 29, 2021

androidx.appcompat:appcompat:1.4.0-beta01 and androidx.appcompat:appcompat-resources:1.4.0-beta01 are released. Version 1.4.0-beta01 contains these commits.

API Changes

  • AndroidX AppCompat Toolbar is now a MenuHost and can manage MenuProviders. (I5cd95)

Bug Fixes

  • Fixed AppCompatProgressBar handling of layer-list progress bars (I6ece3, b/142004509)
  • Correctly retain android:digits in AppCompatEditText, this fixes bug 193047889 introduced in AppCompat 1.4.0-alpha03. (I4b4fc, b/193047889)
  • Integrated OnReceiveContentListener SDK and support lib APIs. (Ic6914, b/173814913)

Version 1.4.0-alpha03

June 30, 2021

androidx.appcompat:appcompat:1.4.0-alpha03 and androidx.appcompat:appcompat-resources:1.4.0-alpha03 are released. Version 1.4.0-alpha03 contains these commits.

New Features

  • Library is now targeting Java 8 language level
  • Add emoji2 support for more TextView subclasses (AppCompatMultiAutoCompleteTextView, AppCompatAutoCompleteTextView, AppCompatRadioButton, AppCompatCheckBox).

API Changes

  • Added an API to configure an InputConnection to use View.performReceiveContent to handle IME calls to InputConnection.commitContent. (I3a2ad)
  • Add support for EmojiCompat to AppCompatMultiAutoCompleteTextView (Ifece0)
  • Add support for EmojiCompat to AppCompatAutoCompleteTextView (Ia1f4b)
  • Add support for EmojiCompat to AppCompatRadioButton (If08af)
  • Add support for EmojiCompat to AppCompatCheckBox (I2b3bc)
  • Allow null KeyListener in AppCompatEditText. This reverses the non-null annotation that was added to AppCompatEditText in 1.4-alpha01 and restores the previous behavior when passed null. (I21482, b/189559345)
  • Add PopupMenu.setForceShowIcon for parity with platform APIs (I43bb3, b/182789798)

Bug Fixes

  • Fix bug in AppCompatEditText that will reset the inputType specified in XML to remove variations. This bug was introduced in AppCompat 1.4.0-alpha01. (I9df36, b/191061070)

Version 1.4.0-alpha02

June 2, 2021

androidx.appcompat:appcompat:1.4.0-alpha02 and androidx.appcompat:appcompat-resources:1.4.0-alpha02 are released. Version 1.4.0-alpha02 contains these commits.

API Changes

  • Added AppCompatDialogFragment constructor that takes a layout ID (Icbf22, b/188119987)
  • Improved layout inspector support (I02d55)
  • Renamed package in emoji2-views-helper to androidx.emoji2.viewsintegration. This is a breaking change for AppCompat 1.4.0-alpha01, and apps must ensure AppCompat dependency is updated to use the new emoji2 version. (Ie8397)

Bug Fixes

  • Fixed issue where stopped activities did not receive configuration changes from AppCompat-instrumented night mode changes. (I8fa8f, b/188681415)
  • Fixed bug in AppCompatEditText which would cause views to be focusable even when android:focusable="false" was specified in the xml (bug introduced in AppCompat 1.4.0-alpha01) (Ib9412)

Version 1.4.0-alpha01

May 18, 2021

androidx.appcompat:appcompat:1.4.0-alpha01 and androidx.appcompat:appcompat-resources:1.4.0-alpha01 are released. Version 1.4.0-alpha01 contains these commits.

API Changes

  • Integrated EmojiCompat support to a variety of AppCompat widgets (Id409b, If7a1a, Ic262d, Ib5f4a, I4fb3c)
  • Added support for nested tinted resources and vector drawables in AppCompat resource loading backports. Note, however, that this means apps cannot override getDrawable() on a custom Resources object when backports are enabled. (Ia6b03, b/176129022)
  • Improved layout inspector support (I6d771)

Bug Fixes

  • Fixed a scenario where calling setSupportActionBar after setting the window callback would overwrite the callback. (Ie43ee, b/186791590)
  • Added a workaround for an issue on SDKs 29 and 30 where ColorStateListDrawable resources cloned from the drawable cache don't load a default color until they receive a state change. (Iedb4b)
  • Avoid NPE when handling null custom selection action mode callbacks on AppCompat-backed views. (I033c7, b/173435375)

Dependency Updates

External Contribution

  • Backport tintable background and check mark for CheckedTextView (I8575c)

Version 1.3.1

Version 1.3.1

July 21, 2021

androidx.appcompat:appcompat:1.3.1 and androidx.appcompat:appcompat-resources:1.3.1 are released. Version 1.3.1 contains these commits.

Dependency updates

Version 1.3.0

Version 1.3.0

May 18, 2021

androidx.appcompat:appcompat:1.3.0 and androidx.appcompat:appcompat-resources:1.3.0 are released. Version 1.3.0 contains these commits.

Important changes since 1.2.0

  • Fixed propagation of android:theme attributes across <include>d layouts on pre-Lollipop devices
  • Reduced library size by converting many PNG resources to VectorDrawables
  • Added support for drag-and-drop events to AppCompatEditText with OnReceiveContentListener
  • Updated to support changes to Android 11 window inset handling
  • Added support for RTL in menu items with icons
  • Added support for inserting rich content (ex. pasting an image) in AppCompatEditText

  • Updated dependencies: appcompat updated many of its transitive dependencies to support new functionality and fixes:

Version 1.3.0-rc01

March 24, 2021

androidx.appcompat:appcompat:1.3.0-rc01 and androidx.appcompat:appcompat-resources:1.3.0-rc01 are released. Version 1.3.0-rc01 contains these commits.

Bug Fixes

  • Prevents permissions from being revoked prematurely when handling IME content insertion

Dependency Updates

External Contribution

  • Fixed propagation of android:theme attribute across <include>d layouts on pre-Lollipop devices (Simon Bergner at Opera)

Version 1.3.0-beta01

January 13, 2021

androidx.appcompat:appcompat:1.3.0-beta01 and androidx.appcompat:appcompat-resources:1.3.0-beta01 are released. Version 1.3.0-beta01 contains these commits.

New Features

  • Theme-level action mode drawables have been replaced with vector sources. This may cause slight changes in the visual appearance of individual icons. (I741a6)

API Changes

  • Integrated drag-and-drop (drop events) in AppCompatEditText with OnReceiveContentListener. (Ib26c9, b/175343405)
  • Updated OnReceiveContentListener and related APIs. See androidx.core library changes for more details. (Ib4616, b/173814913)
  • Moved widget.RichContentReceiverCompat to view.OnReceiveContentListener. (Ifdab7, b/173814913)
  • APIs to supply and retrieve initial surrounding text have been backported to EditorInfoCompat. They allow IME apps to avoid additional IPC latency. (Ie3809)

Version 1.3.0-alpha02

August 19, 2020

androidx.appcompat:appcompat:1.3.0-alpha02 and androidx.appcompat:appcompat-resources:1.3.0-alpha02 are released. Version 1.3.0-alpha02 contains these commits.

Bug Fixes

  • AppCompatRatingBar PNG drawables have been replaced with vector sources. This may cause slight changes in the visual appearance of individual stars. (I6b99d)
  • Update WindowInsetsCompat to Android 11 APIs (I3df9e)
  • Support RTL in menu items with icons (I2f5c5)

Dependency Updates

  • AppCompat has updated its dependency from Fragment 1.1.0 to Fragment 1.3.0-alpha08. It is strongly recommended to read through the Fragment 1.2.0 release notes to understand the major changes introduced in the previous Fragment release.
  • AppCompat has updated its dependency from Activity 1.0.0 to Activity 1.2.0-alpha08. It is strongly recommended to read through the Activity 1.1.0 release notes to understand the major changes introduced in the previous Activity release.
    • AppCompatActivity now uses the OnContextAvailableListener API introduced in Activity 1.2.0-alpha08 to set up the AppCompatDelegate. Any listeners added to subclasses of AppCompatActivity will run after this listener. (I513da)

Version 1.3.0-alpha01

May 20, 2020

androidx.appcompat:appcompat:1.3.0-alpha01 and androidx.appcompat:appcompat-resources:1.3.0-alpha01 are released. Version 1.3.0-alpha01 contains these commits.

New Features

  • Add a new Lint rule to flag calls to setActionBar on activities that extend AppCompatActivity
  • Added support for ViewTreeLifecycleOwner from Lifecycle 2.3.0-alpha01, ViewTreeViewModelStoreOwner from Lifecycle 2.3.0-alpha03, and ViewTreeSavedStateRegistryOwner from SavedState 1.1.0-alpha01 when using a View within an AppCompatActivity. (b/151603528, aosp/1300264)
  • Add common API for inserting rich content (e.g. pasting an image). The new callback provides a single API that apps can implement to support the different ways in which rich content may be inserted. For now the API is only added to AppCompatEditText and will be invoked for the following code paths:
    • paste from the clipboard
    • content insertion from the IME (InputConnection.commitContent) (I22bf7)

Bug Fixes

  • From AppCompat 1.2.0-rc01: AppCompat no longer calls onMenuOpened() with a null menu. (b/142843126)
  • Correctly resolve text link and hint colors on older devices when TextViewCompat.setTextAppearance is called with a text appearance style that has color state lists that reference theme color attributes (b/154702995)

Version 1.2.0

Version 1.2.0

August 5, 2020

androidx.appcompat:appcompat:1.2.0 and androidx.appcompat:appcompat-resources:1.2.0 are released. Version 1.2.0 contains these commits.

Major changes since 1.1.0

  • Fixed support for Configuration override use cases, including custom locales and font scales. See here for an example of how to correctly implement overrides using appcompat:1.2.0.
  • Deprecated AppCompatDelegate.attachBaseContext(). If you are calling or overriding this method, use AppCompatDelegate.attachBaseContext2() instead.
  • Deprecated CollapsibleActionView. This interface is no longer needed, use the platform-provided android.view.CollapsibleActionView interface.

Version 1.2.0-rc02

July 22, 2020

androidx.appcompat:appcompat:1.2.0-rc02 and androidx.appcompat:appcompat-resources:1.2.0-rc02 are released. Version 1.2.0-rc02 contains these commits.

Bug Fixes

  • Fixed an issue related to night mode where calling AppCompatDelegate.setDefaultNightMode from a dialog would occasionally fail to recreate activities and apply the new mode. (aosp/1348308, b/158923881)

Version 1.2.0-rc01

May 14, 2020

androidx.appcompat:appcompat:1.2.0-rc01 and androidx.appcompat:appcompat-resources:1.2.0-rc01 are released. Version 1.2.0-rc01 contains these commits.

API Changes

  • AppCompatDelegate.setLocalNightMode has been marked as requiring SDK version 17 or higher due to a platform issue with configuration changes leaking between Activities on earlier SDKs

Bug Fixes

  • AppCompatDelegate.setLocalNightMode may now be called prior to Activity.attachBaseContext
  • Fixed ActionBarOverlayLayout inset consumption which was incorrectly using the cached insets
  • AppCompat no longer calls onMenuOpened() with a null menu. (b/142843126)

Version 1.2.0-beta01

April 1, 2020

androidx.appcompat:appcompat:1.2.0-beta01 and androidx.appcompat:appcompat-resources:1.2.0-beta01 are released. Version 1.2.0-beta01 contains these commits.

New Features

  • Added the following new lint rules that will flag incorrect usages of AppCompat in the following scenarios:
    • Loading color state lists: suggests using ContextCompat and AppCompatResources APIs for backward compatibility
    • Loading drawables: suggests using ContextCompat and ResourcesCompat APIs for backward compatibility
    • Using color state lists with alpha attribute: flags missing android:alpha attribute that will lead to incorrect appearance on some platform versions
    • Tinting image views: flags not using app:tint that will lead to incorrect appearance on older platform versions
    • Using compound drawables and tinting on text views: suggests using compat attributes and APIs for backward compatibility

Bug Fixes

  • Fixed an issue where ActionBarOverlayLayout (window decor action) was not dispatching WindowInsets correctly.
  • Fixed issues in tinting drawables and text appearance on older versions of the platform
  • Fixed an issue where androidx.appcompat:appcompat:1.1.0 crashes webview when webview is long pressed (b/141351441)
  • Implemented fixes for issues with base context manipulation and retrieving system services during activity start up

Version 1.2.0-alpha03

March 4, 2020

androidx.appcompat:appcompat:1.2.0-alpha03 and androidx.appcompat:appcompat-resources:1.2.0-alpha03 are released. Version 1.2.0-alpha03 contains these commits.

Bug Fixes

  • Fixed an issue where the action mode status guard mistakenly extends into the navigation bar and has the wrong color (Ia4a09)
  • Fix issue where stopped Activities were not resuming on API Level 23 and below (I45201)

Version 1.2.0-alpha02

January 29, 2020

androidx.appcompat:appcompat:1.2.0-alpha02 and androidx.appcompat:appcompat-resources:1.2.0-alpha02 are released. Version 1.2.0-alpha02 contains these commits.

Bug fixes

  • Fixed issue where appcompat 1.1.0 crashes webview when long pressed (b/141351441)
  • Fixed drawable tinting on TextView relative to compound drawables on API Level 23 (aosp/1172194)
  • Ensured the base context is always a wrapper (aosp/1194355)
  • Added some improvements to be more clever when modifying the base context configuration (aosp/1204543)
  • Disabled createConfigurationContext() for Robolectric (aosp/1186218)

Version 1.2.0-alpha01

December 4, 2019

androidx.appcompat:appcompat:1.2.0-alpha01 and androidx.appcompat:appcompat-resources:1.2.0-alpha01 are released. Version 1.2.0-alpha01 contains these commits.

Bug fixes

  • Calls to PackageManager.getActivityInfo don't crash anymore under strict mode with boot-aware checks enabled
  • Fixes for tinting drawables on AppCompatButton
  • Fixes for tinting and text appearance on older versions of the platform

Version 1.1.0

Version 1.1.0

September 5, 2019

androidx.appcompat:appcompat:1.1.0 and androidx.appcompat:appcompat-resources:1.1.0 are released. The commits included in this version can be found here.

Important changes since 1.0.0

  • Dark Mode Improvements: MODE_NIGHT_AUTO and switching of dark/light based on the current time is now deprecated. Considering using an explicit setting, or MODE_NIGHT_AUTO_BATTERY.
  • Activity 1.0: AppCompatActivity now transitively extends from ComponentActivity from Activity 1.0.0 via Fragment 1.1.0. See the associated release notes for information on the changes in each library.
  • AppCompatActivity LayoutId constructor: Subclasses of AppCompatActivity can now optionally call into a constructor on AppCompatActivity that takes an R.layout ID, indicating the layout that should be set as the content view as an alternative to calling setContentView() in onCreate(). This does not change the requirement that your subclass have a no-argument constructor.

Version 1.1.0-rc01

July 2, 2019

androidx.appcompat:appcompat:1.1.0-rc01 and androidx.appcompat:appcompat-resources:1.1.0-rc01 are released. The commits included in this version can be found here.

Bug fixes

  • DayNight now honors configChanges correctly (aosp/981105)
  • Only call onConfigurationChanged on started Activities (aosp/987483)

Version 1.1.0-beta01

June 5, 2019

androidx.appcompat:appcompat:1.1.0-beta01 and androidx.appcompat:appcompat-resources:1.1.0-beta01 are released. The commits included in this version can be found here.

Bug fixes

  • Make sure we clean up receivers in AppCompatDialogs (aosp/959376)
  • Add support for buttonGravity=center_vertical on Toolbar (b/130361721)
  • Fix spinner horizontal offset (b/79477181)

Version 1.1.0-alpha05

May 7, 2019

androidx.appcompat:appcompat:1.1.0-alpha05 and androidx.appcompat:appcompat-resources:1.1.0-alpha05 are released. The commits included in this version can be found here.

New features

Bug fixes

  • Various fixes to DayNight mode
  • Invalidate outline on any background change in ActionBar
  • Fix spinner widget scroll
  • Fix custom set window backgrounds being overridden in AlertDialog

Version 1.1.0-alpha04

April 3, 2019

androidx.appcompat:appcompat:1.1.0-alpha04 and androidx.appcompat:appcompat-resources:1.1.0-alpha04 are released. The commits included in this version can be found here.

New features

  • Added new ThemeOverlay.AppCompat.DayNight family of themes. These should be used when using the DayNight feature.

API changes

  • AppCompatActivity now contain a second constructor that takes a @LayoutRes int, which replaces the previous behavior of annotating your AppCompatActivity class with @ContentView. This approach works in both app and library modules. (b/128352521)

Bug fixes

  • Pinned internal dependencies to stable versions where possible
  • Fixed AppCompatSpinnerscrolling in dropdown mode )b/124274573)
  • Only calls applyOverrideConfiguration() if required for DayNight

Version 1.1.0-alpha03

March 13, 2019

androidx.appcompat:appcompat:1.1.0-alpha03 and androidx.appcompat:appcompat-resources:1.1.0-alpha03are released. This is the first release of appcompat-resources. The full list of commits included in this version can be found here.

New features

  • The new appcompat-resources library contains APIs that allow apps to load and tint drawables (including vector drawables) on older versions of the platform. This is the same functionality that was previously part of the appcompat module, but is now available without the overhead of the full appcompat backport of Material design that includes widgets, dialogs, night mode etc.
  • Major fixes to DayNight mode support
  • New MODE_NIGHT_AUTO_BATTERY option for DayNight mode
  • Drawable tinting in AppCompatTextView
  • Toolbar overflow can now be styled with themed color state lists
  • Menu icons can now use colors that reference theme attributes
  • The new app:menu attribute can be set on a Toolbar to provide the menu content at inflation time

Bug fixes

  • Fixed default tint mode on ImageView on version 21
  • Fixed spinner popup incorrect dismissal on device rotation
  • Fixed DayNight does not respect configChanges in manifest
  • Fixed switching to MODE_NIGHT_FOLLOW_SYSTEM doesn't work (b/111345020)
  • Fixed WebView resets DayNight Resources (b/37124582)

Version 1.1.0-alpha02

February 7, 2019

androidx.appcompat:appcompat 1.1.0-alpha02 is released.

New features

  • Extracted resource-specific drawable handling into a hook (aosp/870976)
  • Allowed Toolbar titleTextColor and subtitleTextColor to use a ColorStateList and added ColorStateList overloads of the setTitleTextColor and setSubtitleTextColor methods (aosp/867489)

Bug fixes

  • Fixed fontFamily not working on pre API 24 (aosp/807054)
  • Fixed bug where textFontWeight did not work when an activity extends from AppCompatActivity (aosp/847640)
  • Fixed bug that caused the title text on the spinner widget popup (when using dialog mode) to not use the font specified in the fontFamily (aosp/789994)
  • Fix bug that prevented widgets AppCompatCheckBox and AppCompatRadioButton from be able to change the background tint (aosp/825160)
  • Fixed bug where AppCompat did not override android: list styles (aosp/862350)

Version 1.1.0-alpha01

December 3, 2018

New features

  • AppCompatTextView now supports app:drawableLeftCompat, app:drawableTopCompat, app:drawableRightCompat, app:drawableBottomCompat, app:drawableStartCompat and app:drawableEndCompat compound drawables, supporting backported drawable types such as VectorDrawableCompat.

  • AppCompatCheckBox and AppCompatRadioButton’s default drawables now animate check state changes.

API changes

  • aosp/740385: ActionBarOverlayLayout now implements NestedScrollingParent2 and NestedScrollingParent3, enabling it to facilitate the latest functionality in nested scrolling 3. If developer code currently overrides ActionBarOverLayLayout.onNestedScroll(View, int, int, int, int), it will likely no longer be called and ActionBarOverLayLayout.onNestedScroll(View, int, int, int, int, int, int[]) should be overridden instead.

Version 1.0.2

Version 1.0.2

November 7, 2018

Bugfix release of core-1.0.1 and appcompat-1.0.2.

Bug fixes

  • Fixed bug where PrecomputedTextCompat would crash when used with RTL AppCompatTextView. b/113070424

Version 1.0.0

Version 1.0.0

November 7, 2018

New features