以前のリビジョンの文書です
style=“@style/Widget.MaterialComponents.Button.Icon”
style=“@style/Widget.MaterialComponents.Button.TextButton.Icon”
repositories {
google() // ←確認
jcenter()
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.core:core-ktx:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.google.android.material:material:1.0.0-alpha1' // ←追加
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}
<com.google.android.material.button.MaterialButton android:textAppearance="@style/TextAppearance.MaterialComponents.Button" app:backgroundTint="@color/colorPrimary" android:id="@+id/buttonClear" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/button_clear" app:layout_constraintBottom_toBottomOf="@+id/imageView" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toEndOf="@+id/imageView" app:layout_constraintTop_toTopOf="@+id/imageView" />