【发布时间】:2015-05-06 05:35:05
【问题描述】:
我想在布局的右侧和底部添加一个浅色阴影。我尝试使用android:background="@android:drawable/dialog_holo_light_frame",但它在布局的所有四个侧面都添加了一个厚阴影。我需要创建什么可绘制并设置为背景?
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:background="@android:drawable/dialog_holo_light_frame">
<ImageView
android:id="@+id/g"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:scaleType="centerCrop"
android:layout_gravity="center"
android:src="@drawable/logo_icon"
android:visibility="visible"
android:clickable="true" />
</LinearLayout>
【问题讨论】:
-
我认为你需要自定义阴影效果
-
这就是我所提到的,它奏效了。 stackoverflow.com/questions/13005714/…
-
是的,九个补丁可以工作 搜索那个,这里是例子stackoverflow.com/a/31722183/3303075
标签: android android-layout drawable android-drawable