1. 首页 > 科技快讯 >

datepicker用法 datepicker的用法

您好,今天小天来为大家解答以上的问题。datepicker用法相信很多小伙伴还不知道,现在让我们一起来看看吧!

datepicker用法 datepicker的用法datepicker用法 datepicker的用法


datepicker用法 datepicker的用法


1、5、Objective-C与C++混合编程应该意识到这不是一个库,而是一套库的 ,它们旨在无需新平台的情况下,提供API的向后兼容版本以及新功能。

2、 23.2 版本添加了一些新的支持库,同时还为现有的库增加了新特性。

3、课程内容支持Vector Drawable 和 Animated Vector DrawableVector drawables 让你可以用一个定义在XAndroid Studio 1.4 中介绍了一种通过 在编译时生成png 的办法对vector drawable提供了有限的支持。

4、为了禁用这个功能(节省支持库的空间,真正受益于新的库),你需要在 build.gradle文件里添加vectorDrawables.useSupportLibrary = true :123456android {defaultConfig {vectorDrawables.useSupportLibrary = true}}需要注意这个新的属性只有2.0版本的Gradle Plugin中才有。

5、如果你正在使用Gradle 1.5 ,则应该使用12345678011// Gradle Plugin 1.5android {defaultConfig {generatedDensities = []}// This is handled for you by the 2.0+ Gradle PluginaaptOptions {additionalParameters "--no-version-vectors"}}你可以使用兼容到API7的VectorDrawableCompat和兼容到API11或者更高的AnimatedVectorDrawableCompat。

6、鉴于安卓加载drawable的方式,并不是每个接受drawable id的地方(比如在一个XML文件中)都支持加载vector drawable。

7、幸好,AppCompat 添加了几个功能让你更容易使用新的vector drawable。

8、首先,当你和ImageView(或者例如 ImageButton 和 FloatingActionButton这样的子类) 一起使用AppCompat的时候,你可以使用新的app:srcCompat属性来饮用 vector drawable(而任何其它drawable则用 android:src):1234android:layout_width="wrap_content"android:layout_height="wrap_content"app:srcCompat="@drawable/ic_add" />并且,如果你要在运行时动态的改变drawable,你可以使用和之前相同的 setImageResource() 方法 - 这点并没有变。

9、使用AppCompat和app:srcCompat是在app中集成vector drawable最简单可靠的方式。

10、你会发现在Lollipop之前直接在app:srcCompat之外引用vector drawable会失败。

11、但是AppCompat却支持其它drawable 容器比如StateListDrawable, InsetDrawable, LayerDrawable, LlListDrawable, 或者 RotateDrawable加载vector drawable。

12、使用这种间接的方法,你可以在这种情况下使用vector drawable,比如TextView的 android:drawableLeft 属性,本来在正常情况下,它是不支持vector drawable的。

13、虽然在能各个版本的app中使用矢量图像已经是一个很大的变化了,但是这个版本还在AppCompat中添加了一个新主题:Theme.AppCompat.DayNight。

本文到这结束,希望上面文章对大家有所帮助。

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至836084111@qq.com 举报,一经查实,本站将立刻删除。

联系我们

工作日:9:30-18:30,节假日休息