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
v7 support library 包括以下的一些特性:
· 在应用了一个Theme.AppCompat 主题后,系统的一些组件就有了Material Design 的风格
· 在Theme.AppCompat 主题中,有调色主题
· RecyclerView 组件显示数据集
· CardView 组件创建卡片
· 从图像中取色