繁体   English   中英

如何在我的线性布局底部添加阴影

[英]How add shadow in bottom of my linear layout

我想为我的线性布局底部添加阴影。

基本上,这个线性布局是我的布局的自定义标题栏。

它包含我的布局的标题和图标。 我想将阴影添加到布局的底部。 有人能帮我吗。

您可以使用 Cardview 并对其进行提升。 它会给你阴影效果。

 `<android.support.v7.widget.CardView 
   xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    app:cardCornerRadius="@dimen/margin4"
    android:elevation="@dimen/margin8"
    android:layout_margin="@dimen/margin4"
    app:cardUseCompatPadding="false">

    <ImageView
        android:id="@+id/zoomImageview"
        android:layout_width="150dp"
        android:scaleType="centerInside"
        android:layout_height="100dp" />
</android.support.v7.widget.CardView>`

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM