当前位置:网站首页>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>使用效果:

边栏推荐
- Kotlin compose and native nesting
- Oracle combines multiple rows of data into one row of data
- Tdengine connector goes online Google Data Studio app store
- Apache DolphinScheduler 系统架构设计
- Node red series (29): use slider and chart nodes to realize double broken line time series diagram
- RMS to EAP is simply implemented through mqtt
- From "chemist" to developer, from Oracle to tdengine, two important choices in my life
- [200 opencv routines] 219 Add digital watermark (blind watermark)
- B站大量虚拟主播被集体强制退款:收入蒸发,还倒欠B站;乔布斯被追授美国总统自由勋章;Grafana 9 发布|极客头条...
- oracle 多行数据合并成一行数据
猜你喜欢

如何写出高质量的代码?

字节跳动面试官:一张图片占据的内存大小是如何计算

. Net delay queue

Idea debugs com intellij. rt.debugger. agent. Captureagent, which makes debugging impossible

Tdengine already supports the industrial Intel edge insight package

Oracle combines multiple rows of data into one row of data

mysql80服务不启动

【C语言】动态内存开辟的使用『malloc』

A high density 256 channel electrode cap for dry EEG

Swift tableview style (I) system basic
随机推荐
Personal website construction tutorial | local website environment construction | website production tutorial
The king of pirated Dall · e? 50000 images per day, crowded hugging face server, and openai ordered to change its name
Generics, generic defects and application scenarios that 90% of people don't understand
天龙八部TLBB系列 - 单体技能群伤
Evolution of Baidu intelligent applet patrol scheduling scheme
Roll up, break through 35 year old anxiety, and animate the CPU to record the function call process
[app packaging error] to proceed, either fix the issues identified by lint, or modify your build script as follow
Data visualization platform based on template configuration
能源势动:电力行业的碳中和该如何实现?
Cut off 20% of Imagenet data volume, and the performance of the model will not decline! Meta Stanford et al. Proposed a new method, using knowledge distillation to slim down the data set
Node red series (29): use slider and chart nodes to realize double broken line time series diagram
Swift saves an array of class objects with userdefaults and nssecurecoding
苹果 5G 芯片研发失败?想要摆脱高通为时过早
Analysis on the wallet system architecture of Baidu trading platform
From "chemist" to developer, from Oracle to tdengine, two important choices in my life
Uncover the practice of Baidu intelligent testing in the field of automatic test execution
Tianlong Babu TLBB series - questions about skill cooling and the number of attack ranges
MySQL数字类型学习笔记
美图炒币半年亏了3个亿,华为被曝在俄罗斯扩招,AlphaGo的同类又刷爆一种棋,今日更多大新闻在此...
Charm of code language