====== Material Components for Android ====== [[https://qiita.com/Reyurnible/items/20457d2ef9572b0eee94|Goodbye `shape` - AndroidのMaterialButtonがすごい良かった話]] [[https://github.com/material-components/material-components-android/blob/master/docs/getting-started.md|Getting started with Material Components for Android]] ====== MaterialButton ====== ===== Filled, elevated button (default) ===== style="@style/Widget.MaterialComponents.Button" {{:android:pasted:20191023-223642.png}} ===== Filled, unelevated button ===== style="@style/Widget.MaterialComponents.Button.UnelevatedButton" {{:android:pasted:20191023-223807.png}} ===== Outlined button ===== style="@style/Widget.MaterialComponents.Button.OutlinedButton" {{:android:pasted:20191023-223858.png}} ===== Text button ===== style="@style/Widget.MaterialComponents.Button.TextButton" {{:android:pasted:20191023-223943.png}} ===== Icon button ===== style="@style/Widget.MaterialComponents.Button.Icon" {{:android:pasted:20191023-224018.png}} style="@style/Widget.MaterialComponents.Button.TextButton.Icon" {{:android:pasted:20191023-224054.png}} ====== 使い方 ====== 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' } {{:android:pasted:20191022-200640.png}}