What is the difference between Theme.AppCompat and Theme.Material in Android?

非 Y 不嫁゛ 提交于 2019-12-05 03:32:31
<style name="AppTheme" parent="android:Theme.*">

This is the raw Material design theme, designed for Android 5+

<style name="AppTheme" parent="Theme.AppCompat.*">

This is a way to use material design on pre-lollipop devices(thus app compatibility). You can design for newer API's using AppCompat and as such have it work on earlier API levels than what the starting API level is.

In this case, it means you can run Material Design on platforms that doesn't come with material design(meaning pre-Android 5)

<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">    
<style name="AppTheme" parent="android:Theme.Material.Light.DarkActionBar">

Theme.Appcompact is for above API 7+

Theme.Material is for above API 21+

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!