实现思路:将两张图片(一张原图,一张原图模糊后得到的图片)重叠放在相同位置,当手指按下后记录手指位置,根据手势改变上层图片透明度即可
xml文件
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:layout_width="wrap_content"
android:layout_height=

本文介绍了如何在Android中创建毛玻璃效果,通过将原图与模糊后的图片重叠,并根据手势改变上层图片的透明度来实现。详细步骤包括XML布局和相关代码的实现。
最低0.47元/天 解锁文章
3088

被折叠的 条评论
为什么被折叠?



