syn*_*gma 63 android backwards-compatibility material-design android-5.0-lollipop material-theme
从Android Developer页面上提供的示例中,我看到新的视图,如RecyclerView
,向后兼容(android.support.v7.widget.RecyclerView
).
Material Design中引入的所有新东西是否向后兼容(哪个版本)?
Par*_*ani 49
更新此答案,因为Lollipop OS正式发布了支持库,您可以在项目中使用这些库来提供与旧版本的兼容性.
支持库: v7 appcompat库
此库添加了对Action Bar用户界面设计模式的支持.该库包括对材料设计用户界面实现的支持.
如果您使用的是Android Studio,则只需要包含以下依赖项标识符:
com.android.support:appcompat-v7:21.0.+
Run Code Online (Sandbox Code Playgroud)
Ino*_*noy 30
这是你需要的:
得到这个想法,你准备好了.
<android.support.v7.widget.Toolbar
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/colorPrimaryDark"/>
Run Code Online (Sandbox Code Playgroud)
设置指南:http://antonioleiva.com/material-design-everywhere/
来源举例:https://github.com/antoniolg/MaterialEverywhere
要使工具栏工作较低,API 11使用Theme.AppCompat.Light.NoActionBar(而不是windowActionBar设置为false)
<style name="NoActionBarTheme" parent="Theme.AppCompat.Light.NoActionBar">
...
</style>
Run Code Online (Sandbox Code Playgroud)
这里是漂亮按钮等的Material Design Library.
指南,代码,示例 - https://github.com/navasmdc/MaterialDesignLibrary
指导如何将库添加到Android Studio 1.0 - 如何将材质设计库导入Android Studio?
.
快乐的编码;)
归档时间: |
|
查看次数: |
36242 次 |
最近记录: |