Android 有没有办法在布局上实现光晕效果?
我需要在如下布局上执行此效果: 我尝试在形状上使用渐变,阴影 甚至有些图书馆: 但它始终取决于位图或按钮 目前,我拥有的是我的绘图和布局: 可通过笔划绘制的形状:Android 有没有办法在布局上实现光晕效果?,android,android-layout,glow,Android,Android Layout,Glow,我需要在如下布局上执行此效果: 我尝试在形状上使用渐变,阴影 甚至有些图书馆: 但它始终取决于位图或按钮 目前,我拥有的是我的绘图和布局: 可通过笔划绘制的形状: <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> <corners android:radius="22.5dp"/> <padding android
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
<corners android:radius="22.5dp"/>
<padding android:left="3dp" android:right="3dp" android:top="3dp" android:bottom="3dp"/>
<stroke android:color="@color/colorAccent" android:width="1dp"/>
<solid android:color="@android:color/transparent"/>
</shape>
布局:
<LinearLayout
android:id="@+id/text_selections"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:paddingTop="10dp"
android:paddingBottom="10dp"
android:background="@drawable/btn_rounded_accent_light_stroke"
android:gravity="center"
android:layout_gravity="center"
android:orientation="horizontal"
android:tag="perso_button_rounded_accent_light">
<TextView
android:id="@+id/text_selections_line_1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:tag="perso_text_view_accent"
android:text="Ma Commande"
android:layout_marginRight="5dp"
android:textColor="@color/colorAccent"
android:textSize="17sp" />
<Button
android:layout_width="25dp"
android:layout_height="25dp"
android:text="5"
android:textColor="@color/colorBlueLight"
android:background="@drawable/bg_rounded_button"
android:shadowRadius="90">
</Button>
</LinearLayout>
该库的渲染方式如下所示,即像素化
你对如何达到这个效果有什么想法吗?(我希望以编程方式执行,而不是使用图像)
提前谢谢是的。搜索ColorMatrix辉光效果。