如果我将minAPI设置为21,是否需要AppCompat? [英] If I set minAPI to 21, do I need AppCompat?

查看:98
本文介绍了如果我将minAPI设置为21,是否需要AppCompat?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我决定将Android的最低API版本设置为21,但这是否意味着不再使用AppCompat?只是使用普通的Material Design,而不使用AppCompat等?

I decided to make my minimum API version 21 for Android, but does this mean it makes no sense to use the AppCompat anymore? Just use plain Material Design / no AppCompat / etc?

推荐答案

不,您应该始终使用AppCompat。这样可以确保您的应用在所有API级别上都已经一致,并且可以访问所有新API(例如使用彩色按钮,仅在API 23中引入。

No, you should always use AppCompat. This ensures that your app is already consistent across all API levels and you have access to all new APIs (such as using the Colored buttons, which was only introduced in API 23).

许多其他库,例如设计支持库也需要使用AppCompat。

Many other libraries, such as the Design Support Library also require use of AppCompat.

这篇关于如果我将minAPI设置为21,是否需要AppCompat?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆