Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: material-components/material-components-android
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 1.7.0
Choose a base ref
...
head repository: material-components/material-components-android
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 1.8.0
Choose a head ref
Loading
Showing 718 changed files with 26,658 additions and 3,435 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -42,5 +42,5 @@ before_script:
- adb shell input keyevent 82

script:
- ./gradlew test -PdisablePreDex
- ./gradlew connectedAndroidTest -PdisablePreDex
- ./gradlew test
- ./gradlew connectedAndroidTest
23 changes: 8 additions & 15 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
buildscript {
ext.kotlinVersion = '1.3.50'
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.2.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
}
}

@@ -19,13 +17,13 @@ allprojects {
}

ext {
compileSdkVersion = 32
compileSdkVersion = 33
minSdkVersion = 14
targetSdkVersion = 32
targetSdkVersion = 33

androidXVersions = [
annotation : '1.2.0',
appCompat : '1.5.0-beta01', // To include SwitchCompat fixes
appCompat : '1.5.0',
cardView : '1.0.0',
constraintlayout : '2.0.1',
coordinatorlayout : '1.1.0',
@@ -42,24 +40,22 @@ ext {
dynamicanimation : '1.0.0',
]

errorproneVersion = '2.15.0'
testRunnerVersion = '1.4.0'
espressoVersion = '3.1.0'
mockitoCoreVersion = '2.25.0'
truthVersion = '0.45'
robolectricVersion = '4.8-alpha-1'
robolectricVersion = '4.9'

// Enforce the use of prebuilt dependencies in all sub-projects. This is
// required for the doclava dependency.
usePrebuilts = "true"

// Disable pre-dexing when gradle called with -PdisablePreDex;
preDexLibs = !project.hasProperty('disablePreDex')

mavenRepoUrl = (project.hasProperty('mavenRepoUrl')
? project.property('mavenRepoUrl') : '/tmp/myRepo/')

// Current version of the library (could be in-development/unreleased).
mdcLibraryVersion = '1.7.0-alpha03'
mdcLibraryVersion = '1.8.0'
mdcLibraryPackage = "com.google.android.material"
mdcLibraryDir = "com/google/android/material"
}
@@ -190,9 +186,6 @@ subprojects {
}

if (isAndroidLibrary || isAndroidApp || isAndroidTest) {
// Disable pre-dexing when gradle called with -PdisablePreDex;
project.android.dexOptions.preDexLibraries = rootProject.ext.preDexLibs

project.android {
compileSdkVersion rootProject.ext.compileSdkVersion

@@ -208,8 +201,8 @@ subprojects {
aaptOptions.additionalParameters "--no-version-vectors"

android {
lintOptions {
check 'NewApi'
lint {
checkOnly 'NewApi'
}
}

6 changes: 5 additions & 1 deletion catalog/build.gradle
Original file line number Diff line number Diff line change
@@ -25,6 +25,8 @@ dependencies {

api compatibility("recyclerViewSelection")

implementation "com.google.errorprone:error_prone_annotations:${errorproneVersion}"

androidTestImplementation "androidx.test:core:${project.rootProject.ext.testRunnerVersion}"
androidTestImplementation "androidx.test:runner:${project.rootProject.ext.testRunnerVersion}"
androidTestImplementation "androidx.test:rules:${project.rootProject.ext.testRunnerVersion}"
@@ -76,7 +78,9 @@ def srcDirs = [
'preferences',
'progressindicator',
'radiobutton',
'search',
'shapetheming',
'sidesheet',
'slider',
'tableofcontents',
'tabs',
@@ -100,7 +104,7 @@ android {
vectorDrawables.useSupportLibrary = true
multiDexEnabled true
minSdkVersion 14
targetSdkVersion 31
targetSdkVersion 33
}

testOptions {
9 changes: 8 additions & 1 deletion catalog/java/io/material/catalog/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -27,7 +27,6 @@
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/cat_app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.${application_theme}">
<meta-data
@@ -97,6 +96,14 @@
<activity
android:name="io.material.catalog.color.ColorHarmonizationDemoActivity"
android:exported="true" />
<activity
android:name="io.material.catalog.search.SearchMainDemoActivity"
android:windowSoftInputMode="adjustNothing"
android:exported="true" />
<activity
android:name="io.material.catalog.search.SearchRecyclerDemoActivity"
android:windowSoftInputMode="adjustNothing"
android:exported="true" />
</application>

</manifest>
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2022 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->

<!-- Layout used by SwitchPreference for the switch widget style. This is inflated
inside android.R.layout.preference. -->
<com.google.android.material.materialswitch.MaterialSwitch
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/switchWidget"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:focusable="false"
android:clickable="false"
android:background="@null"/>
Original file line number Diff line number Diff line change
@@ -16,7 +16,6 @@
-->
<resources>
<string name="toolbar_navigation_close_description">Close demo</string>
<string name="cat_edge_to_edge_enable_description">Enable edge to edge</string>
<string name="cat_edge_to_edge_disable_description">Disable edge to edge</string>
<string name="cat_choose_preferences_description">Open preferences dialog</string>
<string name="cat_search_description">Open the search bar</string>
</resources>
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
<resources xmlns:tools="http://schemas.android.com/tools">
<resources>

<!-- For the catalog we know that toolbars will always be on top of a "surface" color,
so it's better for them to have no background, especially because it's common for
@@ -27,23 +27,9 @@
</style>

<style name="Widget.Catalog.TocButton" parent="Widget.AppCompat.ImageButton">
<item name="android:layout_width">@dimen/mtrl_min_touch_target_size</item>
<item name="android:layout_height">@dimen/mtrl_min_touch_target_size</item>
<item name="android:minWidth">@dimen/mtrl_min_touch_target_size</item>
<item name="android:minHeight">@dimen/mtrl_min_touch_target_size</item>
<item name="android:background">?attr/actionBarItemBackground</item>
</style>

<style name="Widget.Catalog.ChoosePreferencesButton" parent="Widget.Catalog.TocButton">
<item name="android:id">@id/cat_toc_preferences_button</item>
<item name="android:layout_gravity">center_vertical|end</item>
<item name="srcCompat">@drawable/ic_settings_24px</item>
<item name="android:contentDescription">@string/cat_choose_preferences_description</item>
</style>

<style name="Widget.Catalog.EdgeToEdgeButton" parent="Widget.Catalog.TocButton">
<item name="android:id">@id/cat_edge_to_edge_button</item>
<item name="android:layout_gravity">center_vertical|start</item>
<item name="srcCompat">@drawable/ic_edge_to_edge_enable_24dp</item>
<item name="android:contentDescription">@string/cat_edge_to_edge_enable_description</item>
</style>

</resources>
Original file line number Diff line number Diff line change
@@ -17,6 +17,7 @@
<resources xmlns:tools="http://schemas.android.com/tools">

<style name="Theme.Catalog" parent="Theme.Material3.DayNight.NoActionBar">
<item name="preferenceTheme">@style/CatalogPreferenceThemeOverlay</item>
<item name="catalogToolbarStyle">@style/Widget.Catalog.Toolbar</item>
<item name="catalogToolbarWithCloseButtonStyle">@style/Widget.Catalog.Toolbar.WithCloseButton</item>
<item name="textInputSignInStyle">@style/Widget.Material3.TextInputLayout.OutlinedBox</item>
@@ -28,4 +29,12 @@
<item name="android:statusBarColor" tools:targetApi="21">@android:color/transparent</item>
</style>

<style name="CatalogPreferenceThemeOverlay" parent="PreferenceThemeOverlay">
<item name="switchPreferenceCompatStyle">@style/Preference.SwitchPreferenceCompat.Catalog</item>
</style>

<style name="Preference.SwitchPreferenceCompat.Catalog" parent="Preference.SwitchPreferenceCompat.Material">
<item name="android:widgetLayout">@layout/preference_widget_material_switch</item>
</style>

</resources>
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<!--
Copyright 2022 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:viewportWidth="80.0"
android:viewportHeight="80.0"
android:width="24dp"
android:height="24dp"
tools:ignore="NewApi">
<group
android:translateX="12"
android:translateY="22">
<path
android:pathData="M4 0l202 0c2.216 0 4 1.784 4 4l0 28c0 2.216 -1.784 4 -4 4L4 36C1.784 36 0 34.216 0 32L0 4C0 1.784 1.784 0 4 0Z"
android:fillColor="#ffffff"
android:strokeColor="#cccccc"
android:strokeWidth="0.5"/>
<group
android:translateX="6"
android:translateY="6">
<path
android:pathData="M15.5,14h-0.79l-0.28,-0.27C15.41,12.59 16,11.11 16,9.5 16,5.91 13.09,3 9.5,3S3,5.91 3,9.5 5.91,16 9.5,16c1.61,0 3.09,-0.59 4.23,-1.57l0.27,0.28v0.79l5,4.99L20.49,19l-4.99,-5zM9.5,14C7.01,14 5,11.99 5,9.5S7.01,5 9.5,5 14,7.01 14,9.5 11.99,14 9.5,14z"
android:fillColor="#80868b" />
</group>
</group>
</vector>
Loading