当前位置:网站首页>ConstraintLayout官方提供圆角ImageFilterView
ConstraintLayout官方提供圆角ImageFilterView
2022-07-05 09:41:00 【沙漠一只雕得儿得儿】
圆角ImageFilterView,ImageFilterButton
印象中这应该是第一次官方提供具有圆角功能的view了吧,除了圆角功能外,ImageFilterView,ImageFilterButton还有一堆其他的功能。
- 圆角
app:round,取值0-50dp,默认0,就是方形,设置50就是圆形图片,超过50没其他意义,还是圆形图片。 - 圆角比例
app:roundPercent,取值0-1之间,默认0就是方形,1是圆形图片,同上,超过1按照1处理,还是圆形图片。 - 交叉图
app:altSrc,需要跟app:crossfade共同使用,app:crossfade取值0-1,默认0为交叉图完全透明,不展示。取值1交叉图完全展示,覆盖到src上。app:overlay,官方释义:定义alt图像是在原始图像的顶部淡入,还是与其交叉淡入。默认值为true。对于半透明对象设置为false。我没试过效果。 - 色温
app:warmt,float型,默认值1,小于1是冷色调,大于1是暖色调。 - 亮度
app:brightness,float型,默认1,值越大亮度越高。 - 饱和度
app:brightness,float型,默认1,取值0为灰阶样式,大于1的数值都是超饱和状态,色彩非常艳丽,有点辣眼睛。 - 对比度
app:contrast,float型,默认1,取值0相当于图片变全黑,大于1都是高对比度状态。
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<androidx.constraintlayout.utils.widget.ImageFilterView
android:layout_width="250dp"
android:layout_height="250dp"
android:layout_gravity="center_horizontal"
android:src="@drawable/ic_launcher_background"
app:roundPercent="1" />
</LinearLayout>使用效果:

边栏推荐
- [C language] the use of dynamic memory development "malloc"
- 天龙八部TLBB系列 - 单体技能群伤
- [NTIRE 2022]Residual Local Feature Network for Efficient Super-Resolution
- 能源势动:电力行业的碳中和该如何实现?
- 让AI替企业做复杂决策真的靠谱吗?参与直播,斯坦福博士来分享他的选择|量子位·视点...
- Advanced opencv:bgr pixel intensity map
- Node-RED系列(二九):使用slider与chart节点来实现双折线时间序列图
- Tianlong Babu TLBB series - about items dropped from packages
- oracle和mysql批量Merge对比
- Apache dolphin scheduler system architecture design
猜你喜欢

程序员如何活成自己喜欢的模样?

Implementation of smart home project
![[tips] get the x-axis and y-axis values of cdfplot function in MATLAB](/img/08/2d039df6ea3ace8685512b2af8281d.png)
[tips] get the x-axis and y-axis values of cdfplot function in MATLAB

How to get the STW (pause) time of GC (garbage collector)?
![[NTIRE 2022]Residual Local Feature Network for Efficient Super-Resolution](/img/f3/782246100bca3517d95869be80d9c5.png)
[NTIRE 2022]Residual Local Feature Network for Efficient Super-Resolution

如何獲取GC(垃圾回收器)的STW(暫停)時間?

Node-RED系列(二九):使用slider与chart节点来实现双折线时间序列图
![[C language] the use of dynamic memory development](/img/b7/3337bf0df9232d3a44eaeb46b39c63.png)
[C language] the use of dynamic memory development "malloc"

Unity particle special effects series - the poison spray preform is ready, and the unitypackage package can be used directly - next

Solve the problem of no all pattern found during Navicat activation and registration
随机推荐
Tianlong Babu TLBB series - single skill group injury
Unity particle special effects series - the poison spray preform is ready, and the unitypackage package can be used directly - next
Comment obtenir le temps STW du GC (collecteur d'ordures)?
A high density 256 channel electrode cap for dry EEG
[NTIRE 2022]Residual Local Feature Network for Efficient Super-Resolution
Are databases more popular as they get older?
Wechat applet - simple diet recommendation (2)
卷起来,突破35岁焦虑,动画演示CPU记录函数调用过程
Using directive in angualr2 to realize that the picture size changes with the window size
oracle和mysql批量Merge对比
[C language] the use of dynamic memory development "malloc"
Observation cloud and tdengine have reached in-depth cooperation to optimize the cloud experience of enterprises
Swift uses userdefaults and codable to save an array of class objects or structure instances
Generics, generic defects and application scenarios that 90% of people don't understand
Flutter development: use safearea
Roll up, break 35 - year - old Anxiety, animation Demonstration CPU recording Function call Process
Mysql80 service does not start
Wechat applet - simple diet recommendation (4)
Jupiter notebook shortcut key
Unity粒子特效系列-毒液喷射预制体做好了,unitypackage包直接用 - 上