Android 5.0 RippleEffect

Android 5.0 RippleEffect

RippleEffect是一个Material Design的涟漪效果的组件


集成
dependencies {
    compile 'com.github.traex.rippleeffect:library:1.2.3'
}

案例使用:
1》》
<com.andexert.library.RippleView
  android:id="@+id/more"
  android:layout_width="?android:actionBarSize"
  android:layout_height="?android:actionBarSize"
  android:layout_toLeftOf="@+id/more2"
  android:layout_margin="5dp"
  ripple:rv_centered="true">


  <ImageView
    android:layout_width="?android:actionBarSize"
    android:layout_height="?android:actionBarSize"
    android:src="@android:drawable/ic_menu_edit"
    android:layout_centerInParent="true"
    android:padding="10dp"
    android:background="@android:color/holo_blue_dark"/>


</com.andexert.library.RippleView>
2》》
<com.andexert.library.RippleView
        android:id="@+id/rect"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_below="@+id/actionbar"
        android:layout_marginBottom="20dp"
        android:layout_marginLeft="30dp"
        android:layout_marginTop="20dp"
        ripple:rv_type="rectangle"
        ripple:rv_zoom="true">


        <TextView
            android:id="@+id/rect_child"
            android:layout_width="200dp"
            android:layout_height="50dp"
            android:layout_centerInParent="true"
            android:background="@android:color/holo_green_light"
            android:gravity="center"
            android:text="Hello World!"
            android:textColor="@android:color/white"
            android:textSize="18sp" />


</com.andexert.library.RippleView>
github地址  https://github.com/traex/RippleEffect
Cards
》》》对于创建带有不同信息内容的碎片,Cards是一种常见的模式。supportV7下的CardView可以帮助你方便的实现,并提供了轮廓和阴影.
<android.support.v7.widget.CardView
      android:layout_width="match_parent"
      android:layout_height="wrap_content">
      <!-- Your card content -->
 
</android.support.v7.widget.CardView>

CardView继承自FrameLayout并提供了默认的elevation 和 圆角,使得cards在不同的平台间保持一致。你也可以通过cardElevation和
cardCornerRadius属性自定义它们的值。注意,Cards不是唯一实现维度效果的方式,你应该警惕过度的使用

Cards:http://www.google.com/design/spec/components/cards.html#cards-usage


Use the Support Library  使用支持库
v7 support library 包括以下的一些特性:
· 在应用了一个Theme.AppCompat 主题后,系统的一些组件就有了Material Design 的风格
· 在Theme.AppCompat 主题中,有调色主题
· RecyclerView 组件显示数据集
· CardView 组件创建卡片
· 从图像中取色





























































































































































































































































































































































































































  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值