Material Design控件軍火庫集合

qaz010203 7年前發布 | 18K 次閱讀 Android開發 移動開發 Material Design

本篇適合哪些人?

  • 剛剛從基于android 4.4以下項目中切出來,還沒有用過5.0+新特性
  • 新人入門學點牛逼特效控件
  • 擼一個愛屁屁

本篇包含

  • MaterialDrawer
  • material-menu
  • CoordinatorLayout
  • AppBarLayout
  • CollapsingToolbarLayout
  • DrawerLayout
  • MaterialDesignLibrary
  • material
  • MaterialDesignInXamlToolkit

我先抽一口,再和你講. 啊~舒坦.

MaterialDrawer

https://github.com/mikepenz/MaterialDrawer

提供比NavigationView 更好的交互效果的側滑菜單項

MaterialDrawer.png

material-menu

提供帶切換效果的Ioc

github: material-menu

material-menu.gif

CoordinatorLayout && AppBarLayout

  • 如果你想做出嵌套View滾動效果那么必須用它來實現
  • 他和CoordinatorLayout是一對的.CoordinatorLayout的直接子View必須是它.因為AppBarLayout.ScrollingViewBehavior對子View滑動響應事件直接做了處理.
    在另外一個嵌套的View中必須設置app:layout_behavior="@string/appbar_scrolling_view_behavior"這個特殊的值.也可以自定義Behavior.
  • 具體用法參考: 泡在網上的日子
  • CoordinatorLayout的使用如此簡單
  • CoordinatorLayout布局的使用方式

CollapsingToolbarLayout

實現視差滾動動畫和Toolbar滾動

CollapsingToolbarLayout .gif

CoordinatorLayout與CollapsingToolbarLayout實現視差滾動動畫和Toolbar滾動

DrawerLayout

提供類似 SlidingMenu 的官方支持庫(側滑菜單)

1.gif

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="

<android.support.v4.widget.DrawerLayout
    android:id="@+id/simple_navigation_drawer"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <!--內容視圖-->
    <include
        android:id="@+id/tv_content"
        layout="@layout/drawer_content_layout"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />

    <!--左側滑菜單欄-->
    <include
        layout="@layout/drawer_menu_layout"
        android:layout_width="250dp"
        android:layout_height="match_parent"
        android:layout_gravity="start" />

    <!--右側滑菜單欄-->
    <include
        layout="@layout/drawer_menu_layout"
        android:layout_width="250dp"
        android:layout_height="match_parent"
        android:layout_gravity="end" />


</android.support.v4.widget.DrawerLayout>


</RelativeLayout></pre>

--

discreteSeekBar

https://github.com/AnderWeb/discreteSeekBar

百分比滑動條

MaterialDesignLibrary

https://github.com/navasmdc/MaterialDesignLibrary

一個支持兼容到android2.2 的依賴庫.很強大. 詳情見github.

material

https://github.com/rey5137/material

一大波封裝完整的組件 直接調用就可以了

MaterialDesignInXamlToolkit

https://github.com/ButchersBoy/MaterialDesignInXamlToolkit

同上都是組件軍火庫

更多設計請參考: 最全面的 Material Design 學習資料

 

 

來自:http://www.jianshu.com/p/4aaf04749f16

 

 本文由用戶 qaz010203 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!