关于Jetpack和添加引用,再加上材料组件

2018-12-18  本文已影响3人  为什么要简称

https://developer.android.google.cn/jetpack/

https://developer.android.com/topic/libraries/architecture/adding-components#lifecycle

Material Components for Android

allprojects {
repositories {
google()
jcenter()
}
}

dependencies {
// ...
implementation 'com.google.android.material:material:1.0.0'
// ...
}

2. Compile your app with Android P

3. Ensure you are using AppCompatActivity

4. Change your app theme to inherit from a Material Components theme

Material Components themes

Theme.MaterialComponents
Theme.MaterialComponents.NoActionBar
Theme.MaterialComponents.Light
Theme.MaterialComponents.Light.NoActionBar
Theme.MaterialComponents.Light.DarkActionBar

上一篇下一篇

猜你喜欢

热点阅读