点击按钮背景慢慢扩大com.balysv.materialripple.MaterialRippleLayout

直接用,简单粗暴,先从AndroidStudio里面添加依赖(不用到类库也不用jar包),com.balysv:material-menu:1.1.0,记得加命名空间,

xmlns:app="http://schemas.android.com/apk/res-auto"
<p>
</p><p> <com.balysv.materialripple.MaterialRippleLayout</p>            android:layout_width="0dip"

            android:layout_height="match_parent"
            android:layout_weight="1"
            app:mrl_rippleAlpha="0.3"
            app:mrl_rippleColor="@color/maincolor"
            app:mrl_rippleDuration="300"
            app:mrl_rippleHover="true"
            app:mrl_rippleOverlay="true">

           
                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_alignParentBottom="true"
                    android:layout_centerHorizontal="true"
                    android:layout_marginBottom="6dp"
                    android:text="揽件"
                    android:textColor="#484444"
                    android:textSize="12dp" />
            </RelativeLayout>
        </com.balysv.materialripple.MaterialRippleLayout>

猜你喜欢

转载自blog.csdn.net/qq_15949077/article/details/51494073