草庐IT

shape-rendering

全部标签

Android MaterialButton使用详解,告别shape、selector

效果前言先来看一下​​MaterialButton​​​是什么由上图可以看到​​​MaterialButton​​​也没有什么神秘的,不过是Button的一个子类而已,但是经过谷歌的封装之后,在符合​​MaterialDesign​​的基础上,使用起来更加方便了,且容易实现预期效果。使用引入material包implementation'com.google.android.material:material:1.2.1'常规android:layout_width="wrap_content"android:layout_height="wrap_content"android:text="

Android MaterialButton使用详解,告别shape、selector

效果前言先来看一下​​MaterialButton​​​是什么由上图可以看到​​​MaterialButton​​​也没有什么神秘的,不过是Button的一个子类而已,但是经过谷歌的封装之后,在符合​​MaterialDesign​​的基础上,使用起来更加方便了,且容易实现预期效果。使用引入material包implementation'com.google.android.material:material:1.2.1'常规android:layout_width="wrap_content"android:layout_height="wrap_content"android:text="

Android ShapeableImageView使用详解,告别shape、三方库

效果前言先来看一下​​ShapeableImageView​​​是什么由上图可以看到​​​ShapeableImageView​​​也没有什么神秘的,不过是​​ImageView​​​的一个子类而已,但是从效果图来看,在​​不写shape、不引入三方库​​的情况下,还是挺容易实现预期效果的,而且扩展性良好。使用引入material包implementation'com.google.android.material:material:1.2.1'常规android:layout_width="wrap_content"android:layout_height="wrap_content"an

Android ShapeableImageView使用详解,告别shape、三方库

效果前言先来看一下​​ShapeableImageView​​​是什么由上图可以看到​​​ShapeableImageView​​​也没有什么神秘的,不过是​​ImageView​​​的一个子类而已,但是从效果图来看,在​​不写shape、不引入三方库​​的情况下,还是挺容易实现预期效果的,而且扩展性良好。使用引入material包implementation'com.google.android.material:material:1.2.1'常规android:layout_width="wrap_content"android:layout_height="wrap_content"an