簡體   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